本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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"] . "");
}
}
示例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;
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例14: uni_exit
function uni_exit()
{
global $h5u_debug, $upload_log;
if ($h5u_debug) {
upldLog('exit uniload');
log_write($upload_log, H5U_LOG);
}
exit;
}
示例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;
}