예제 #1
0
 public static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)
 {
     $kfsmirm = "url";
     ${"GLOBALS"}["bzczzdqyd"] = "id_entity";
     ${${"GLOBALS"}["tlsfxeardxw"]} = tempnam(_PS_TMP_IMG_DIR_, "ps_import");
     ${${"GLOBALS"}["swugitwcekfq"]} = explode(",", Configuration::get("WATERMARK_TYPES"));
     switch (${${"GLOBALS"}["cvtsebg"]}) {
         default:
         case "products":
             ${${"GLOBALS"}["lpbvbgccdl"]} = new Image(${${"GLOBALS"}["uvlsrne"]});
             ${${"GLOBALS"}["wtulgbqcgx"]} = $image_obj->getPathForCreation();
             break;
         case "categories":
             ${${"GLOBALS"}["wtulgbqcgx"]} = _PS_CAT_IMG_DIR_ . (int) ${${"GLOBALS"}["bzczzdqyd"]};
             break;
     }
     ${$kfsmirm} = str_replace(" ", "%20", trim(${${"GLOBALS"}["ttqxfd"]}));
     ${"GLOBALS"}["ghxdribmjq"] = "tmpfile";
     $lobrjsdyfu = "url";
     if (!ImageManager::checkImageMemoryLimit(${${"GLOBALS"}["ttqxfd"]})) {
         return false;
     }
     if (AgileHelper::copy(${$lobrjsdyfu}, ${${"GLOBALS"}["tlsfxeardxw"]})) {
         ${"GLOBALS"}["pimvwry"] = "tmpfile";
         $eonlensp = "entity";
         $izyosqyo = "regenerate";
         ${"GLOBALS"}["djopvop"] = "path";
         ImageManager::resize(${${"GLOBALS"}["pimvwry"]}, ${${"GLOBALS"}["djopvop"]} . ".jpg");
         ${${"GLOBALS"}["jwrmfnly"]} = ImageType::getImagesTypes(${$eonlensp});
         if (${$izyosqyo}) {
             $gagiwtklv = "images_types";
             foreach (${$gagiwtklv} as ${${"GLOBALS"}["lvadwrx"]}) {
                 ${"GLOBALS"}["ywiijdhhoyuf"] = "image_type";
                 ${"GLOBALS"}["iflsogwlox"] = "image_type";
                 ${"GLOBALS"}["yeyowiqlgu"] = "image_type";
                 $vhqrhojxebs = "tmpfile";
                 ${"GLOBALS"}["nbjagdwvwk"] = "path";
                 ${"GLOBALS"}["qdhosudwjdj"] = "watermark_types";
                 $iybxnfabykn = "image_type";
                 ImageManager::resize(${$vhqrhojxebs}, ${${"GLOBALS"}["nbjagdwvwk"]} . "-" . stripslashes(${$iybxnfabykn}["name"]) . ".jpg", ${${"GLOBALS"}["yeyowiqlgu"]}["width"], ${${"GLOBALS"}["iflsogwlox"]}["height"]);
                 $fsqlvnus = "id_entity";
                 if (in_array(${${"GLOBALS"}["ywiijdhhoyuf"]}["id_image_type"], ${${"GLOBALS"}["qdhosudwjdj"]})) {
                     Hook::exec("actionWatermark", array("id_image" => ${${"GLOBALS"}["uvlsrne"]}, "id_product" => ${$fsqlvnus}));
                 }
             }
         }
     } else {
         $nnyuiure = "tmpfile";
         unlink(${$nnyuiure});
         return false;
     }
     unlink(${${"GLOBALS"}["ghxdribmjq"]});
     return true;
 }
예제 #2
0
 public static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)
 {
     $fdkpbei = "url";
     $llggir = "tmpfile";
     ${"GLOBALS"}["buufgxi"] = "url";
     ${${"GLOBALS"}["uycxdjlesig"]} = tempnam(_PS_TMP_IMG_DIR_, "ps_import");
     ${${"GLOBALS"}["tvorjnc"]} = explode(",", Configuration::get("WATERMARK_TYPES"));
     $iqpntrfkwou = "entity";
     ${"GLOBALS"}["yicwwljyjsdn"] = "path";
     switch (${$iqpntrfkwou}) {
         default:
         case "products":
             ${${"GLOBALS"}["sahwkepf"]} = new Image(${${"GLOBALS"}["ttwxddld"]});
             ${${"GLOBALS"}["rknuvagqdkw"]} = $image_obj->getPathForCreation();
             break;
         case "categories":
             ${${"GLOBALS"}["yicwwljyjsdn"]} = _PS_CAT_IMG_DIR_ . (int) ${${"GLOBALS"}["xxszqgflyq"]};
             break;
     }
     ${${"GLOBALS"}["buufgxi"]} = str_replace(" ", "%20", trim(${${"GLOBALS"}["uhoixbgwu"]}));
     if (!ImageManager::checkImageMemoryLimit(${$fdkpbei})) {
         return false;
     }
     if (AgileHelper::copy(${${"GLOBALS"}["uhoixbgwu"]}, ${${"GLOBALS"}["uycxdjlesig"]})) {
         ${"GLOBALS"}["uxzxuqgpykx"] = "regenerate";
         $ucjtisuj = "tmpfile";
         ImageManager::resize(${$ucjtisuj}, ${${"GLOBALS"}["rknuvagqdkw"]} . ".jpg");
         ${${"GLOBALS"}["qxbybvrov"]} = ImageType::getImagesTypes(${${"GLOBALS"}["gjqlld"]});
         if (${${"GLOBALS"}["uxzxuqgpykx"]}) {
             foreach (${${"GLOBALS"}["qxbybvrov"]} as ${${"GLOBALS"}["kyfimhicw"]}) {
                 $skdnnukzy = "image_type";
                 $lcoyjhxfcii = "id_image";
                 $govxfwg = "id_entity";
                 $iperpbnwuo = "tmpfile";
                 ${"GLOBALS"}["nyaurexlr"] = "image_type";
                 ImageManager::resize(${$iperpbnwuo}, ${${"GLOBALS"}["rknuvagqdkw"]} . "-" . stripslashes(${${"GLOBALS"}["nyaurexlr"]}["name"]) . ".jpg", ${${"GLOBALS"}["kyfimhicw"]}["width"], ${$skdnnukzy}["height"]);
                 if (in_array(${${"GLOBALS"}["kyfimhicw"]}["id_image_type"], ${${"GLOBALS"}["tvorjnc"]})) {
                     Hook::exec("actionWatermark", array("id_image" => ${$lcoyjhxfcii}, "id_product" => ${$govxfwg}));
                 }
             }
         }
     } else {
         unlink(${${"GLOBALS"}["uycxdjlesig"]});
         return false;
     }
     unlink(${$llggir});
     return true;
 }
예제 #3
0
 public static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)
 {
     ${"GLOBALS"}["kpgioulf"] = "watermark_types";
     ${"GLOBALS"}["sqfbffujvchq"] = "url";
     ${"GLOBALS"}["dufhdfuni"] = "image_obj";
     ${"GLOBALS"}["ikjqcxaancv"] = "id_entity";
     ${"GLOBALS"}["rqhaxgd"] = "path";
     $kqlqvwwl = "id_image";
     $txmteutf = "tmpfile";
     $omnesyg = "url";
     $yghmlgcyfw = "entity";
     ${${"GLOBALS"}["lchvwgguggm"]} = tempnam(_PS_TMP_IMG_DIR_, "ps_import");
     ${${"GLOBALS"}["kpgioulf"]} = explode(",", Configuration::get("WATERMARK_TYPES"));
     switch (${$yghmlgcyfw}) {
         default:
         case "products":
             ${${"GLOBALS"}["dufhdfuni"]} = new Image(${$kqlqvwwl});
             ${${"GLOBALS"}["vckigj"]} = $image_obj->getPathForCreation();
             break;
         case "categories":
             ${${"GLOBALS"}["rqhaxgd"]} = _PS_CAT_IMG_DIR_ . (int) ${${"GLOBALS"}["ikjqcxaancv"]};
             break;
     }
     ${${"GLOBALS"}["qqvbhasckjhp"]} = str_replace(" ", "%20", trim(${$omnesyg}));
     if (!ImageManager::checkImageMemoryLimit(${${"GLOBALS"}["sqfbffujvchq"]})) {
         return false;
     }
     if (AgileHelper::copy(${${"GLOBALS"}["qqvbhasckjhp"]}, ${${"GLOBALS"}["lchvwgguggm"]})) {
         $obcojo = "path";
         ${"GLOBALS"}["hohhfbh"] = "tmpfile";
         ImageManager::resize(${${"GLOBALS"}["hohhfbh"]}, ${$obcojo} . ".jpg");
         ${${"GLOBALS"}["cuqvuxx"]} = ImageType::getImagesTypes(${${"GLOBALS"}["pewnwwkf"]});
         if (${${"GLOBALS"}["megrxj"]}) {
             foreach (${${"GLOBALS"}["cuqvuxx"]} as ${${"GLOBALS"}["dgxlnpegptv"]}) {
                 ${"GLOBALS"}["xvjrxhsdjlr"] = "image_type";
                 ${"GLOBALS"}["hyfkhuiwvhco"] = "id_image";
                 ${"GLOBALS"}["ygshbwcbgfb"] = "image_type";
                 $yyhyyvkc = "watermark_types";
                 ImageManager::resize(${${"GLOBALS"}["lchvwgguggm"]}, ${${"GLOBALS"}["vckigj"]} . "-" . stripslashes(${${"GLOBALS"}["xvjrxhsdjlr"]}["name"]) . ".jpg", ${${"GLOBALS"}["dgxlnpegptv"]}["width"], ${${"GLOBALS"}["ygshbwcbgfb"]}["height"]);
                 if (in_array(${${"GLOBALS"}["dgxlnpegptv"]}["id_image_type"], ${$yyhyyvkc})) {
                     Hook::exec("actionWatermark", array("id_image" => ${${"GLOBALS"}["hyfkhuiwvhco"]}, "id_product" => ${${"GLOBALS"}["uuixwodgh"]}));
                 }
             }
         }
     } else {
         ${"GLOBALS"}["xpnbdeoyymr"] = "tmpfile";
         unlink(${${"GLOBALS"}["xpnbdeoyymr"]});
         return false;
     }
     unlink(${$txmteutf});
     return true;
 }
예제 #4
0
 public static function copyImg($id_entity, $id_image = null, $url, $entity = 'products', $regenerate = true)
 {
     $hetsedmnz = "id_image";
     ${${"GLOBALS"}["xtcxfig"]} = tempnam(_PS_TMP_IMG_DIR_, "ps_import");
     $vxuskrtodd = "entity";
     ${"GLOBALS"}["tcaxxs"] = "image_obj";
     ${${"GLOBALS"}["lxqoabqde"]} = explode(",", Configuration::get("WATERMARK_TYPES"));
     $iwdsdbo = "url";
     switch (${$vxuskrtodd}) {
         default:
         case "products":
             ${${"GLOBALS"}["tcaxxs"]} = new Image(${$hetsedmnz});
             ${${"GLOBALS"}["ptxzqnpmj"]} = $image_obj->getPathForCreation();
             break;
         case "categories":
             ${${"GLOBALS"}["ptxzqnpmj"]} = _PS_CAT_IMG_DIR_ . (int) ${${"GLOBALS"}["dyvesolb"]};
             break;
     }
     ${${"GLOBALS"}["csdyhfby"]} = str_replace(" ", "%20", trim(${$iwdsdbo}));
     if (!ImageManager::checkImageMemoryLimit(${${"GLOBALS"}["csdyhfby"]})) {
         return false;
     }
     if (AgileHelper::copy(${${"GLOBALS"}["csdyhfby"]}, ${${"GLOBALS"}["xtcxfig"]})) {
         $nnigwdguyp = "regenerate";
         ${"GLOBALS"}["rozgcxxwguvw"] = "path";
         $zqegklpvlh = "images_types";
         ${"GLOBALS"}["geqkybmirty"] = "tmpfile";
         $sbksfcf = "entity";
         ImageManager::resize(${${"GLOBALS"}["geqkybmirty"]}, ${${"GLOBALS"}["rozgcxxwguvw"]} . ".jpg");
         ${$zqegklpvlh} = ImageType::getImagesTypes(${$sbksfcf});
         if (${$nnigwdguyp}) {
             $rbptppji = "images_types";
             ${"GLOBALS"}["odchrndfdfg"] = "image_type";
             foreach (${$rbptppji} as ${${"GLOBALS"}["odchrndfdfg"]}) {
                 $idbrecumec = "path";
                 ${"GLOBALS"}["jepahcfwmfp"] = "image_type";
                 ${"GLOBALS"}["lnzlycwlv"] = "watermark_types";
                 ${"GLOBALS"}["ymvwuilfnfl"] = "image_type";
                 $dsqahstlpnbe = "id_image";
                 ImageManager::resize(${${"GLOBALS"}["xtcxfig"]}, ${$idbrecumec} . "-" . stripslashes(${${"GLOBALS"}["ymvwuilfnfl"]}["name"]) . ".jpg", ${${"GLOBALS"}["jepahcfwmfp"]}["width"], ${${"GLOBALS"}["aukaouqhjy"]}["height"]);
                 if (in_array(${${"GLOBALS"}["aukaouqhjy"]}["id_image_type"], ${${"GLOBALS"}["lnzlycwlv"]})) {
                     Hook::exec("actionWatermark", array("id_image" => ${$dsqahstlpnbe}, "id_product" => ${${"GLOBALS"}["dyvesolb"]}));
                 }
             }
         }
     } else {
         $yxkqlybgrj = "tmpfile";
         unlink(${$yxkqlybgrj});
         return false;
     }
     unlink(${${"GLOBALS"}["xtcxfig"]});
     return true;
 }