当前位置: 首页>>代码示例>>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;未经允许,请勿转载。