Exemple #1
0
        parse_str($strAuth, $res);
        if (!isset($res['error']) || $res['error'] != '0') {
            //echo '取號錯誤'.$res['error'];
            $smarty->assign(array('Error' => $res['error']));
            session_unregister("checkStep");
            session_destroy();
            echo "ERROR:" . $res['error'];
            //echo Module::display('greenworld','payErrorPage.tpl');
        } else {
            //echo '交易單號: '.$res['tsr'];
            //echo '銀行代碼: '.$res['bankcode'];
            //echo '銀行帳戶: '.$res['vaccno'];
            $finishURL = __PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . (int) $cart->id . '&id_module=' . (int) $CheckPay->id . '&id_order=' . (int) $CheckPay->currentOrder;
            $finishURL .= "&tsr=" . $res['tsr'];
            $finishURL .= "&mer_id=" . $res['mer_id'];
            $finishURL .= "&expire_date=" . $res['expire_date'];
            session_unregister("checkStep");
            session_destroy();
            Tools::redirectLink($finishURL);
            //echo Module::display('greenworld','thankyouPage.tpl');
        }
    } else {
        echo Module::display(_iMODULE_NAME_ECPAY6_, 'ErrorStep.tpl');
        session_unregister("checkStep");
        session_destroy();
    }
}
include dirname(__FILE__) . '/../../footer.php';
?>

    if (Tools::getValue('friendChecked') and sizeof($friendsChecked = Tools::getValue('friendChecked')) >= 1) {
        foreach ($friendsChecked as $key => $friendChecked) {
            if (ReferralProgramModule::isSponsorFriend((int) $cookie->id_customer, (int) $friendChecked)) {
                if (Configuration::get('PS_CIPHER_ALGORITHM')) {
                    $cipherTool = new Rijndael(_RIJNDAEL_KEY_, _RIJNDAEL_IV_);
                } else {
                    $cipherTool = new Blowfish(_COOKIE_KEY_, _COOKIE_IV_);
                }
                $referralprogram = new ReferralProgramModule((int) $key);
                $vars = array('{email}' => $cookie->email, '{lastname}' => $cookie->customer_lastname, '{firstname}' => $cookie->customer_firstname, '{email_friend}' => $referralprogram->email, '{lastname_friend}' => $referralprogram->lastname, '{firstname_friend}' => $referralprogram->firstname, '{link}' => 'authentication.php?create_account=1&sponsor=' . base64_encode($cipherTool->encrypt($referralprogram->id . '|' . $referralprogram->email . '|')), '{discount}' => $discount);
                $referralprogram->save();
                Mail::Send((int) $cookie->id_lang, 'referralprogram-invitation', Mail::l('Referral Program'), $vars, $referralprogram->email, $referralprogram->firstname . ' ' . $referralprogram->lastname, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__) . '/mails/');
                $revive_sent = true;
                $nbRevive++;
            }
        }
    } else {
        $error = 'no revive checked';
    }
}
$customer = new Customer((int) $cookie->id_customer);
$stats = $customer->getStats();
$orderQuantity = (int) Configuration::get('REFERRAL_ORDER_QUANTITY');
$canSendInvitations = false;
if ((int) $stats['nb_orders'] >= $orderQuantity) {
    $canSendInvitations = true;
}
// Smarty display
$smarty->assign(array('activeTab' => $activeTab, 'discount' => $discount, 'orderQuantity' => $orderQuantity, 'canSendInvitations' => $canSendInvitations, 'nbFriends' => (int) Configuration::get('REFERRAL_NB_FRIENDS'), 'error' => $error, 'invitation_sent' => $invitation_sent, 'nbInvitation' => $nbInvitation, 'pendingFriends' => ReferralProgramModule::getSponsorFriend((int) $cookie->id_customer, 'pending'), 'revive_sent' => $revive_sent, 'nbRevive' => $nbRevive, 'subscribeFriends' => ReferralProgramModule::getSponsorFriend((int) $cookie->id_customer, 'subscribed'), 'mails_exists' => isset($mails_exists) ? $mails_exists : array()));
echo Module::display(dirname(__FILE__) . '/referralprogram.php', 'referralprogram-program.tpl');
include dirname(__FILE__) . '/../../footer.php';
<?php

include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../header.php';
/* or ask for confirmation */
$smarty->assign(array('total' => $cart->getOrderTotal(true, Cart::BOTH), 'urlBase' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__, 'transaccionId' => date("YmdHis"), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/blockwebpay/'));
$smarty->assign('this_path', __PS_BASE_URI__ . 'modules/blockwebpay/');
$template = 'validation.tpl';
echo Module::display('blockwebpay', $template);
include dirname(__FILE__) . '/../../footer.php';
Exemple #4
0
        parse_str($strAuth, $res);
        if (!isset($res['error']) || $res['error'] != '0') {
            //echo '取號錯誤'.$res['error'];
            $smarty->assign(array('Error' => $res['error']));
            session_unregister("checkStep");
            session_destroy();
            echo "ERROR:" . $res['error'];
            //echo Module::display('greenworld','payErrorPage.tpl');
        } else {
            //echo '交易單號: '.$res['tsr'];
            //echo '銀行代碼: '.$res['bankcode'];
            //echo '銀行帳戶: '.$res['vaccno'];
            $finishURL = __PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . (int) $cart->id . '&id_module=' . (int) $CheckPay->id . '&id_order=' . (int) $CheckPay->currentOrder;
            $finishURL .= "&tsr=" . $res['tsr'];
            $finishURL .= "&mer_id=" . $res['mer_id'];
            $finishURL .= "&expire_date=" . $res['expire_date'];
            session_unregister("checkStep");
            session_destroy();
            Tools::redirectLink($finishURL);
            //echo Module::display('greenworld','thankyouPage.tpl');
        }
    } else {
        echo Module::display(_iMODULE_NAME_WEBATM_, 'ErrorStep.tpl');
        session_unregister("checkStep");
        session_destroy();
    }
}
include dirname(__FILE__) . '/../../footer.php';
?>

<?php

require_once dirname(__FILE__) . '/../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../init.php';
if (!Tools::getValue('width') and !Tools::getValue('height')) {
    require_once dirname(__FILE__) . '/../../header.php';
}
$xmlFile = _PS_MODULE_DIR_ . 'referralprogram/referralprogram.xml';
if (file_exists($xmlFile)) {
    if ($xml = @simplexml_load_file($xmlFile)) {
        $smarty->assign(array('xml' => $xml, 'paragraph' => 'paragraph_' . $cookie->id_lang));
    }
}
echo Module::display(dirname(__FILE__) . '/referralprogram', 'referralprogram-rules.tpl');
if (!Tools::getValue('width') and !Tools::getValue('height')) {
    require_once dirname(__FILE__) . '/../../footer.php';
}
    }
    $payment['expire_date'] = null;
    if (isset($payment['expire_month'])) {
        $payment['expire_month'] = $payment['expire_month'] <= 9 ? '0' . $payment['expire_month'] : $payment['expire_month'];
        $payment['expire_date'] = $payment['expire_month'] . "/" . $payment['expire_year'];
    }
}
$currency = Currency::getCurrency((int) $cart->id_currency);
$_SESSION['pigmbhPaymill']['authorizedAmount'] = (int) round($cart->getOrderTotal(true, Cart::BOTH) * 100);
$brands = array();
foreach (json_decode(Configuration::get('PIGMBH_PAYMILL_ACCEPTED_BRANDS'), true) as $brandKey => $brandValue) {
    $brands[str_replace('-', '', $brandKey)] = $brandValue;
}
$data = array('nbProducts' => $cart->nbProducts(), 'cust_currency' => $cart->id_currency, 'currency_iso' => $currency['iso_code'], 'total' => $_SESSION['pigmbhPaymill']['authorizedAmount'], 'displayTotal' => $cart->getOrderTotal(true, Cart::BOTH), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/pigmbhpaymill/', 'public_key' => Configuration::get('PIGMBH_PAYMILL_PUBLICKEY'), 'paymill_sepa' => Configuration::get('PIGMBH_PAYMILL_SEPA') == 'on', 'payment' => Tools::getValue('payment'), 'paymill_debugging' => Configuration::get('PIGMBH_PAYMILL_DEBUG') == 'on', 'components' => _PS_BASE_URL_ . __PS_BASE_URI__ . 'modules/pigmbhpaymill/components/', 'customer' => $customer['firstname'] . " " . $customer['lastname'], 'prefilledFormData' => $payment, 'acceptedBrands' => Configuration::get('PIGMBH_PAYMILL_ACCEPTED_BRANDS'), 'acceptedBrandsDecoded' => $brands);
$smarty->assign($data);
echo Module::display('pigmbhpaymill', 'views/templates/front/paymentForm.tpl');
include dirname(__FILE__) . '/../../footer.php';
function validateClient($clientId)
{
    $clientObject = new Services_Paymill_Clients(Configuration::get('PIGMBH_PAYMILL_PRIVATEKEY'), "https://api.paymill.com/v2/");
    return validatePaymillId($clientObject, $clientId);
}
function validatePayment($paymentId)
{
    $paymentObject = new Services_Paymill_Payments(Configuration::get('PIGMBH_PAYMILL_PRIVATEKEY'), "https://api.paymill.com/v2/");
    return validatePaymillId($paymentObject, $paymentId);
}
function validatePaymillId($object, $id)
{
    $isValid = false;
    $objectResult = $object->getOne($id);
Exemple #7
0
<?php

require_once dirname(__FILE__) . '/../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../init.php';
if (!Tools::getValue('width') and !Tools::getValue('height')) {
    require_once dirname(__FILE__) . '/../../header.php';
}
$iso_code = Tools::strtoupper(Language::getIsoById($cookie->id_lang ? intval($cookie->id_lang) : 1));
$smarty->assign('iso_code', Tools::strtolower($iso_code));
echo Module::display(dirname(__FILE__) . '/paypalapi', 'about.tpl');
if (!Tools::getValue('width') and !Tools::getValue('height')) {
    require_once dirname(__FILE__) . '/../../footer.php';
}
Exemple #8
0
<?php

include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../header.php';
include dirname(__FILE__) . '/cashondelivery.php';
$confirm = Tools::getValue('confirm');
/* Validate order */
if ($confirm) {
    $customer = new Customer(intval($cart->id_customer));
    $cashOnDelivery = new CashOnDelivery();
    $total = $cart->getOrderTotalLC(true, 3);
    $cashOnDelivery->validateOrder(intval($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName);
    $order = new Order(intval($cashOnDelivery->currentOrder));
    Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . intval($cart->id) . '&id_module=' . intval($cashOnDelivery->id) . '&id_order=' . intval($cashOnDelivery->currentOrder));
} else {
    /* or ask for confirmation */
    $smarty->assign(array('total' => number_format($cart->getOrderTotalLC(true, 3), 2, '.', ''), 'this_path_ssl' => (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://') . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8') . __PS_BASE_URI__ . 'modules/cashondelivery/'));
    $smarty->assign('this_path', __PS_BASE_URI__ . 'modules/cashondelivery/');
    echo Module::display(__FILE__, 'validation.tpl');
}
include dirname(__FILE__) . '/../../footer.php';
    // + 1 year
    $voucher->minimal = 0;
    $voucher->active = 1;
    $languages = Language::getLanguages(true);
    $default_text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', intval(Configuration::get('PS_LANG_DEFAULT')));
    foreach ($languages as $language) {
        $text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', intval($language['id_lang']));
        $voucher->description[intval($language['id_lang'])] = $text ? strval($text) : strval($default_text);
    }
    $voucher->save();
    /* register order(s) which contribute to create this voucher */
    LoyaltyModule::registerDiscount($voucher);
    Tools::redirect('modules/loyalty/loyalty-program.php');
}
include dirname(__FILE__) . '/../../header.php';
$orders = LoyaltyModule::getAllByIdCustomer(intval($cookie->id_customer), intval($cookie->id_lang));
$smarty->assign(array('orders' => $orders, 'totalPoints' => $customerPoints, 'voucher' => LoyaltyModule::getVoucherValue($customerPoints, intval($cookie->id_currency)), 'validation_id' => LoyaltyStateModule::getValidationId(), 'transformation_allowed' => $customerPoints > 0));
/* Discounts */
$nbDiscounts = 0;
$discounts = array();
if ($ids_discount = LoyaltyModule::getDiscountByIdCustomer(intval($cookie->id_customer))) {
    $nbDiscounts = count($ids_discount);
    foreach ($ids_discount as $key => $discount) {
        $discounts[$key] = new Discount($discount['id_discount'], intval($cookie->id_lang));
        $discounts[$key]->date_add = $discount['date_add'];
        $discounts[$key]->orders = LoyaltyModule::getOrdersByIdDiscount($discount['id_discount']);
    }
}
$smarty->assign(array('nbDiscounts' => $nbDiscounts, 'discounts' => $discounts));
echo Module::display(dirname(__FILE__) . '/loyalty.php', 'loyalty.tpl');
include dirname(__FILE__) . '/../../footer.php';
Exemple #10
0
<?php

require_once dirname(__FILE__) . '/../../config/config.inc.php';
require_once dirname(__FILE__) . '/../../init.php';
include_once dirname(__FILE__) . '/orderfiles.php';
$orderfiles = new orderfiles();
$setup = $orderfiles->getconf();
global $cookie;
include dirname(__FILE__) . '/../../header.php';
if (!$cookie->isLogged()) {
    Tools::redirect('authentication.php?back=modules/orderfiles/myfiles14.php');
} else {
    $order = new OrderCore();
    $custorders = $order->getCustomerOrders($cookie->id_customer);
    global $smarty;
    $smarty->assign('this_path', __PS_BASE_URI__ . 'modules/' . $orderfiles->name . '/');
    $smarty->assign('mod', $orderfiles);
    $smarty->assign('setup', $setup);
    $smarty->assign('orders', $custorders);
    if ($orderfiles->psversion() == 4) {
        echo Module::display(dirname(__FILE__) . '/orderfiles.php', 'my-files14.tpl');
    }
}
include dirname(__FILE__) . '/../../footer.php';
Exemple #11
0
    
    $smarty->assign(array(  'mer_id'        =>  $CheckPay->getShopCode(),
                            'payment_type'  =>  $CheckPay->getPaymentType(),
                            'amt'           =>  $inttotal,
                            "od_sob"        =>  $CheckPay->currentOrder,
                            "URL"           =>  $CheckPay->getBaseURL(),
                            "return_url"    =>  "http://".$_SERVER["HTTP_HOST"].__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)($cart->id).'&id_module='.(int)$CheckPay->id.'&id_order='.(int)$CheckPay->currentOrder,
                            "item_name"     =>  "TEST",
                            "cancel_url"    =>  "http://".$_SERVER["HTTP_HOST"].__PS_BASE_URI__,
                            "cur_type"    =>  "TWD",
        ));
    echo Module::display(_iMODULE_NAME_PAYPAL_,'sentToPayPal.tpl');
    

    
    
    


    
}else{
    echo Module::display(_iMODULE_NAME_PAYPAL_,'ErrorStep.tpl');
    session_unregister("checkStep");
    session_destroy();
 
}
include(dirname(__FILE__).'/../../footer.php');

?>

<?php

include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../header.php';
include dirname(__FILE__) . '/cashondelivery.php';
$cashOnDelivery = new CashOnDelivery();
if ($cart->id_customer == 0 or $cart->id_address_delivery == 0 or $cart->id_address_invoice == 0 or !$cashOnDelivery->active) {
    Tools::redirectLink(__PS_BASE_URI__ . 'order.php?step=1');
}
/* Validate order */
if (Tools::getValue('confirm')) {
    $customer = new Customer(intval($cart->id_customer));
    $total = $cart->getOrderTotal(true, 3);
    $cashOnDelivery->validateOrder(intval($cart->id), _PS_OS_PREPARATION_, $total, $cashOnDelivery->displayName);
    $order = new Order(intval($cashOnDelivery->currentOrder));
    Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . intval($cart->id) . '&id_module=' . intval($cashOnDelivery->id) . '&id_order=' . intval($cashOnDelivery->currentOrder));
} else {
    /* or ask for confirmation */
    $smarty->assign(array('total' => $cart->getOrderTotal(true, 3), 'this_path_ssl' => Tools::getHttpHost(true, true) . __PS_BASE_URI__ . 'modules/cashondelivery/'));
    $smarty->assign('this_path', __PS_BASE_URI__ . 'modules/cashondelivery/');
    $template = 'validation.tpl';
    if (file_exists(_PS_THEME_DIR_ . 'modules/cashondelivery/' . $template)) {
        echo Module::display('cashondelivery', $template);
    } else {
        echo Module::display(__FILE__, $template);
    }
}
include dirname(__FILE__) . '/../../footer.php';
Exemple #13
0
        parse_str($strAuth, $res);
        if (!isset($res['error']) || $res['error'] != '0') {
            //echo '取號錯誤'.$res['error'];
            $smarty->assign(array('Error' => $res['error']));
            session_unregister("checkStep");
            session_destroy();
            echo "ERROR:" . $res['error'];
            //echo Module::display('greenworld','payErrorPage.tpl');
        } else {
            //echo '交易單號: '.$res['tsr'];
            //echo '銀行代碼: '.$res['bankcode'];
            //echo '銀行帳戶: '.$res['vaccno'];
            $finishURL = __PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . (int) $cart->id . '&id_module=' . (int) $CheckPay->id . '&id_order=' . (int) $CheckPay->currentOrder;
            $finishURL .= "&tsr=" . $res['tsr'];
            $finishURL .= "&mer_id=" . $res['mer_id'];
            $finishURL .= "&expire_date=" . $res['expire_date'];
            session_unregister("checkStep");
            session_destroy();
            Tools::redirectLink($finishURL);
            //echo Module::display('greenworld','thankyouPage.tpl');
        }
    } else {
        echo Module::display(_iMODULE_NAME_TENPAY_, 'ErrorStep.tpl');
        session_unregister("checkStep");
        session_destroy();
    }
}
include dirname(__FILE__) . '/../../footer.php';
?>

<?php

/**
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2014. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  sales@devellion.com
 * License:  GPL-2.0 http://opensource.org/licenses/GPL-2.0
 */
if (!defined('CC_INI_SET')) {
    die('Access Denied');
}
$module = new Module(__FILE__, $_GET['module'], 'admin/index.tpl', true);
$page_content = $module->display();
Exemple #15
0
        parse_str($strAuth, $res);
        if (!isset($res['error']) || $res['error'] != '0') {
            //echo '取號錯誤'.$res['error'];
            $smarty->assign(array('Error' => $res['error']));
            session_unregister("checkStep");
            session_destroy();
            echo "ERROR:" . $res['error'];
            //echo Module::display('greenworld','payErrorPage.tpl');
        } else {
            //echo '交易單號: '.$res['tsr'];
            //echo '銀行代碼: '.$res['bankcode'];
            //echo '銀行帳戶: '.$res['vaccno'];
            $finishURL = __PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . (int) $cart->id . '&id_module=' . (int) $CheckPay->id . '&id_order=' . (int) $CheckPay->currentOrder;
            $finishURL .= "&tsr=" . $res['tsr'];
            $finishURL .= "&mer_id=" . $res['mer_id'];
            $finishURL .= "&expire_date=" . $res['expire_date'];
            session_unregister("checkStep");
            session_destroy();
            Tools::redirectLink($finishURL);
            //echo Module::display('greenworld','thankyouPage.tpl');
        }
    } else {
        echo Module::display(_iMODULE_NAME_BARCODE_, 'ErrorStep.tpl');
        session_unregister("checkStep");
        session_destroy();
    }
}
include dirname(__FILE__) . '/../../footer.php';
?>

}
// Check that this payment option is still available in case the customer changed his address just before the end of the checkout process
$authorized = false;
foreach (Module::getPaymentModules() as $module) {
    if ($module['name'] == 'cashondelivery') {
        $authorized = true;
        break;
    }
}
if (!$authorized) {
    die(Tools::displayError('This payment method is not available.'));
}
$customer = new Customer((int) $cart->id_customer);
if (!Validate::isLoadedObject($customer)) {
    Tools::redirectLink(__PS_BASE_URI__ . 'order.php?step=1');
}
/* Validate order */
if (Tools::getValue('confirm')) {
    $customer = new Customer((int) $cart->id_customer);
    $total = $cart->getOrderTotal(true, Cart::BOTH);
    $cashOnDelivery->validateOrder((int) $cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $cashOnDelivery->displayName, NULL, array(), NULL, false, $customer->secure_key);
    $order = new Order((int) $cashOnDelivery->currentOrder);
    Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?key=' . $customer->secure_key . '&id_cart=' . (int) $cart->id . '&id_module=' . (int) $cashOnDelivery->id . '&id_order=' . (int) $cashOnDelivery->currentOrder);
} else {
    /* or ask for confirmation */
    $smarty->assign(array('total' => $cart->getOrderTotal(true, Cart::BOTH), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/cashondelivery/'));
    $smarty->assign('this_path', __PS_BASE_URI__ . 'modules/cashondelivery/');
    $template = 'validation.tpl';
    echo Module::display('cashondelivery', $template);
}
include dirname(__FILE__) . '/../../footer.php';
Exemple #17
0
        //echo '取號錯誤'.$res['error'];
        $smarty->assign(array(
            'Error' => $res['error']));
        session_unregister("checkStep");
        session_destroy(); 
        echo "ERROR:".$res['error'];
        //echo Module::display('greenworld','payErrorPage.tpl');
    }else {
        //echo '交易單號: '.$res['tsr'];
        //echo '銀行代碼: '.$res['bankcode'];
        //echo '銀行帳戶: '.$res['vaccno'];
        $finishURL=__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)($cart->id).'&id_module='.(int)$CheckPay->id.'&id_order='.(int)$CheckPay->currentOrder;
        $finishURL.="&tsr=".$res['tsr'];
        $finishURL.="&payno=".$res['payno'];
        session_unregister("checkStep");
        session_destroy();
        Tools::redirectLink($finishURL);
        //echo Module::display('greenworld','thankyouPage.tpl');
    }
    
}else{
    echo Module::display(_iMODULE_NAME_CVS_,'ErrorStep.tpl');
    session_unregister("checkStep");
    session_destroy();
 
}
include(dirname(__FILE__).'/../../footer.php');

?>

Exemple #18
0
        }
    }
    if (isset($_POST['oid'])) {
        $order = new OrderCore($_POST['oid']);
        if ($order->id_customer == $cookie->id_customer) {
            global $smarty;
            $smarty->assign('this_path', __PS_BASE_URI__ . 'modules/' . $orderfiles->name . '/');
            $smarty->assign('mod', $orderfiles);
            $smarty->assign('setup', $setup);
            $smarty->assign('order', $order);
            $smarty->assign('idorder', $_POST['oid']);
            $smarty->assign('files', $orderfiles->get_files($_POST['oid'], $cookie->id_customer));
            /**
            				$this->context->smarty->assign(array(
            				'mod' => $this,
            				'setup' => $this->var, 
            				'order' => $order,
            				'idorder' => $_POST['oid'],
            				'files' => $this->get_files($_POST['oid'],$cookie->id_customer),
            				'link' => $this->context->link,
            				'customer' => $this->context->customer));
            				**/
            echo Module::display(dirname(__FILE__) . '/orderfiles.php', 'filesmanager14.tpl');
        } else {
            echo Module::display(dirname(__FILE__) . '/orderfiles.php', 'access-denied14.tpl');
        }
    } else {
        echo Module::display(dirname(__FILE__) . '/orderfiles.php', 'access-denied14.tpl');
    }
}
include dirname(__FILE__) . '/../../footer.php';