/**
     *
     * @return string html header
     */
    public static function Get_Header()
    {
        $obj = DataEngine::tpl('');
        if ($obj->page_title == "") {
            $title = "EU2: Data Engine v{$obj->version}";
        } else {
            $title = $obj->page_title;
        }
        if ($obj->css_file != '') {
            $nocache = filemtime(ROOT_PATH . $obj->css_file);
            $css = <<<EOF
\t\t<link rel="stylesheet" type="text/css" href="%ROOT_URL%{$obj->css_file}?{$nocache}" media="screen" />
EOF;
        } else {
            $css = '';
        }
        if (DE_DEMO) {
            $stats = addons::getinstance()->Get_Addons('demo')->lng('stats');
        }
        $doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
        $doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
        $doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
        $doctype = '<html xmlns="http://www.w3.org/1999/html" lang="' . LNG_CODE . '" xml:lang="' . LNG_CODE . '">';
        return <<<EOF
{$doctype}
<head>
<title>{$title}</title>
{$css}
\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\t<link rel="shortcut icon" href="%BTN_URL%eude.png">
</head>
<body>
{$stats}
<script type="text/javascript" src="%INCLUDE_URL%prototype.js?1.6.1"></script>
<script type="text/javascript" src="%LNG_URL%eude.local.js?{$obj->version}"></script>
<script type="text/javascript" src="%INCLUDE_URL%Script.js?{$obj->version}"></script>
<img src="%ROOT_URL%cron.php" />
<div id="curseur" class="infobulle"></div>
<!--<div id="debug" style="z-index:8; position:fixed; visibility:visible; background-color: #C0C0C0;white-space:nowrap; top:50px; left:5px"></div>-->
%NEW_MESSAGE_ENTRY%
EOF;
    }
Beispiel #2
0
 public function RunJob()
 {
     $this->_lock();
     $now = time();
     $mysql_result = DataEngine::sql('SELECT ID FROM `SQL_PREFIX_Coordonnee` WHERE `TYPE`=1');
     while ($row = mysql_fetch_assoc($mysql_result)) {
         $tmp[] = $row['ID'];
     }
     if (is_array($tmp) && count($tmp) > 0) {
         $tmp = implode(',', $tmp);
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee` WHERE `ID` in (' . $tmp . ')');
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee_Joueurs` WHERE `jID` in (' . $tmp . ')');
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee_Planetes` WHERE `pID` in (' . $tmp . ')');
     }
     $wormhole_cleaning = array('enabled' => true, 'lastrun' => $now);
     DataEngine::conf_update('wormhole_cleaning', $wormhole_cleaning);
     DataEngine::sql_do_spool();
     // Mettre à jour maintenant, pas que deux membres le fasse a 1/2sec d'intervalle.
     addons::getinstance()->VortexCleaned();
     parent::RunJob();
 }
 /**
  * Init une classe addons
  * @return addons
  */
 public static function getinstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Beispiel #4
0
 * @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
 * @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
 *
 * */
// Constantes par défaut:
// define('IS_IMG',false);		// mode image
// define('DEBUG_IMG',false);	// demande au navigateur de ne pas afficher comme une image
// define('DEBUG_PLAIN',false);	// traitement comme étant du texte par le navigateur
// define('USE_AJAX',false);	// mode xml
// define('CHECK_LOGIN',true);	// désactive le besoin d'avoir un compte pour la page
require_once '../../init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'parser.class.php';
require_once CLASS_PATH . 'cartographie.class.php';
// Check si activé / permissions
if (!addons::getinstance()->Is_installed('wormhole_import')) {
    Members::NoPermsAndDie();
}
require_once TEMPLATE_PATH . 'sample.tpl.php';
$tpl = tpl_sample::getinstance();
$tpl->page_title = 'EU2: Vortex Import';
$BASE_FILE = ROOT_URL . "addons/wormhole_import/index.php";
if (isset($_POST['act']) && $_POST['act'] == 'import') {
    // Purge au préalable....
    define('CRON_LOADONLY', true);
    include INCLUDE_PATH . 'crontab.php';
    $cron->GetJob('job_vortex')->RunJob();
    $cron->Save();
    $vortex = explode("\n", $_POST['data']);
    $carto = cartographie::getinstance();
    foreach ($vortex as $item) {
 /**
  * Ajout d'un joueur
  * @param string $user Nom du joueur
  * @param md5 $pass pass en md5
  * @param integer $axx niveau d'accès souhaité
  * @param integer $points nombre de points
  * @param integer $grade id du grade dans l'empire
  */
 public static function NewUser($user, $md5pass, $axx = AXX_VALIDATING, $points = 0, $grade = 3)
 {
     DataEngine::sql('INSERT INTO `SQL_PREFIX_Users` VALUES(\'' . $user . '\',\'' . $md5pass . '\',' . $axx . ')');
     DataEngine::sql('INSERT INTO `SQL_PREFIX_Membres` (`Joueur`,`Points`,`Date`,`Grade`) ' . 'VALUES(\'' . sqlesc($user) . '\',\'' . $points . '\',now(),' . $grade . ')');
     addons::getinstance()->NewUser($user);
 }
Beispiel #6
0
		//Ask for Add-on instalation
			echo "<script>window.open('".$addon_id.'/releases/'.$this->xpi_file."', '_top')</script>";
			echo "<script>close()</script>";
	}	
	
}
	echo '<h1>Complex Extension builder</h1><ul>';

	$dir = dirname(__FILE__).'/';
	if ($dh = @opendir($dir)) 
	{
	   while(($file = readdir($dh)) !== false)
		{
		   if( 
		   $file != "." &&  
		   $file != ".." &&  
		   strpos($file, '.php') === false &&  
		   strpos($dir.$file, '_em/_') === false && 
		   is_dir($file) && 
		   !is_dir(dirname(__FILE__).'/'.$file.'/_dev/chrome')
		   )
				$XPIs[] = "<li><a href=\"?XPI=".$file."\">".$file."</a></li>";
	   }
	   @chdir("..");
	}
	echo implode("", $XPIs);
	
	$addon = new addons();
	if($_GET[XPI]!='')
		$addon->build_package_sin_jar($_GET[XPI]);
?>
Beispiel #7
0
    $product->attribute = $dg->getAttributes($product->attributes);
} else {
    $product->attribute = '';
}
$product->attribute .= $dg->quantity($product->min_order, lang('quantity', true), lang('min_quantity', true));
// get getSetting
$settings = $dg->getSetting();
// check cookie
if (!isset($_COOKIE['design'])) {
    $user = 0;
} else {
    $user = $_COOKIE['design'];
}
$settings->site_url = $dg->url();
// load add-on
$addons = new addons();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<title><?php 
echo setValue($settings, 'site_name', 'T-Shirt eCommerce');
?>
</title>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1, minimum-scale=0.5, maximum-scale=1.0"/>
	<meta content="<?php 
echo setValue($settings, 'meta_description', 'T-Shirt eCommerce');
?>
" name="description" />
	<meta content="<?php 
Beispiel #8
0
 **/
// Constantes par défaut:
// define('IS_IMG',false);		// mode image
// define('DEBUG_IMG',false);	// demande au navigateur de ne pas afficher comme une image
// define('DEBUG_PLAIN',false);	// traitement comme étant du texte par le navigateur
// define('USE_AJAX',false);	// mode xml
// define('CHECK_LOGIN',true);	// désactive le besoin d'avoir un compte pour la page
require_once '../../init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'map.class.php';
// requis par ownuniverse
require_once CLASS_PATH . 'parser.class.php';
// requis par ownuniverse
require_once CLASS_PATH . 'ownuniverse.class.php';
// Check si activé
if (!addons::getinstance()->Get_Addons('scanner')->CheckPerms()) {
    DataEngine::NoPermsAndDie();
}
//if (!isset ($_SESSION['scanner_email']) || $_SESSION['scanner_email'] == '')
//    $_SESSION['scanner_email'] = '*****@*****.**';
if (isset($_POST['email']) && isset($_POST['session'])) {
    $_SESSION['scanner_email'] = gpc_esc($_POST['email']);
    $_SESSION['scanner_session'] = gpc_esc($_POST['session']);
}
$ScannerEnabled = isset($_SESSION['scanner_email']) && isset($_SESSION['scanner_session']) && $_SESSION['scanner_email'] != '' && $_SESSION['scanner_session'] != '';
require_once TEMPLATE_PATH . 'sample.tpl.php';
$tpl = tpl_sample::getinstance();
$tpl->css_file = false;
$tpl->page_title = 'EU2: Addons scanner';
$out = <<<form
<form name="settings" action="index.php" method="POST">
Beispiel #9
0
// Ajout des vortex dans la base...
require_once CLASS_PATH . 'cartographie.class.php';
// Ajout des vortex dans la base...
require_once './inc.php';
// Check si activé
if (!addons::getinstance()->Is_installed('scanner')) {
    DataEngine::NoPermsAndDie();
}
header('Content-Type: text/html;charset=utf-8');
error_reporting(E_ALL);
FB::setEnabled(false);
ob_end_flush();
if (!isset($_GET['id']) || !isset($_GET['step']) || !isset($_SESSION['scanner_email']) || !isset($_SESSION['scanner_session']) || $_SESSION['scanner_email'] == '' || $_SESSION['scanner_session'] == '') {
    DataEngine::ErrorAndDie('Paramètre(s) manquant(s)');
}
$scanner = addons::getinstance()->Get_Addons('scanner');
$host = $scanner->ScanServer();
$header = 'Cookie: login_email=' . str_replace('@', '%40', $_SESSION['scanner_email']) . '; testcookie=1; PHPSESSID=' . $_SESSION['scanner_session'] . "\r\n";
$nbplanets = 0;
$skipnb = intval($_GET['step']);
$skipnext = $skipnb + 1;
$carto = cartographie::getinstance();
if (isset($_GET['ss']) && $_GET['ss'] != '') {
    $coord = $_GET['ss'];
} else {
    $coord = ownuniverse::getinstance()->get_comlevel();
    $coord = $coord[intval($_GET['id'])]['ss'];
}
$coords = map::getinstance()->Parcours()->GetListeCoorByRay($coord, $scanner->ScanRay('planets'));
$maxpage = count($coords) - 1;
$curcoord = $coords[$skipnb];
Beispiel #10
0
    }
    $img = img::Create($width, $height)->FillAlphaHexa($alphacolor);
    $img->font = $fontfile;
    $img->SetColorHexa($textcolor);
    if ($key == 'eude') {
        $img->Text($text, 0, 8, $fontsize);
    } else {
        $img->CenteredText($text, $fontsize);
    }
    //-- Fin partie personalisable. ------------------------------------------------
    $img->SaveAs($key . '.png')->Render();
}
include_once '../../../../init.php';
include_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie(AXX_ROOTADMIN);
addons::getinstance()->ButtonRegen($listing, $defaultsetting);
if (isset($_GET['ident'])) {
    include CLASS_PATH . 'img.class.php';
    do_btn(gpc_esc($_GET['ident']));
} else {
    include TEMPLATE_PATH . 'sample.tpl.php';
    $tpl = tpl_sample::getinstance();
    $files = scandir('./');
    foreach ($files as $file) {
        if (p_substr($file, -4) == '.png') {
            unlink($file);
        }
    }
    foreach ($listing as $key => $dummy) {
        $tpl->PushOutput('<span class="color_header"> &#37;BTN_URL%' . $key . '.png </span><img src="./gen.php?ident=' . $key . '&' . time() . '"/><br/>');
    }
    $product->attribute = $dg->getAttributes($product->attributes);
} else {
    $product->attribute = '';
}
$product->attribute .= $dg->quantity($product->min_order, lang('quantity', true), lang('min_quantity', true));
// get getSetting
$settings = $dg->getSetting();
// check cookie
if (!isset($_COOKIE['design'])) {
    $user = 0;
} else {
    $user = $_COOKIE['design'];
}
$settings->site_url = $dg->url();
// load add-on
$addons = new addons();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<title><?php 
echo setValue($settings, 'site_name', 'T-Shirt eCommerce');
?>
</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1, minimum-scale=0.5, maximum-scale=1.0"/>
	<meta content="<?php 
echo setValue($settings, 'meta_description', 'T-Shirt eCommerce');
?>
" name="description" />
Beispiel #12
0
    public function DoOutput($login_msg = '', $register = false)
    {
        if (DataEngine::config_key('config', 'closed')) {
            $closedhtml = <<<ch
\t<tr class="text_center color_header">
\t\t<td colspan="3">{$this->lng['currently_closed']}</td>
\t</tr>
ch;
            $register = false;
        } else {
            $closedhtml = '';
        }
        $action = $register ? $this->BASE_FILE : '?' . Get_string();
        $btn_text = $register ? $this->lng['register'] : $this->lng['signin'];
        $out = <<<BASE
<CENTER>
    <form name="LOG" method="post" action="{$action}">
\t<table class="table_nospacing color_bg">
\t<tr class="text_center color_bigheader">
\t\t<!-- Ne pas modifier -->
\t\t<td colspan="3">Empire Universe 2: Data Engine ({$this->version})<br/><br/></td>
\t\t<!-- Ne pas modifier /-->
\t</tr>
                {$closedhtml}
\t<tr class="color_row0">
\t\t<td>{$this->lng['player']} :</td>
\t\t<td><input class="color_row0" tabindex=1 type="text" value="" name="login" /></td>
\t\t<td rowspan=2 style='valign=center'><input class="color_row0" type="submit" value="{$btn_text}" /></td>
\t</tr>
\t<tr class="color_row0">
\t\t<td>{$this->lng['password']} :</td>
\t\t<td><input class="color_row0" tabindex=2 type="password" value="" name="mdp" /></td>
\t</tr>
BASE;
        if (DE_DEMO) {
            $out .= addons::getinstance()->Get_Addons('demo')->lng('login');
        }
        if (!$register && DataEngine::config_key('config', 'CanRegister') && !DataEngine::config_key('config', 'closed')) {
            $out .= <<<LOGIN
\t<tr class="color_row0 text_center">
\t\t<td colspan=3><a href='%ROOT_URL%register.php'>{$this->lng['newaccount']}</a></td>
\t</tr>
LOGIN;
        } elseif ($register) {
            $out .= <<<REGISTER
\t<tr>
\t\t<td colspan=3 align=center>{$this->lng['newaccount_warn']}<br/>
\t\t\t<input class="color_row0" type="button" value="{$this->lng['allreadyhaveone']}" Onclick="location.href='./logout.php'" /></td>
\t</tr>
REGISTER;
        }
        if ($login_msg) {
            $out .= <<<MSG
\t<tr>
\t\t<td colspan=3 id='titreTDtableau'><font color=red>{$login_msg}</font></td>
\t</tr>
MSG;
        }
        $out .= <<<FOOTER
                {$login_msg}
\t</table>
    </form>
</CENTER>
<!-- Ne pas modifier -->
<div style="position:absolute; bottom:5px; right:5px">
<address>
- Site officiel & support du <a href="https://code.google.com/p/eude/" target="_top" title="Site officiel">Data Engine</a><br/>
- <a href="https://code.google.com/p/eude/downloads/list" target="_top" title="Téléchargement">Téléchargement</a>
</address>
</div>
<!-- Ne pas modifier /-->
</body></html>
FOOTER;
        $this->PushOutput($out);
        parent::DoOutput(false);
        // false false ? menu header
    }
Beispiel #13
0
    $product->attribute = $dg->getAttributes($product->attributes);
} else {
    $product->attribute = '';
}
$product->attribute .= $dg->quantity($product->min_order, lang('quantity', true), lang('min_quantity', true));
// get getSetting
$settings = $dg->getSetting();
// check cookie
if (!isset($_COOKIE['design'])) {
    $user = 0;
} else {
    $user = $_COOKIE['design'];
}
$settings->site_url = $dg->url();
// load add-on
$addons = new addons();
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<title><?php 
echo setValue($settings, 'site_name', 'T-Shirt eCommerce');
?>
</title>		
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1, minimum-scale=0.5, maximum-scale=1.0"/>
	<meta content="<?php 
echo setValue($settings, 'site_name', 'T-Shirt eCommerce');
?>
" name="description" />
	<meta content="<?php 
// requis par ownuniverse
require_once './fonction.php';
// les cinq planètes
$Planete1 = 1;
$Planete2 = 2;
$Planete3 = 3;
$Planete4 = 4;
$Planete5 = 5;
$Pla1 = false;
$Pla2 = false;
$Pla3 = false;
$Pla4 = false;
$Pla5 = false;
//Check si activé
$coordvalid = false;
if (!addons::getinstance()->Get_Addons('triangulation')->CheckPerms()) {
    DataEngine::NoPermsAndDie();
}
// Si les coordonnées de deux centre de communications avec deux mesure de distance correspondante sont rentrée dans le tableau alors $coordvalid = true;
if (isset($_POST['sys1']) && isset($_POST['sys2']) && isset($_POST['dist11']) && isset($_POST['dist21']) || isset($_POST['sys1']) && isset($_POST['sys3']) && isset($_POST['dist11']) && isset($_POST['dist31']) || isset($_POST['sys3']) && isset($_POST['sys2']) && isset($_POST['dist31']) && isset($_POST['dist21'])) {
    $_SESSION['coord_syst1'] = gpc_esc($_POST['sys1']);
    $_SESSION['coord_syst2'] = gpc_esc($_POST['sys2']);
    $_SESSION['coord_syst3'] = gpc_esc($_POST['sys3']);
    $_SESSION['ccdistance11'] = gpc_esc($_POST['dist11']);
    $_SESSION['ccdistance21'] = gpc_esc($_POST['dist21']);
    $_SESSION['ccdistance31'] = gpc_esc($_POST['dist31']);
    $coordvalid = true;
    // Faire des calculs que s'il y a une entrée
    $Pla1 = $_SESSION['coord_syst1'] != "" && $_SESSION['coord_syst2'] != "" && $_SESSION['ccdistance11'] != "" && $_SESSION['ccdistance21'] != "" || $_SESSION['coord_syst1'] != "" && $_SESSION['coord_syst3'] != "" && $_SESSION['ccdistance11'] != "" && $_SESSION['ccdistance31'] != "" || $_SESSION['coord_syst3'] != "" && $_SESSION['coord_syst2'] != "" && $_SESSION['ccdistance31'] != "" && $_SESSION['ccdistance21'] != "";
    $dist11 = $_SESSION['ccdistance11'];
    $dist21 = $_SESSION['ccdistance21'];
Beispiel #15
0
 public function addCart($data)
 {
     // get data post
     $product_id = $data['product_id'];
     $colors = $data['colors'];
     $print = $data['print'];
     $quantity = $data['quantity'];
     // get attribute
     if (isset($data['attribute'])) {
         $attribute = $data['attribute'];
     } else {
         $attribute = false;
     }
     if ($quantity < 1) {
         $quantity = 1;
     }
     $time = strtotime("now");
     if (isset($data['cliparts'])) {
         $cliparts = $data['cliparts'];
     } else {
         $cliparts = false;
     }
     $content = array();
     $content['error'] = 1;
     // load product
     $products = $this->getProducts();
     $product = false;
     for ($i = 0; $i < count($products); $i++) {
         if ($product_id == $products[$i]->id) {
             $product = $products[$i];
             break;
         }
     }
     if ($product === false) {
         $content['msg'] = 'Product could not be found';
     } else {
         $content['error'] = 0;
         // load cart
         include_once ROOT . DS . 'includes' . DS . 'cart.php';
         $cart = new dgCart();
         $post = array('colors' => $colors, 'print' => $print, 'attribute' => $attribute, 'quantity' => $quantity, 'product_id' => $product_id);
         // load setting
         $setting = $this->getSetting();
         include_once ROOT . DS . 'includes' . DS . 'addons.php';
         $addons = new addons();
         $params = array('data' => $data, 'product' => $product, 'setting' => $setting);
         $addons->view('hooks' . DS . 'product', $params);
         $result = $cart->totalPrice($product, $post, $setting);
         $params = array('data' => $data, 'product' => $product, 'setting' => $setting, 'result' => $result);
         $addons->view('hooks' . DS . 'fields', $params);
         $result->product = new stdClass();
         $result->product->name = $product->title;
         $result->product->sku = $product->sku;
         // get cliparts
         $clipartsPrice = array();
         if (isset($data['cliparts']) && count($data['cliparts']) > 0) {
             $clipartsPrice = $cart->getPriceArt($data['cliparts']);
         }
         $result->cliparts = $clipartsPrice;
         $total = new stdClass();
         $total->old = $result->price->colors + $result->price->prints;
         $print_discount = 0;
         // 2015.11.21
         if (isset($result->price->print_discount)) {
             $print_discount = $result->price->print_discount;
         }
         // 2015.11.21
         $total->sale = $result->price->colors + $result->price->prints - $print_discount;
         // 2015.11.21
         if (count($result->cliparts)) {
             foreach ($result->cliparts as $id => $amount) {
                 $total->old = $total->old + $amount;
                 $total->sale = $total->sale + $amount;
             }
         }
         if (empty($result->price->attribute)) {
             $result->price->attribute = 0;
         }
         $total->old = ($total->old + $result->price->attribute) * $quantity;
         $total->sale = ($total->sale + $result->price->attribute) * $quantity;
         $result->total = $total;
         // get symbol
         if (!isset($setting->currency_symbol)) {
             $setting->currency_symbol = '$';
         }
         $result->symbol = $setting->currency_symbol;
         // save file image design
         $path = $this->folder();
         $design = array();
         $design['images'] = array();
         if (isset($data['design']['images']['front'])) {
             $design['images']['front'] = $this->createFile($data['design']['images']['front'], $path, 'cart-front-' . $time);
         }
         if (isset($data['design']['images']['back'])) {
             $design['images']['back'] = $this->createFile($data['design']['images']['back'], $path, 'cart-back-' . $time);
         }
         if (isset($data['design']['images']['left'])) {
             $design['images']['left'] = $this->createFile($data['design']['images']['left'], $path, 'cart-left-' . $time);
         }
         if (isset($data['design']['images']['right'])) {
             $design['images']['right'] = $this->createFile($data['design']['images']['right'], $path, 'cart-right-' . $time);
         }
         if (empty($result->options)) {
             $result->options = array();
         }
         if (isset($data['teams'])) {
             $teams = $data['teams'];
         } else {
             $teams = '';
         }
         $params = array('data' => $data, 'result' => $result, 'design' => $design, 'setting' => $setting);
         $addons->view('hooks' . DS . 'cart', $params);
         // add cart
         $item = array('id' => $result->product->sku, 'product_id' => $data['product_id'], 'qty' => $data['quantity'], 'teams' => $teams, 'price' => $result->total->sale, 'prices' => json_encode($result->price), 'cliparts' => json_encode($result->cliparts), 'symbol' => $result->symbol, 'customPrice' => $result->price->attribute, 'name' => $result->product->name, 'time' => $time, 'options' => $result->options);
         $rowid = md5($result->product->sku . $time);
         $cache = $this->cache('cart');
         $designs = array('color' => $data['colors'][key($data['colors'])], 'images' => $design['images'], 'vector' => $data['design']['vectors'], 'fonts' => $data['fonts'], 'item' => $item);
         $cache->set($rowid, $designs);
         $price_product = $result->total->sale / $quantity;
         $content['product'] = array('rowid' => $rowid, 'price' => $price_product, 'quantity' => $quantity, 'color_hex' => $data['colors'][key($data['colors'])], 'color_title' => $product->design->color_title[key($data['colors'])], 'images' => json_encode($design['images']), 'teams' => $teams, 'options' => $result->options);
     }
     return $content;
 }
 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;
                 $ij++;
             }
 /**
  * Génère la page
  * @param boolean,array $include_menu Inclure le menu ?
  * @param boolean $include_header Inclure l'entete ?
  */
 public function DoOutput($include_menu = true, $include_header = true)
 {
     if (!USE_AJAX) {
         if ($include_menu) {
             include_once TEMPLATE_PATH . 'menu.tpl.php';
             if (is_array($include_menu)) {
                 $menu = addons::getinstance()->Parse_Menu($include_menu);
             } else {
                 $menu = addons::getinstance()->Parse_Menu(tpl_menu::DefaultMenu());
             }
             $this->ShiftOutput(tpl_menu::Gen_Menu($menu));
         }
         if ($include_header) {
             include_once TEMPLATE_PATH . 'header.tpl.php';
             $this->ShiftOutput(tpl_header::Get_Header());
             tpl_header::messager($this->output, $_SESSION['messager']);
         }
     }
     output::_DoOutput($this->output);
 }