當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Orders::OffUserOrder方法代碼示例

本文整理匯總了PHP中Orders::OffUserOrder方法的典型用法代碼示例。如果您正苦於以下問題:PHP Orders::OffUserOrder方法的具體用法?PHP Orders::OffUserOrder怎麽用?PHP Orders::OffUserOrder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Orders的用法示例。


在下文中一共展示了Orders::OffUserOrder方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

<?php

$GLOBALS['IERA_LINKS'] = array();
$GLOBALS['IERA_LINKS'][1]['title'] = "История заказов";
if (isset($_POST['id_order']) && !empty($_POST['id_order'])) {
    $id_order = intval($_POST['id_order']);
}
$Customer = new Customers();
$Customer->SetFieldsById($User->fields['id_user']);
$Order = new Orders();
if (isset($id_order)) {
    $Order->SetFieldsById($id_order);
}
if (isset($_POST['smb_off'])) {
    if ($Order->OffUserOrder($id_order)) {
        $tpl->Assign('msg', 'Заказ отменен контрагентом.');
        unset($_POST);
    } else {
        $tpl->Assign('msg', 'Информация не обновлена.');
    }
}
$fields = array('creation_date', 'target_date', 'id_order', 'status', 'pretense', 'pretense_status', 'return', 'return_status');
$f_assoc = array('creation_date' => 'o.creation_date', 'target_date' => 'o.target_date', 'id_order' => 'o.id_order', 'status' => 'o.id_order_status', 'pretense' => 'o.id_pretense_status', 'pretense_status' => 'o.id_pretense_status', 'return' => 'o.id_return_status', 'return_status' => 'o.id_return_status');
$orderby = "o.id_order desc";
$sort_links = array();
$GET_limit = "";
if (isset($_GET['limit'])) {
    $GET_limit = "limit" . $_GET['limit'] . '/';
}
$tpl->Assign('sort_links', $sort_links);
$orders = $Customer->GetPromoOrders();
開發者ID:Arikito,項目名稱:webking.xt,代碼行數:31,代碼來源:cp_cab_promo_customer.php

示例2: Address

<?if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'){
	header('Content-Type: text/javascript; charset=utf-8');
	$Orders = new Orders;
	if(isset($_POST['action'])){
		switch($_POST['action']){
			case "CancelOrder":
				echo json_encode($Orders->UpdateStatus($_POST['id_order'], 5));
				break;
			case "DeleteOrder":
				echo json_encode($Orders->OffUserOrder($_POST['id_order']));
				break;
			case "restoreDeleted":
				echo json_encode($Orders->RestoreDeleted($_POST['id_order']));
				break;
			case 'addAddress':
				if($Orders->addAddress($_POST['id_order'], $_POST['id_address'])){
					$Address = new Address();
					$res = $Address->getAddressOrder($_POST['id_order']);
					$addr = '<div class="servise_logo">
								<img src="/images/noavatar.png" alt="avatar" />
							</div>
							<div class="delivery_details">
								<div class="line">
									<span class="label">Название:</span>
									<span class="value">'.$res['title'].'</span>
								</div>
								<div class="line">
									<span class="label">Компания доставки:</span>
									<span class="value">'.$res['shipping_company'].'</span>
								</div>
								<div class="line">
開發者ID:Arikito,項目名稱:webking.xt,代碼行數:31,代碼來源:order.php


注:本文中的Orders::OffUserOrder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。