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


PHP customer::verify_id方法代码示例

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


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

示例1: foreach

 $sql_taxes_obj->execute();
 if ($sql_taxes_obj->num_rows()) {
     // only get the default tax if taxes exist
     $obj_customer->data["tax_default"] = @security_form_input_predefined("int", "tax_default", 0, "");
     // fetch all the taxes and see which ones are enabled for the customer
     $sql_taxes_obj->fetch_array();
     foreach ($sql_taxes_obj->data as $data_tax) {
         $obj_customer->data["tax_" . $data_tax["id"]] = @security_form_input_predefined("any", "tax_" . $data_tax["id"], 0, "");
     }
 }
 /*
 	Error Handling
 */
 // verify valid ID (if performing update)
 if ($obj_customer->id) {
     if (!$obj_customer->verify_id()) {
         log_write("error", "process", "The customer you have attempted to edit - " . $obj_customer->id . " - does not exist in this system.");
     }
 }
 // make sure we don't choose a customer name that has already been taken
 if (!$obj_customer->verify_name_customer()) {
     log_write("error", "process", "This customer name is already used for another customer - please choose a unique name.");
     $_SESSION["error"]["name_customer-error"] = 1;
 }
 // make sure we don't choose a customer code that has already been taken
 if (!$obj_customer->verify_code_customer()) {
     log_write("error", "process", "This customer code is already used for another customer - please choose a unique code or leave blank for an automatically generated value.");
     $_SESSION["error"]["name_customer-error"] = 1;
 }
 // don't allow a date closed to be set if there are active services belonging to this customer
 if (!$obj_customer->verify_date_end()) {
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:31,代码来源:edit-process.php

示例2: customer

 function delete_customer($id)
 {
     log_debug("customers", "Executing delete_customer_details({$id}, values...)");
     if (user_permissions_get("customers_write")) {
         $obj_customer = new customer();
         /*
         	Load SOAP Data
         */
         $obj_customer->id = @security_script_input_predefined("int", $id);
         if (!$obj_customer->id || $obj_customer->id == "error") {
             throw new SoapFault("Sender", "INVALID_INPUT");
         }
         /*
         	Error Handling
         */
         // verify customer ID
         if (!$obj_customer->verify_id()) {
             throw new SoapFault("Sender", "INVALID_ID");
         }
         // check that the customer can be safely deleted
         if ($obj_customer->check_delete_lock()) {
             throw new SoapFault("Sender", "LOCKED");
         }
         /*
         	Perform Changes
         */
         if ($obj_customer->action_delete()) {
             return 1;
         } else {
             throw new SoapFault("Sender", "UNEXPECTED_ACTION_ERROR");
         }
     } else {
         throw new SoapFault("Sender", "ACCESS DENIED");
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:35,代码来源:customers_manage.php


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