Exemplo n.º 1
0
<?php

include '../model/mCart.php';
include '../model/mCategory.php';
include '../model/mProductLister.php';
include '../model/mOrder.php';
/*
echo '<pre>'; print_r($_POST); echo '</pre><br/>';
echo 'postback=\''; echo $_POST['postback']; echo '\''; 
*/
if (!empty($_POST['postback'])) {
    if (mOrder::set_order()) {
        // order was successful
        $order = 't';
    } else {
        // order was failed
        $order = 'f';
    }
}
$categories = mCategory::get_categories(0);
$cart = mCart::get_cart();
// set variables for display
if ($_POST['customer_datas'] == 1 and isset($_POST['c_name']) and isset($_POST['c_email']) and isset($_POST['c_email2']) and isset($_POST['c_tel']) and isset($_POST['c_country']) and isset($_POST['c_postal_code']) and isset($_POST['c_city']) and isset($_POST['c_address']) and isset($_POST['i_name']) and isset($_POST['i_country']) and isset($_POST['i_postal_code']) and isset($_POST['i_city']) and isset($_POST['i_address'])) {
    $c_name = $_POST['c_name'];
    $_SESSION['c_name'] = $_POST['c_name'];
    if ($_POST['c_email'] == $_POST['c_email2']) {
        $c_email = $_POST['c_email'];
        $_SESSION['c_email'] = $_POST['c_email'];
    }
    $c_tel = $_POST['c_tel'];
    $_SESSION['c_tel'] = $_POST['c_tel'];