// create folder of order
 $path = ROOT . DS . 'uploaded' . DS . 'orders';
 if (!file_exists($path)) {
     mkdir($path, 0755);
 }
 if (isset($_GET['order'])) {
     $order = $_GET['order'];
 } else {
     $order = $_GET['key'];
 }
 $tempPath = explode(':', $order);
 $path = $path . DS . $tempPath[1];
 if (!file_exists($path)) {
     mkdir($path, 0755);
 }
 $setting = $dg->getSetting();
 include_once ROOT . DS . 'includes' . DS . 'addons.php';
 $addons = new addons();
 $addons->view('hooks' . DS . 'download');
 $file_name = $position . '-' . rand() . '.svg';
 $dg->WriteFile($path . DS . $file_name, $svg);
 if ($file == 'svg') {
     if (!empty($_GET['download'])) {
         // zip files
         if (count($files)) {
             $ij = 0;
             foreach ($files as $file) {
                 $string = str_replace($dg->url(), '', $file);
                 $string = str_replace('/', DS, $string);
                 $string = dirname(ROOT) . DS . $string;
                 $array[$ij] = $string;
Beispiel #2
0
/**
 * @author tshirtecommerce - www.tshirtecommerce.com
 * @date: 2015-09-03
 * 
 * @copyright  Copyright (C) 2015 tshirtecommerce.com. All rights reserved.
 * @license	   GNU General Public License version 2 or later; see LICENSE
 *
 */
error_reporting(0);
define('ROOT', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);
include_once ROOT . DS . 'includes' . DS . 'functions.php';
$dg = new dg();
$lang = $dg->lang();
$settings = $dg->getSetting();
$base_url = $dg->url();
$params = explode('sharing.php/', $_SERVER['REQUEST_URI']);
if (count($params) > 1) {
    $design_id = $params[1];
    $url = $base_url . 'tshirtecommerce/sharing.php/' . $design_id;
} else {
    $design_id = '';
    $url = $base_url;
}
if ($design_id != '') {
    $cache = $dg->cache('design');
    $params = explode(':', $design_id);
    $user_id = $cache->get($params[0]);
    if ($user_id != false && count($user_id[$params[1]]) > 0) {
        $data = $user_id[$params[1]];