( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/importtest.php
 <?php

 include("includes/processFunctionsX.php");
 $fileImport='{"brandEngine":{"brandLocation":{"images":"C:/wamp/www/Nice Templates/Bakery-social-media-post/brandexport/assets/"},"categorys":{"name":"brandStart"},"brandLayers":[{"name":"Backgroundthebrand79Bakery-social-media-post_191","style":"no","category":"brandStart","attachment":"Backgroundthebrand79Bakery-social-media-post_191"},{"name":"3236thebrand585Bakery-social-media-post_1990","style":"no","category":"brandStart","attachment":"3236thebrand585Bakery-social-media-post_1990"},{"name":"Rectangle_3thebrand317Bakery-social-media-post 1367","style":"no","category":"brandStart","attachment":"Rectangle_3thebrand317Bakery-social-media-post 1367"},{"name":"Rectangle_2thebrand440Bakery-social-media-post 1353","style":"no","category":"brandStart","attachment":"Rectangle_2thebrand440Bakery-social-media-post 1353"},{"name":"baking_nation presentsthebrand174Bakery-social-media-post 1134","style":"no","category":"brandStart","attachment":"baking_nation presentsthebrand174Bakery-social-media-post 1134"},{"name":"blueberry_choco cakethebrand617Bakery-social-media-post 1917","style":"no","category":"brandStart","attachment":"blueberry_choco cakethebrand617Bakery-social-media-post 1917"},{"name":"getthebrand752Bakery-social-media-post_1575","style":"no","category":"brandStart","attachment":"getthebrand752Bakery-social-media-post_1575"},{"name":"off_thebrand17Bakery-social-media-post 1789","style":"no","category":"brandStart","attachment":"off_thebrand17Bakery-social-media-post 1789"},{"name":"%thebrand184Bakery-social-media-post_1335","style":"no","category":"brandStart","attachment":"%thebrand184Bakery-social-media-post_1335"},{"name":"70thebrand980Bakery-social-media-post_1945","style":"no","category":"brandStart","attachment":"70thebrand980Bakery-social-media-post_1945"},{"name":"buy_nowthebrand261Bakery-social-media-post 1447","style":"no","category":"brandStart","attachment":"buy_nowthebrand261Bakery-social-media-post 1447"},{"name":"_special offerthebrand678Bakery-social-media-post 1559","style":"no","category":"brandStart","attachment":"_special offerthebrand678Bakery-social-media-post 1559"},{"name":"Remove_this layerthebrand875Bakery-social-media-post 1500","style":"no","category":"brandStart"}],"brandLayerOrders":{"default":{"Backgroundthebrand79Bakery-social-media-post_191":{"Backgroundthebrand79Bakery-social-media-post_191":{"x":600,"y":-600,"width":1202,"height":1202}},"3236thebrand585Bakery-social-media-post_1990":{"3236thebrand585Bakery-social-media-post_1990":{"x":600,"y":-600,"width":1202,"height":1202}},"Rectangle_3thebrand317Bakery-social-media-post 1367":{"Rectangle_3thebrand317Bakery-social-media-post 1367":{"x":982,"y":-385,"width":284,"height":246}},"Rectangle_2thebrand440Bakery-social-media-post 1353":{"Rectangle_2thebrand440Bakery-social-media-post 1353":{"x":985,"y":-606,"width":298,"height":76}},"baking_nation presentsthebrand174Bakery-social-media-post 1134":{"baking_nation presentsthebrand174Bakery-social-media-post 1134":{"x":303.5,"y":-108.5,"width":453,"height":25}},"blueberry_choco cakethebrand617Bakery-social-media-post 1917":{"blueberry_choco cakethebrand617Bakery-social-media-post 1917":{"x":600,"y":-185,"width":1046,"height":62}},"getthebrand752Bakery-social-media-post_1575":{"getthebrand752Bakery-social-media-post_1575":{"x":883.5,"y":-273.5,"width":105,"height":27}},"off_thebrand17Bakery-social-media-post 1789":{"off_thebrand17Bakery-social-media-post 1789":{"x":1022,"y":-498,"width":84,"height":28}},"%thebrand184Bakery-social-media-post_1335":{"%thebrand184Bakery-social-media-post_1335":{"x":1075,"y":-326,"width":50,"height":50}},"70thebrand980Bakery-social-media-post_1945":{"70thebrand980Bakery-social-media-post_1945":{"x":955,"y":-380.5,"width":244,"height":163}},"buy_nowthebrand261Bakery-social-media-post 1447":{"buy_nowthebrand261Bakery-social-media-post 1447":{"x":985,"y":-603,"width":120,"height":32}},"_special offerthebrand678Bakery-social-media-post 1559":{"_special offerthebrand678Bakery-social-media-post 1559":{"x":982,"y":-536,"width":286,"height":30}},"Remove_this layerthebrand875Bakery-social-media-post 1500":{"Remove_this layerthebrand875Bakery-social-media-post 1500":{"x":600,"y":-600,"width":1202,"height":1202}}}},"brandType":[{"color":"","x":"0","y":"0","face":"","size":"","id":"0","type":"Normal layer"},{"color":"","x":"-143","y":"-56","face":"","size":"","id":"1","type":"Smart object layer"},{"color":"","x":"841","y":"263","face":"","size":"","id":"2","type":"Normal layer"},{"color":"","x":"837","y":"569","face":"","size":"","id":"3","type":"Normal layer"},{"color":"FFFFFF","x":"78","y":"97","face":"Poppins-Regular","size":"32.8220405578613 pt","id":"4","type":"Text Layer"},{"color":"FEFEFE","x":"78","y":"155","face":"Poppins-Bold","size":"115.51000213623 pt","id":"5","type":"Text Layer"},{"color":"FFFFFF","x":"832","y":"261","face":"KeepCalm-Medium","size":"16.1775703430176 pt","id":"6","type":"Text Layer"},{"color":"FFFFFF","x":"981","y":"485","face":"KeepCalm-Medium","size":"16.1775703430176 pt","id":"7","type":"Text Layer"},{"color":"FFFFFF","x":"1051","y":"302","face":"KeepCalm-Medium","size":"30 pt","id":"8","type":"Text Layer"},{"color":"FFFFFF","x":"834","y":"300","face":"Poppins-SemiBold","size":"122 pt","id":"9","type":"Text Layer"},{"color":"FFFFFF","x":"926","y":"588","face":"BebasNeue-Regular","size":"60 pt","id":"10","type":"Text Layer"},{"color":"FFFFFF","x":"840","y":"522","face":"Poppins-SemiBoldItalic","size":"22 pt","id":"11","type":"Text Layer"},{"color":"","x":"0","y":"-231","face":"","size":"","id":"12","type":"Normal layer"},{"color":"undefined","x":"0","y":"0","face":"undefined","size":"undefined","id":"-undefined","type":"poster"}]}}';

  $url =  $fileImport;
$urlArray = str_replace("'","",$url);
 $Description = json_decode($urlArray , true);
//print_r($Description);
 $images = $Description['brandEngine']['brandLocation']['images'];
 $characters = $row['layers'];
 $characters = json_decode($characters,true);

 $arrSpits=explode("/", $images);
 $arrSize=count($arrSpits);

 $desc = $arrSpits[$arrSize-3];//Output: and more

 $categorys = $Description['brandEngine']['categorys']['name'];
 $brandLayers = $Description['brandEngine']['brandLayers'];
 $brandType = $Description['brandEngine']['brandType']['0'];
 $brandLayerOrders = $Description['brandEngine']['brandLayerOrders']['default'];
 $i =-1;
 $z =-1;
 $y =-1;

 foreach ($brandLayers as $value) {
     $i +=1;
     $y +=1;
     $z +=1;
      $name = $value['name'];
     $attachment = $value['attachment'];
     $x = round($Description['brandEngine']['brandLayerOrders']['default']["$attachment"]["$attachment"]['x'],0);


     $width = round($Description['brandEngine']['brandLayerOrders']['default']["$attachment"]["$attachment"]['width'],0);
     $height = round($Description['brandEngine']['brandLayerOrders']['default']["$attachment"]["$attachment"]['height'],0);
     $type = $Description['brandEngine']['brandType']["$i"]['type'];




     $attachmentx = $name;
     $attachmentx = explode('thebrand',$attachmentx);
     $attachmentx = $attachmentx[0];
     $attachmentx   = str_replace('_'," ", $attachmentx);
     $attachmentx = preg_replace('/\s+/', ' ', $attachmentx);
     $name   = $attachmentx;
     $type = $Description['brandEngine']['brandType']["$i"]['type'];
     $size = $Description['brandEngine']['brandType']["$i"]['size'];

     $x = $Description['brandEngine']['brandType']["$i"]['x'];
     $y = $Description['brandEngine']['brandType']["$i"]['y'];
     $y = str_replace("-", "", $y);
     $x = str_replace("-", "", $x);
     $x =$x;
     $y =  $y;





     $size = round(str_replace(" pt", "", $size),0);
     $size = $size+10;
     $font = $Description['brandEngine']['brandType']["$i"]['face'];
     $color = $Description['brandEngine']['brandType']["$i"]['color'];


     $layerType = $type ;

     include("TheBrandZ/interpretInitial.php");



   //echo "$i | $attachment | $x |$y | $width| $height | $type| $size | $face |  $color<br>";
 }

 $fontJson = "[".rtrim($fontJson, ',')."]";;
 echo $json = "[".rtrim($json, ',')."]";



 $characters = json_decode($json,true);
 $charactersFonts = json_decode($fontJson,true);




 ?>