コード例 #1
0
ファイル: myfiles.php プロジェクト: Eximagen/3m
 public function initContent()
 {
     $module = new orderfiles();
     $this->var = $module->getconf();
     parent::initContent();
     $order = new OrderCore();
     $custorders = $order->getCustomerOrders($this->context->customer->id);
     $this->context->smarty->assign(array('mod' => $this, 'setup' => $this->var, 'orders' => $custorders, 'link' => $this->context->link, 'psversion' => $module->psversion(), 'customer' => $this->context->customer));
     $this->setTemplate('my-files.tpl');
 }
コード例 #2
0
ファイル: orderfilestab14.php プロジェクト: Eximagen/3m
 public function __construct()
 {
     $module = new orderfiles();
     if ($module->psversion() == 5) {
         $this->context = Context::getContext();
         $this->multishop_context = $this->context->shop->id;
         $this->multishop_context_group = $this->context->shop->id_shop_group;
     }
     $this->orderfiles = new orderfiles();
     return parent::__construct();
 }
コード例 #3
0
ファイル: upload.php プロジェクト: Eximagen/3m
<?php

require_once "../../../config/config.inc.php";
require_once "../orderfiles.php";
$module = new orderfiles();
if ($module->psversion() == 5) {
    if (isset(Context::getContext()->controller)) {
        $controller = Context::getContext()->controller;
    } else {
        $controller = new FrontController();
        $controller->ssl = true;
        $controller->init();
    }
} else {
    require_once dirname(__FILE__) . '/../../../init.php';
}
if (isset($_POST['auptype'])) {
    if ($_POST['auptype'] == "product") {
        if (isset($_FILES["file"])) {
            $ret = array();
            $error = $_FILES["file"]["error"];
            if (!is_array($_FILES["file"]["name"])) {
                if (!isset($_COOKIE['ftpr'])) {
                    $cookieid = date("U") . $module->generatekey(5, "abcdfghijklmnouprstuwxyz1234567890");
                    setcookie("ftpr", $cookieid, time() + 86400, "/");
                    $module->insertfilestoproduct($_POST, $_FILES, $cookieid, 1);
                } else {
                    $cookieid = $_COOKIE['ftpr'];
                    $module->insertfilestoproduct($_POST, $_FILES, $cookieid, 1);
                }
            } else {