当前位置: 首页>>代码示例>>PHP>>正文


PHP Customers::UpdateCustomer方法代码示例

本文整理汇总了PHP中Customers::UpdateCustomer方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::UpdateCustomer方法的具体用法?PHP Customers::UpdateCustomer怎么用?PHP Customers::UpdateCustomer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Customers的用法示例。


在下文中一共展示了Customers::UpdateCustomer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

				$tpl->Assign('step', $_POST['step']);
				$tpl->Assign('customer', $customer);
				echo $tpl->Parse($GLOBALS['PATH_tpl_global'].'quiz.tpl');
				break;
			case 'complete_step':
				$echo = array('success' => false);
				switch($_POST['current_step']){
					case 1:
						if(isset($_POST['id_address'])){
							$echo['success'] = true;
							$echo['target_step'] = 4;
							if(isset($_SESSION['member']['last_order'])){
								$Orders->SetOrderAddress($_SESSION['member']['last_order'], $_POST['id_address']);
							}
						}else{
							if($Customers->UpdateCustomer($_POST)){
								$echo['success'] = true;
							}
						}
						break;
					case 2:
						$region = $Address->GetRegionByTitle($_POST['region']);
						$city = $Address->GetCityByTitle($_POST['city'], $region['id']);
						$data['id_region'] = $city['id_region'];
						$data['id_city'] = $city['id'];
						if($Customers->UpdateCustomer($data)){
							$echo['success'] = true;
						}
						break;
					case 3:
						$data = $_POST;
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:quiz.php

示例2: array

        $dates[date("d.m.Y", $ts_tmp)]['limit_sum_night'] = 0;
    }
}
$tpl->Assign('dates', $dates);
$fields = array('creation_date', 'target_date', 'id_order', 'status', 'pretense', 'pretense_status', 'return', 'return_status', 'note');
$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', 'customer' => 'u.id_user');
$orderby = "o.creation_date desc, o.id_order desc";
$sort_links = array();
$ii = count($GLOBALS['IERA_LINKS']) - 1;
if (isset($_POST['change_margin'])) {
    $_POST['discount'] = str_replace(",", ".", $_POST['discount']);
    require_once $GLOBALS['PATH_block'] . 't_fnc.php';
    // для ф-ции проверки формы
    $nocheck[] = 'keystring';
    if (!$err) {
        if ($id = $Customer->UpdateCustomer($_POST)) {
            $tpl->Assign('msg', 'Информация обновлена.');
            $success = true;
            unset($_POST);
            header("Location: /cabinet");
            exit;
        } else {
            $tpl->Assign('msg', 'Информация не обновлена.');
            if (mysql_errno() == 1062) {
                $errm['email'] = "Такой email уже есть в базе.";
                ini_set('display_errors', 1);
                error_reporting(E_ALL);
                $tpl->Assign('errm', $errm);
            }
        }
    } else {
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:cp_cab_contragent.php

示例3: FillByOrderId

 public function FillByOrderId($id_order, $add = null)
 {
     $Order = new Orders();
     $Customer = new Customers();
     $Order->SetFieldsById($id_order);
     $order = $Order->fields;
     if ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_) {
         if ($order['discount'] > 0 && $_SESSION['member']['id_user'] == $order['id_customer']) {
             $this->SetPersonalDiscount($order['discount']);
             $Customer->UpdateCustomer(array('id_user' => $_SESSION['member']['id_user'], 'email' => $_SESSION['member']['email'], 'discount' => $order['discount']));
         }
     }
     $products = $Order->GetOrderForCart(array('o.id_order' => $id_order));
     if ($add == null && isset($_SESSION['cart']['id'])) {
         $this->ClearCart($_SESSION['cart']['id']);
     } elseif ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_ && $add == null && !isset($_SESSION['cart']['id'])) {
         $_SESSION['cart'] = null;
     }
     $_SESSION['cart']['note'] = $order['note'];
     if ($_SESSION['member']['gid'] == _ACL_CONTRAGENT_) {
         $_SESSION['cart']['base_order'] = $id_order;
         $_SESSION['cart']['id_customer'] = $order['id_customer'];
         $Customer->SetSessionCustomerBonusCart($order['id_customer']);
     }
     foreach ($products as $p) {
         $p['quantity'] = $p['opt_qty'] + $p['mopt_qty'];
         if ($this->IsAvailableProduct($p['id_product'])) {
             $this->UpdateCartQty($p);
             // $this->IsActualPrice($p);
         } else {
             $_SESSION['cart']['unavailable_products'][] = $p;
         }
     }
     // print_r($_SESSION['cart']);
     // die();
 }
开发者ID:Arikito,项目名称:webking.xt,代码行数:36,代码来源:cart_c.php


注:本文中的Customers::UpdateCustomer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。