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


PHP log_write函数代码示例

本文整理汇总了PHP中log_write函数的典型用法代码示例。如果您正苦于以下问题:PHP log_write函数的具体用法?PHP log_write怎么用?PHP log_write使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: check_requirements

 function check_requirements()
 {
     // verify that the service exists
     if ($this->obj_service->verify_id()) {
         $this->obj_service->load_data();
         // verify the rate is valid
         if ($this->obj_service->data["id_rate_table"]) {
             $this->obj_cdr_rate_table->id = $this->obj_service->data["id_rate_table"];
             if (!$this->obj_cdr_rate_table->verify_id()) {
                 log_write("error", "page_output", "The requested CDR rate table is invalid, there may be some problems with the information in the database.");
                 return 0;
             }
         } else {
             log_write("error", "page_output", "You have yet to set a CDR Rate Table for this service to use - please do so using the plan page before attempting to override the rates");
             return 0;
         }
     } else {
         log_write("error", "page_output", "The requested service (" . $this->obj_service->id . ") does not exist - possibly the service has been deleted.");
         return 0;
     }
     unset($sql_obj);
     // verify that this is a phone service
     if ($this->service_type != ("phone_single" || "phone_tollfree" || "phone_trunk")) {
         log_write("error", "page_output", "The requested service is not a phone service.");
         return 0;
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:28,代码来源:cdr-override-edit.php

示例2: check_requirements

 function check_requirements()
 {
     // verify that customer exists
     if (!$this->obj_customer->verify_id()) {
         log_write("error", "page_output", "The requested customer (" . $this->obj_customer->id . ") does not exist - possibly the customer has been deleted.");
         return 0;
     }
     // verify that the service-customer entry exists
     if ($this->obj_customer->id_service_customer) {
         if (!$this->obj_customer->verify_id_service_customer()) {
             log_write("error", "page_output", "The requested service (" . $this->obj_customer->id_service_customer . ") was not found and/or does not match the selected customer");
             return 0;
         }
     }
     // verify that this is a phone trunk service
     if ($this->obj_customer->obj_service->data["typeid_string"] != "phone_trunk") {
         log_write("error", "page_output", "The requested service is not a phone_trunk service.");
         return 0;
     }
     // verify that the DDI value is correct (if one has been supplied)
     if ($this->obj_ddi->id) {
         if (!$this->obj_ddi->verify_id()) {
             log_write("error", "page_output", "The supplied DDI ID is not valid");
             return 0;
         }
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:28,代码来源:service-ddi-edit.php

示例3: check_requirements

 function check_requirements()
 {
     // verify that customer exists
     if (!$this->obj_customer->verify_id()) {
         log_write("error", "page_output", "The requested customer (" . $this->obj_customer->id . ") does not exist - possibly the customer has been deleted.");
         return 0;
     }
     // verify that the service-customer entry exists
     if ($this->ob_customer->id_service_customer) {
         if (!$this->obj_customer->verify_id_service_customer()) {
             log_write("error", "page_output", "The requested service (" . $this->obj_customer->id_service_customer . ") was not found and/or does not match the selected customer");
             return 0;
         }
     }
     // verify the options IDs
     if (!$this->obj_cdr_rate_table->verify_id_override()) {
         log_write("error", "page_output", "The requested service does not have a valid CDR rate table");
     }
     // check if the option override rate id is valid (if supplied)
     if (!$this->obj_cdr_rate_table->verify_id_rate_override()) {
         $this->obj_cdr_rate_table->id_rate_override = 0;
     }
     // verify that this is a phone service
     if ($this->obj_customer->obj_service->data["typeid_string"] != ("phone_single" || "phone_trunk" || "phone_tollfree")) {
         log_write("error", "page_output", "The requested service is not a phone service.");
         return 0;
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:29,代码来源:service-cdr-override-edit.php

示例4: check_requirements

 function check_requirements()
 {
     // verify that user exists
     $sql_obj = new sql_query();
     $sql_obj->string = "SELECT id FROM users WHERE id='" . $this->id . "' LIMIT 1";
     $sql_obj->execute();
     if (!$sql_obj->num_rows()) {
         log_write("error", "page_output", "The requested user (" . $this->id . ") does not exist - possibly the user has been deleted.");
         return 0;
     }
     unset($sql_obj);
     // verify that the specified staff member exists
     $sql_obj = new sql_query();
     $sql_obj->string = "SELECT id, name_staff FROM staff WHERE id='" . $this->staffid . "' LIMIT 1";
     $sql_obj->execute();
     if (!$sql_obj->num_rows()) {
         log_write("error", "page_output", "The requested employee (" . $this->staffid . ") does not exist - possibly the employeee has been deleted.");
         return 0;
     } else {
         $sql_obj->fetch_array();
         $this->name_staff = $sql_obj->data[0]["name_staff"];
     }
     unset($sql_obj);
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:25,代码来源:user-staffaccess-edit.php

示例5: check_requirements

 function check_requirements()
 {
     // verify that project exists
     $sql_obj = new sql_query();
     $sql_obj->string = "SELECT id FROM projects WHERE id='" . $this->id . "' LIMIT 1";
     $sql_obj->execute();
     if (!$sql_obj->num_rows()) {
         log_write("error", "page_output", "The requested project (" . $this->id . ") does not exist - possibly the project has been deleted.");
         return 0;
     }
     unset($sql_obj);
     // verify that phase exists and belongs to this project
     if ($this->phaseid) {
         $sql_obj = new sql_query();
         $sql_obj->string = "SELECT projectid FROM project_phases WHERE id='" . $this->phaseid . "' LIMIT 1";
         $sql_obj->execute();
         if (!$sql_obj->num_rows()) {
             log_write("error", "page_output", "The requested phase (" . $this->phaseid . ") does not exist - possibly the phase has been deleted.");
             return 0;
         } else {
             $sql_obj->fetch_array();
             if ($sql_obj->data[0]["projectid"] != $this->id) {
                 log_write("error", "page_output", "The requested phase (" . $this->phaseid . ") does not belong to the selected project (" . $this->id . ")");
                 return 0;
             }
         }
         unset($sql_obj);
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:30,代码来源:phase-delete.php

示例6: check_requirements

 function check_requirements()
 {
     // verify that the invoice exists
     $sql_obj = new sql_query();
     $sql_obj->string = "SELECT id FROM account_ar WHERE id='" . $this->id . "' LIMIT 1";
     $sql_obj->execute();
     if (!$sql_obj->num_rows()) {
         log_write("error", "page_output", "The requested invoice (" . $this->id . ") does not exist - possibly the invoice has been deleted.");
         return 0;
     }
     unset($sql_obj);
     // verify that the item id supplied exists and fetch required information
     if ($this->itemid) {
         $sql_obj = new sql_query();
         $sql_obj->string = "SELECT id, type FROM account_items WHERE id='" . $this->itemid . "' AND invoiceid='" . $this->id . "' LIMIT 1";
         $sql_obj->execute();
         if (!$sql_obj->num_rows()) {
             log_write("error", "page_output", "The requested payment/invoice combination does not exist. Are you trying to use a link to a deleted payment?");
             return 0;
         } else {
             $sql_obj->fetch_array();
             $this->item_type = $sql_obj->data[0]["type"];
         }
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:26,代码来源:invoice-payments-edit.php

示例7: check_requirements

 function check_requirements()
 {
     // verify that customer exists
     if (!$this->obj_customer->verify_id()) {
         log_write("error", "page_output", "The requested customer (" . $this->obj_customer->id . ") does not exist - possibly the customer has been deleted.");
         return 0;
     }
     // verify that the service-customer entry exists
     if ($this->obj_customer->id_service_customer) {
         if (!$this->obj_customer->verify_id_service_customer()) {
             log_write("error", "page_output", "The requested service (" . $this->obj_customer->id_service_customer . ") was not found and/or does not match the selected customer");
             return 0;
         }
     }
     // verify that this is a data_traffic service
     if ($this->obj_customer->obj_service->data["typeid_string"] != "data_traffic") {
         log_write("error", "page_output", "The requested service is not a data_traffic service.");
         return 0;
     }
     // verify that the selected IPv4 address is valid (if provided)
     if ($this->obj_ipv4->id) {
         if (!$this->obj_ipv4->verify_id()) {
             log_write("error", "page_output", "The supplied IPv4 address is not valid");
             return 0;
         }
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:28,代码来源:service-ipv4-edit.php

示例8: lockfile_remove

function lockfile_remove()
{
    // delete lock file
    if (!unlink($GLOBALS["config"]["lock_file"])) {
        log_write("error", "script", "Unable to remove lock file " . $GLOBALS["config"]["lock_file"] . "");
    }
}
开发者ID:claybbs,项目名称:namedmanager,代码行数:7,代码来源:namedmanager_bind_configwriter.php

示例9: check_requirements

 function check_requirements()
 {
     // verify that the service exists
     $sql_obj = new sql_query();
     $sql_obj->string = "SELECT id, id_rate_table FROM services WHERE id='" . $this->id . "' LIMIT 1";
     $sql_obj->execute();
     if ($sql_obj->num_rows()) {
         $sql_obj->fetch_array();
         // verify the rate is valid
         if ($sql_obj->data[0]["id_rate_table"]) {
             $this->obj_cdr_rate_table->id = $sql_obj->data[0]["id_rate_table"];
             if (!$this->obj_cdr_rate_table->verify_id()) {
                 log_write("error", "page_output", "The requested CDR rate table is invalid, there may be some problems with the information in the database.");
                 return 0;
             }
         } else {
             log_write("error", "page_output", "You have yet to set a CDR Rate Table for this service to use - please do so using the plan page before attempting to override the rates");
             return 0;
         }
     } else {
         log_write("error", "page_output", "The requested service (" . $this->id . ") does not exist - possibly the service has been deleted.");
         return 0;
     }
     unset($sql_obj);
     // verify that this is a phone service
     if ($this->service_type != ("phone_single" || "phone_trunk" || "phone_tollfree")) {
         log_write("error", "page_output", "The requested service is not a phone service.");
         return 0;
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:31,代码来源:cdr-override.php

示例10: connect

 function connect($params = array())
 {
     if (!isset($this->status)) {
         $obj = new smtp($params);
         if ($obj->connect()) {
             $obj->status = SMTP_STATUS_CONNECTED;
         }
         return $obj;
     } else {
         if (!empty($GLOBALS['_CFG']['smtp_ssl'])) {
             $this->host = "ssl://" . $this->host;
         }
         $this->connection = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
         if ($this->connection === false) {
             $this->errors[] = 'Access is denied.';
             return false;
         }
         @socket_set_timeout($this->connection, 0, 250000);
         $greeting = $this->get_data();
         if (is_resource($this->connection)) {
             $this->status = 2;
             return $this->auth ? $this->ehlo() : $this->helo();
         } else {
             log_write($errstr, __FILE__, __LINE__);
             $this->errors[] = 'Failed to connect to server: ' . $errstr;
             return false;
         }
     }
 }
开发者ID:duynhan07,项目名称:ecshop-vietnam,代码行数:29,代码来源:cls_smtp.php

示例11: check_requirements

 function check_requirements()
 {
     if (!$this->obj_rate_table->verify_id()) {
         log_write("error", "page_output", "The supplied rate table ID " . $this->obj_rate_table->id . " does not exist");
         return 0;
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:8,代码来源:cdr-rates-items.php

示例12: check_requirements

 function check_requirements()
 {
     // make sure the domain is valid
     if (!$this->obj_domain->verify_id()) {
         log_write("error", "page_output", "The requested domain (" . $this->obj_domain->id . ") does not exist - possibly it has been deleted?");
         return 0;
     }
     return 1;
 }
开发者ID:claybbs,项目名称:namedmanager,代码行数:9,代码来源:delete.php

示例13: check_requirements

 function check_requirements()
 {
     // customer must be a reseller
     if ($this->obj_customer->verify_reseller() != 1) {
         log_write("error", "page", "This customer is not a reseller.");
         return 0;
     }
     return 1;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:9,代码来源:reseller.php

示例14: uni_exit

function uni_exit()
{
    global $h5u_debug, $upload_log;
    if ($h5u_debug) {
        upldLog('exit uniload');
        log_write($upload_log, H5U_LOG);
    }
    exit;
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:9,代码来源:uniload.php

示例15: check_requirements

 function check_requirements()
 {
     // make sure the server is valid
     if (!$this->obj_name_server_group->verify_id()) {
         log_write("error", "page_output", "The requested server group (" . $this->obj_name_server_group->id . ") does not exist - possibly the server group has been deleted?");
         return 0;
     }
     return 1;
 }
开发者ID:kissingwolf,项目名称:namedmanager,代码行数:9,代码来源:group-view.php


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