function question() { $Order = new mOrder(); $Order->__fromMemory(); $Order->customer->__toMemory(); redirect('/contact/'); }
function send() { $Review = new mReview(); $Review->__post(); if ($Review->validate()) { $Order = new mOrder(); $Order->__post(); $Order->load(); if ($Order->is_loaded()) { $Order->save($Review); } else { $Review->save(); } return $this->display('sent'); } return $this->index(); }
function addToOrder() { $Order = mOrder::get_instance(); $Order->addToOrder($this); }
function __construct() { parent::__construct(); $API = new stripelib(); $this->order = mOrder::get_instance(); }
function delete($OrderID) { $Order = new mOrder($OrderID); $Order->delete(); redirect($_SERVER['HTTP_REFERER']); }
<?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'];