</p> <h3><?php echo $label['advertiser_pay_sel_method']; ?> </h3> <?php if ($_REQUEST['order_id'] != '') { $order_id = $_REQUEST['order_id']; } else { $order_id = $_SESSION['MDS_order_id']; } $sql = "SELECT * from orders where banner_id='{$BID}' AND order_id='" . $order_id . "'"; $result = mysql_query($sql) or die(mysql_error() . $sql); $order_row = mysql_fetch_array($result); ######################## # Proceess confirmation if ($_REQUEST['action'] == 'confirm') { // move temp order to confirmed order confirm_order($_SESSION['MDS_ID'], $_SESSION['MDS_order_id']); } ########################## $sql = "SELECT * from orders where order_id='" . $_SESSION['MDS_order_id'] . "'"; $result = mysql_query($sql) or die(mysql_error() . $sql); $order_row = mysql_fetch_array($result); $dir = dirname(__FILE__); $dir = preg_split('%[/\\\\]%', $dir); $blank = array_pop($dir); $dir = implode('/', $dir); include $dir . '/payment/payment_manager.php'; payment_option_list($_SESSION['MDS_order_id']); require "footer.php";
del_product($goods_id); redirect(); break; case 'del_img': //удаление картинки товара $goods_id = (int) $_GET['goods_id']; del_img($goods_id); redirect(); break; ////////////////// ////////////////// case 'orders': //подтверждение заказа if (isset($_GET['confirm'])) { $order_id = (int) $_GET['confirm']; if (confirm_order($order_id)) { $_SESSION['answer'] = "<div class='success'>Статус заказ № {$order_id} успешно изменен.</div>"; } else { $_SESSION['answer'] = "<div class='error'>Заказ № {$order_id} не удалось изменить. Возможно, данного заказа нет или он уже подтвержден.</div>"; } redirect("?view=orders&status=0"); } //удаление заказа if (isset($_GET['del_order'])) { $order_id = (int) $_GET['del_order']; if (del_order($order_id)) { $_SESSION['answer'] = "<div class='success'>Заказ успешно удален.</div>"; } else { $_SESSION['answer'] = "<div class='error'>Ошбика при удалении. Возможно этот заказ уже был удален ранее.</div>"; } redirect("?view=orders");
echo $label['advertiser_pay_sel_method']; ?> </h3> <?php if ($_REQUEST['action'] == 'confirm' || $_REQUEST['action'] == 'complete') { // move temp order to confirmed order if ($order_id = reserve_pixels_for_temp_order($order_row)) { //echo "the order id is: $order_id<br>"; // check the user's rank $sql = "select * from users where ID='" . $_SESSION['MDS_ID'] . "'"; $u_result = mysql_query($sql) or die(mysql_error() . $sql); $u_row = mysql_fetch_array($u_result); if ($order_row['price'] == 0 || $u_row['Rank'] == 2) { complete_order($_SESSION['MDS_ID'], $order_id); } else { confirm_order($_SESSION['MDS_ID'], $order_id); } } else { // we have a problem... ?> <h1><?php echo $label['sorry_head']; ?> </h1> <p><?php if (USE_AJAX == 'SIMPLE') { $order_page = 'order_pixels.php'; } else { $order_page = 'select.php'; } $label['sorry_head2'] = str_replace('%ORDER_PAGE%', $order_page, $label['sorry_head2']);