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


PHP Customers::SetListingsForCustomer方法代碼示例

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


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

示例1: RemoveListing

 /**
  * 	Remove listing
  * 		@param 
  */
 public function RemoveListing($plan_id = 0)
 {
     if (!$this->IsLoggedIn() && empty($plan_id)) {
         return false;
     }
     Customers::SetListingsForCustomer(Session::Get('session_account_id'), $plan_id, 1, '-');
     Session::Set('session_customer_plans', Customers::GetListingsForCustomer(Session::Get('session_account_id')));
     return true;
 }
開發者ID:mozdial,項目名稱:Directory,代碼行數:13,代碼來源:Login.class.php

示例2: write_log

                        $message .= 'Payment Processing Gross Price: ' . $total . "<br />\n";
                        write_log($message);
                        break;
                    }
                    $sql = 'UPDATE ' . TABLE_ORDERS . ' SET
								status = 2,
								transaction_number = \'' . $transaction_number . '\',
								payment_date = \'' . date('Y-m-d H:i:s') . '\',
								status_changed = \'' . date('Y-m-d H:i:s') . '\',
								payment_type = 1,
								payment_method = ' . $payment_method . '
							WHERE order_number = \'' . $order_number . '\'';
                    if (database_void_query($sql)) {
                        // update customer orders/listings amount
                        Customers::SetOrdersForCustomer($result[0]['customer_id'], '+');
                        Customers::SetListingsForCustomer($result[0]['customer_id'], $result[0]['advertise_plan_id'], $result[0]['listings_amount'], '+');
                        // send email to customer
                        if (Orders::SendOrderEmail($order_number, 'completed', $result[0]['customer_id'])) {
                            write_log($sql, _ORDER_PLACED_MSG);
                        } else {
                            write_log($sql, _ORDER_ERROR);
                        }
                    } else {
                        write_log($sql, mysql_error());
                    }
                } else {
                    write_log($sql, 'Error: no records found. ' . mysql_error());
                }
                break;
            case 'Updated':
                // 3 updated already
開發者ID:mozdial,項目名稱:Directory,代碼行數:31,代碼來源:handler_payment_notify_paypal.php

示例3: AfterDeleteRecord

 /**
  *	After-Delete record
  */
 public function AfterDeleteRecord()
 {
     // $this->curRecordId - currently deleted record
     if ($this->order_status == 2 || $this->order_status == 3 || $this->order_status == 4) {
         // update customer orders/listings amount
         Customers::SetOrdersForCustomer($this->order_customer_id, '-');
         if ($this->order_status == 2 || $this->order_status == 3) {
             Customers::SetListingsForCustomer($this->order_customer_id, $this->order_advertise_plan_id, $this->order_listings, '-');
         }
     }
 }
開發者ID:mozdial,項目名稱:Directory,代碼行數:14,代碼來源:Orders.class.php


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