• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP error_check函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "translation_form";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "popup/translation_form-process.php";
     $this->obj_form->method = "post";
     $this->num_trans = 5;
     for ($i = 1; $i <= $this->num_trans; $i++) {
         $structure = NULL;
         $structure["fieldname"] = "untranslated_" . $i;
         $structure["type"] = "input";
         $this->obj_form->add_input($structure);
         $structure = NULL;
         $structure["fieldname"] = "translated_" . $i;
         $structure["type"] = "input";
         $this->obj_form->add_input($structure);
     }
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "Save Translations";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "num_trans";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->num_trans;
     $this->obj_form->add_input($structure);
     if (error_check()) {
         $this->obj_form->load_data_error();
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:35,代码来源:translation_form.php


示例2: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "name_server_edit";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "servers/group-edit-process.php";
     $this->obj_form->method = "post";
     // general
     $structure = NULL;
     $structure["fieldname"] = "group_name";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "group_description";
     $structure["type"] = "textarea";
     $this->obj_form->add_input($structure);
     // submit section
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "Save Changes";
     $this->obj_form->add_input($structure);
     // subforms
     $this->obj_form->subforms["group_details"] = array("group_name", "group_description");
     $this->obj_form->subforms["submit"] = array("submit");
     // load data
     if (error_check()) {
         $this->obj_form->load_data_error();
     }
 }
开发者ID:kissingwolf,项目名称:namedmanager,代码行数:34,代码来源:group-add.php


示例3: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "name_server_delete";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "servers/delete-process.php";
     $this->obj_form->method = "post";
     // general
     $structure = NULL;
     $structure["fieldname"] = "server_name";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "server_description";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     // hidden section
     $structure = NULL;
     $structure["fieldname"] = "id_name_server";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->obj_name_server->id;
     $this->obj_form->add_input($structure);
     // confirm delete
     $structure = NULL;
     $structure["fieldname"] = "delete_confirm";
     $structure["type"] = "checkbox";
     $structure["options"]["label"] = "Yes, I wish to delete this server and realise that once deleted the data can not be recovered.";
     $this->obj_form->add_input($structure);
     // submit
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "delete";
     $this->obj_form->add_input($structure);
     // define subforms
     $this->obj_form->subforms["server_delete"] = array("server_name", "server_description");
     $this->obj_form->subforms["hidden"] = array("id_name_server");
     $this->obj_form->subforms["submit"] = array("delete_confirm", "submit");
     // import data
     if (error_check()) {
         $this->obj_form->load_data_error();
     } else {
         if ($this->obj_name_server->load_data()) {
             $this->obj_form->structure["server_name"]["defaultvalue"] = $this->obj_name_server->data["server_name"];
             $this->obj_form->structure["server_description"]["defaultvalue"] = $this->obj_name_server->data["server_description"];
         }
     }
 }
开发者ID:claybbs,项目名称:namedmanager,代码行数:51,代码来源:delete.php


示例4: safe_query

function safe_query($query)
{
    set_error_handler("exception_error_handler");
    try {
        $result = pg_query($query);
    } catch (Exception $e) {
        echo "<pre>Problem with query: " . $query . "\n";
        echo "<pre>Error Message:" . $e->getMessage() . "</pre>\n";
        // This needs to be updated to redirect to a well-formatted error screen
    }
    //This checks for non-fatal errors that return nothing to $result
    error_check($result, $query);
    return $result;
}
开发者ID:GeoffreyEmerson,项目名称:bats-2015-fork,代码行数:14,代码来源:functions.php


示例5: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "config_integration";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "admin/config_integration-process.php";
     $this->obj_form->method = "post";
     // customer portal stuff
     $structure = NULL;
     $structure["fieldname"] = "MODULE_CUSTOMER_PORTAL";
     $structure["type"] = "checkbox";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["label"] = "Enable/disable the customer portal integration.";
     $this->obj_form->add_input($structure);
     // submit section
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "Save Changes";
     $this->obj_form->add_input($structure);
     // define subforms
     $this->obj_form->subforms["config_integration"] = array("MODULE_CUSTOMER_PORTAL");
     $this->obj_form->subforms["submit"] = array("submit");
     if (error_check()) {
         // load error datas
         $this->obj_form->load_data_error();
     } else {
         // fetch all the values from the database
         $sql_config_obj = new sql_query();
         $sql_config_obj->string = "SELECT name, value FROM config ORDER BY name";
         $sql_config_obj->execute();
         $sql_config_obj->fetch_array();
         foreach ($sql_config_obj->data as $data_config) {
             $this->obj_form->structure[$data_config["name"]]["defaultvalue"] = $data_config["value"];
         }
         unset($sql_config_obj);
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:41,代码来源:config_integration.php


示例6: execute

 function execute()
 {
     // load data
     $this->obj_customer->load_data();
     // define basic form details
     $this->obj_form = new form_input();
     $this->obj_form->formname = "cdr_override_edit";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "customers/service-cdr-override-edit-process.php";
     $this->obj_form->method = "post";
     // service details
     $structure = NULL;
     $structure["fieldname"] = "name_customer";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "service_name";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "service_description";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     // rate table details
     $structure = NULL;
     $structure["fieldname"] = "rate_table_name";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "rate_table_description";
     $structure["type"] = "text";
     $this->obj_form->add_input($structure);
     // item options
     $structure = NULL;
     $structure["fieldname"] = "rate_prefix";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "rate_description";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = form_helper_prepare_dropdownfromdb("rate_billgroup", "SELECT id, billgroup_name as label FROM cdr_rate_billgroups");
     $structure["options"]["req"] = "yes";
     $structure["options"]["width"] = "100";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "rate_price_sale";
     $structure["type"] = "money";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "rate_price_cost";
     $structure["type"] = "money";
     $this->obj_form->add_input($structure);
     // hidden
     $structure = NULL;
     $structure["fieldname"] = "id_customer";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->obj_customer->id;
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "id_service_customer";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->obj_customer->id_service_customer;
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "id_rate_override";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->obj_cdr_rate_table->id_rate_override;
     $this->obj_form->add_input($structure);
     // submit button
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "submit";
     $this->obj_form->add_input($structure);
     // define subforms
     $this->obj_form->subforms["service_details"] = array("name_customer", "service_name", "service_description");
     $this->obj_form->subforms["rate_table_details"] = array("rate_table_name", "rate_table_description");
     $this->obj_form->subforms["rate_table_items"] = array("rate_prefix", "rate_description", "rate_billgroup", "rate_price_sale", "rate_price_cost");
     $this->obj_form->subforms["hidden"] = array("id_customer", "id_service_customer", "id_rate_override");
     $this->obj_form->subforms["submit"] = array("submit");
     // load any data returned due to errors
     if (error_check()) {
         $this->obj_form->load_data_error();
     } else {
         $this->obj_cdr_rate_table->load_data();
         // load rate values from standard item
         if ($this->obj_cdr_rate_table->id_rate) {
             $this->obj_cdr_rate_table->load_data_rate();
         }
         // load override values
         if ($this->obj_cdr_rate_table->id_rate_override) {
             $this->obj_cdr_rate_table->load_data_rate_override();
         }
         $this->obj_form->structure["name_customer"]["defaultvalue"] = $this->obj_customer->data["name_customer"];
         $this->obj_form->structure["service_name"]["defaultvalue"] = $this->obj_customer->obj_service->data["name_service"];
         $this->obj_form->structure["service_description"]["defaultvalue"] = $this->obj_customer->obj_service->data["description"];
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:101,代码来源:service-cdr-override-edit.php


示例7: user_add_user

                        // so no need to translate this. This is just in case. :-)
                        $error = 'Invalid characters in login.';
                    } else {
                        if (empty($user)) {
                            // Username cannot be blank. This is currently the only place
                            // that calls addUser that is located in $user_inc.
                            $error = $blankUserStr;
                        } else {
                            user_add_user($user, $upassword1, $ufirstname, $ulastname, $uemail, $uis_admin, $u_enabled);
                            activity_log(0, $login, $user, LOG_USER_ADD, "{$ufirstname} {$ulastname}" . (empty($uemail) ? '' : " <{$uemail}>"));
                        }
                    }
                }
            } else {
                if (!empty($add) && !access_can_access_function(ACCESS_USER_MANAGEMENT)) {
                    $error = print_not_auth(15);
                } else {
                    // Don't allow a user to change themself to an admin by setting
                    // uis_admin in the URL by hand. They must be admin beforehand.
                    if (!$is_admin) {
                        $uis_admin = 'N';
                    }
                    user_update_user($user, $ufirstname, $ulastname, $uemail, $uis_admin, $uenabled);
                    activity_log(0, $login, $user, LOG_USER_UPDATE, "{$ufirstname} {$ulastname}" . (empty($uemail) ? '' : " <{$uemail}>"));
                }
            }
        }
    }
}
echo error_check('users.php', false);
开发者ID:rhertzog,项目名称:lcs,代码行数:30,代码来源:edit_user_handler.php


示例8: autopay

 function autopay()
 {
     log_write("debug", "invoice_autopay", "Executing autopay()");
     // check capabilities
     if (!$this->capable) {
         if (!$this->check_autopay_capable()) {
             return 0;
         }
     }
     /*
     	Start SQL Transaction
     */
     $sql_obj = new sql_query();
     $sql_obj->trans_begin();
     /*
     	Load Invoice Data
     */
     $this->obj_invoice = new invoice();
     $this->obj_invoice->id = $this->id_invoice;
     $this->obj_invoice->type = $this->type_invoice;
     if (!$this->obj_invoice->load_data()) {
         log_write("error", "invoice_autopay", "Unable to load invoice data for checking for autopayments");
         return -1;
     }
     /*
     	Make AutoPayments
     */
     // handle credit payments
     $this->autopay_credit();
     // future: credit card, direct debit?
     /*
     	Commit
     */
     if (error_check()) {
         $sql_obj->trans_rollback();
         log_write("error", "invoice_autopay", "An error occured whilst making an invoice autopayment");
         return 0;
     } else {
         $sql_obj->trans_commit();
         return 1;
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:42,代码来源:inc_invoices.php


示例9: mysql_query

				});

		});
	});
</script>
<!---Sends the form results to page "Results1.php" ---> 
<form action="Results1.php" method="post" id = "movie" class="pick">
	<h4>I want to watch a... <h4>
	<!---results stored in variable called genre ---> 
		<select name ="genre" form="movie" class="genre">
			<option value = ""> Select your genre </option> 
				<?php 
// queries the genres from the database
$query = "SELECT name FROM tagtest WHERE type = 'genre'";
$result = mysql_query($query);
error_check($result);
runQueryForm($result);
?>
		</select> 
		<br/><br/>
		<!--The following is the subgenre question-->
	<h4>With a some bit of... <h4>
		<!---results stored in variable called subgenre ---> 
		<select name="subgenre" form="movie" class="subgenre">
			<option selected=""> Select your subgenre </option>
		</select>
	<br/>
	<br/>
	<input type="submit"/>
	<!---submits form ---> 
</form>
开发者ID:johnsoner94,项目名称:PickAFlick,代码行数:31,代码来源:PickAFlickPick.php


示例10: service_invoices_generate


//.........这里部分代码省略.........
                                // nothing todo for these service types
                                log_write("debug", "service_invoicegen", "Not processing usage, this is a non-usage service type");
                                break;
                            default:
                                // we should always match all service types, even if we don't need to do anything
                                // in particular for that type.
                                die("Unable to process unknown service type: " . $obj_service->data["typeid_string"] . "");
                                break;
                        }
                        // end of processing usage
                    } else {
                        log_write("debug", "service_invoicegen", "Not billing for current usage, as this appears to be the first plan period so no usage can exist yet");
                    }
                    /*
                    	Set invoice ID for period - this prevents the period from being added to
                    	any other invoices and allows users to see which invoice it was billed under
                    */
                    // set for plan period
                    $sql_obj = new sql_query();
                    $sql_obj->string = "UPDATE services_customers_periods SET invoiceid='{$invoiceid}', rebill='0' WHERE id='" . $period_data["id"] . "' LIMIT 1";
                    $sql_obj->execute();
                    // set for usage period
                    if (!empty($period_usage_data["active"])) {
                        $sql_obj = new sql_query();
                        $sql_obj->string = "UPDATE services_customers_periods SET invoiceid_usage='{$invoiceid}' WHERE id='" . $period_usage_data["id"] . "' LIMIT 1";
                        $sql_obj->execute();
                    }
                }
                // end of processing periods
                /*
                	Only process orders and invoice
                	summary details if we had no errors above.
                */
                if (!error_check()) {
                    /*
                    	Process any customer orders
                    */
                    if ($GLOBALS["config"]["ORDERS_BILL_ONSERVICE"]) {
                        log_write("debug", "inc_service_invoicegen", "Checking for customer orders to add to service invoice");
                        $obj_customer_orders = new customer_orders();
                        $obj_customer_orders->id = $customer_data["id"];
                        if ($obj_customer_orders->check_orders_num()) {
                            log_write("debug", "inc_service_invoicegen", "Order items exist, adding them to service invoice");
                            $obj_customer_orders->invoice_generate($invoiceid);
                        }
                    } else {
                        log_write("debug", "inc_service_invoicegen", "Not checking for customer orders, ORDERS_BILL_ONSERVICE is disabled currently");
                    }
                    /*
                    	Update the invoice details + Ledger
                    
                    	Processes:
                    	- taxes
                    	- ledger
                    	- invoice summary
                    
                    	We use the invoice_items class to perform these tasks, but we don't need
                    	to define an item ID for the functions being used to work.
                    */
                    $invoice = new invoice_items();
                    $invoice->id_invoice = $invoiceid;
                    $invoice->type_invoice = "ar";
                    $invoice->action_update_tax();
                    $invoice->action_update_ledger();
                    $invoice->action_update_total();
                    unset($invoice);
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:67,代码来源:inc_services_invoicegen.php


示例11: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "name_server_group_edit";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "servers/group-edit-process.php";
     $this->obj_form->method = "post";
     // general
     $structure = NULL;
     $structure["fieldname"] = "group_name";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "group_description";
     $structure["type"] = "textarea";
     $this->obj_form->add_input($structure);
     // group members
     $member_servers = "";
     $obj_sql = new sql_query();
     $obj_sql->string = "SELECT id, server_name FROM name_servers WHERE id_group='" . $this->obj_name_server_group->id . "' ORDER BY server_name";
     $obj_sql->execute();
     if ($obj_sql->num_rows()) {
         $obj_sql->fetch_array();
         $count = 0;
         foreach ($obj_sql->data as $data) {
             $count++;
             $member_servers .= "<a href=\"index.php?page=servers/view.php&id=" . $data["id"] . "\">" . $data["server_name"] . "</a>";
             if ($count != $obj_sql->data_num_rows) {
                 $member_servers .= "<br> ";
             }
         }
     }
     $structure = NULL;
     $structure["fieldname"] = "group_member_servers";
     $structure["type"] = "text";
     $structure["options"]["nohidden"] = 1;
     $structure["defaultvalue"] = $member_servers;
     $this->obj_form->add_input($structure);
     $member_domains = "";
     $obj_sql = new sql_query();
     $obj_sql->string = "SELECT id, domain_name FROM dns_domains WHERE id IN (SELECT id_domain FROM dns_domains_groups WHERE id_group='" . $this->obj_name_server_group->id . "') ORDER BY domain_name";
     $obj_sql->execute();
     if ($obj_sql->num_rows()) {
         $obj_sql->fetch_array();
         $count = 0;
         foreach ($obj_sql->data as $data) {
             $count++;
             $member_domains .= "<a href=\"index.php?page=domains/view.php&id=" . $data["id"] . "\">" . $data["domain_name"] . "</a>";
             if ($count != $obj_sql->data_num_rows) {
                 $member_domains .= "<br> ";
             }
         }
     }
     $structure = NULL;
     $structure["fieldname"] = "group_member_domains";
     $structure["type"] = "text";
     $structure["options"]["nohidden"] = 1;
     $structure["defaultvalue"] = $member_domains;
     $this->obj_form->add_input($structure);
     // hidden section
     $structure = NULL;
     $structure["fieldname"] = "id_name_server_group";
     $structure["type"] = "hidden";
     $structure["defaultvalue"] = $this->obj_name_server_group->id;
     $this->obj_form->add_input($structure);
     // submit section
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "Save Changes";
     $this->obj_form->add_input($structure);
     // define subforms
     $this->obj_form->subforms["group_details"] = array("group_name", "group_description");
     $this->obj_form->subforms["group_members"] = array("group_member_servers", "group_member_domains");
     $this->obj_form->subforms["hidden"] = array("id_name_server_group");
     $this->obj_form->subforms["submit"] = array("submit");
     // import data
     if (error_check()) {
         $this->obj_form->load_data_error();
     } else {
         if ($this->obj_name_server_group->load_data()) {
             $this->obj_form->structure["group_name"]["defaultvalue"] = $this->obj_name_server_group->data["group_name"];
             $this->obj_form->structure["group_description"]["defaultvalue"] = $this->obj_name_server_group->data["group_description"];
         }
     }
 }
开发者ID:kissingwolf,项目名称:namedmanager,代码行数:90,代码来源:group-view.php


示例12: validate

function validate($data)
{
    //print_r($data);
    /* check for Null all values are required */
    foreach ($data as $key => $val) {
        if ($val == "") {
            error_check("Missing field {$key}.<br>");
        }
    }
}
开发者ID:jewelhuq,项目名称:myitcrm1,代码行数:10,代码来源:index.php


示例13: action_delete

 function action_delete()
 {
     log_debug("journal_process", "Executing action_delete()");
     /*
     	Start Transaction
     */
     $sql_obj = new sql_query();
     $sql_obj->trans_begin();
     /*
     	Delete files (if applicable)
     */
     if ($this->structure["type"] == "file") {
         $file_obj = new file_storage();
         $file_obj->data["type"] = "journal";
         $file_obj->data["customid"] = $this->structure["id"];
         $file_obj->load_data_bytype();
         $file_obj->action_delete();
     }
     /*
     	Delete journal record
     */
     $sql_obj->string = "DELETE FROM `journal` WHERE id='" . $this->structure["id"] . "' LIMIT 1";
     $sql_obj->execute();
     /*
     	Commit
     */
     if (error_check()) {
         log_write("error", "journal_process", "An error occured preventing the journal record from being deleted");
         $sql_obj->trans_rollback();
         return 0;
     } else {
         log_write("notification", "journal_process", "Journal record cleanly removed.");
         $sql_obj->trans_commit();
         return 1;
     }
     return 0;
 }
开发者ID:claybbs,项目名称:namedmanager,代码行数:37,代码来源:inc_journal.php


示例14: bundle_service_delete

 function bundle_service_delete($id_service)
 {
     log_write("debug", "inc_services", "Executing bundle_service_delete({$id_service}))");
     /*
     	Begin Transaction
     */
     $sql_obj = new sql_query();
     $sql_obj->trans_begin();
     /*
     	Apply Changes
     */
     $sql_obj->string = "SELECT id FROM `services_bundles` WHERE id_bundle='" . $this->id . "' AND id_service='{$id_service}' LIMIT 1";
     $sql_obj->execute();
     $sql_obj->fetch_array();
     $option_id = $sql_obj->data[0]["id"];
     $sql_obj->string = "DELETE FROM `services_bundles` WHERE id='{$option_id}' LIMIT 1";
     $sql_obj->execute();
     $sql_obj->string = "DELETE FROM `services_options` WHERE option_type='bundle' AND option_type_id='{$option_id}'";
     $sql_obj->execute();
     /*
     	Update the Journal
     */
     journal_quickadd_event("services", $this->id, "Service component removed from bundle.");
     /*
     	Commit
     */
     if (error_check()) {
         $sql_obj->trans_rollback();
         log_write("error", "process", "An error occured whilst attempting to remove a service from the bundle. No changes have been made.");
     } else {
         $sql_obj->trans_commit();
         log_write("notification", "process", "Service successfully removed from bundle.");
     }
     return 0;
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:35,代码来源:inc_services.php


示例15: graph_cumulative_bydate

function graph_cumulative_bydate($p_metrics, $p_graph_width = 300, $p_graph_height = 380)
{
    $t_graph_font = graph_get_font();
    error_check(is_array($p_metrics) ? count($p_metrics) : 0, lang_get('cumulative') . ' ' . lang_get('by_date'));
    foreach ($p_metrics as $i => $vals) {
        if ($i > 0) {
            $plot_date[] = $i;
            $reported_plot[] = $p_metrics[$i][0];
            $resolved_plot[] = $p_metrics[$i][1];
            $still_open_plot[] = $p_metrics[$i][2];
        }
    }
    $graph = new Graph($p_graph_width, $p_graph_height);
    $graph->img->SetMargin(40, 40, 40, 170);
    $graph->img->SetAntiAliasing();
    $graph->SetScale('linlin');
    $graph->SetMarginColor('white');
    $graph->SetFrame(false);
    $graph->title->Set(lang_get('cumulative') . ' ' . lang_get('by_date'));
    $graph->title->SetFont($t_graph_font, FS_BOLD);
    $graph->legend->Pos(0.05, 0.9, 'right', 'bottom');
    $graph->legend->SetShadow(false);
    $graph->legend->SetFillColor('white');
    $graph->legend->SetLayout(LEGEND_HOR);
    $graph->legend->SetFont($t_graph_font);
    $graph->yaxis->scale->ticks->SetDirection(-1);
    $graph->yaxis->SetFont($t_graph_font);
    if (FF_FONT2 <= $t_graph_font) {
        $graph->xaxis->SetLabelAngle(60);
    } else {
        $graph->xaxis->SetLabelAngle(90);
        # can't rotate non truetype fonts
    }
    $graph->xaxis->SetLabelFormatCallback('graph_date_format');
    $graph->xaxis->SetFont($t_graph_font);
    $p1 = new LinePlot($reported_plot, $plot_date);
    $p1->SetColor('blue');
    $p1->SetCenter();
    $p1->SetLegend(lang_get('legend_reported'));
    $graph->Add($p1);
    $p3 = new LinePlot($still_open_plot, $plot_date);
    $p3->SetColor('red');
    $p3->SetCenter();
    $p3->SetLegend(lang_get('legend_still_open'));
    $graph->Add($p3);
    $p2 = new LinePlot($resolved_plot, $plot_date);
    $p2->SetColor('black');
    $p2->SetCenter();
    $p2->SetLegend(lang_get('legend_resolved'));
    $graph->Add($p2);
    if (ON == config_get('show_queries_count')) {
        $graph->subtitle->Set(db_count_queries() . ' queries (' . db_count_unique_queries() . ' unique) (' . db_time_queries() . 'sec)');
        $graph->subtitle->SetFont($t_graph_font, FS_NORMAL, 8);
    }
    $graph->Stroke();
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:56,代码来源:graph_api.php


示例16: graph_cumulative_bydate2

function graph_cumulative_bydate2($p_metrics, $p_graph_width = 300, $p_graph_height = 380)
{
    $t_graph_font = 'c:\\windows\\fonts\\arial.ttf';
    //graph_get_font();
    error_check(is_array($p_metrics) ? count($p_metrics) : 0, plugin_lang_get('cumulative') . ' ' . lang_get('by_date'));
    $graph = new ezcGraphLineChart();
    $graph->xAxis = new ezcGraphChartElementNumericAxis();
    $graph->data[0] = new ezcGraphArrayDataSet($p_metrics[0]);
    $graph->data[0]->label = plugin_lang_get('legend_reported');
    $graph->data[0]->color = '#FF0000';
    $graph->data[1] = new ezcGraphArrayDataSet($p_metrics[1]);
    $graph->data[1]->label = plugin_lang_get('legend_resolved');
    $graph->data[1]->color = '#0000FF';
    $graph->data[2] = new ezcGraphArrayDataSet($p_metrics[2]);
    $graph->data[2]->label = plugin_lang_get('legend_still_open');
    $graph->data[2]->color = '#000000';
    $graph->additionalAxis[2] = $nAxis = new ezcGraphChartElementNumericAxis();
    $nAxis->chartPosition = 1;
    $nAxis->background = '#005500';
    $nAxis->border = '#005500';
    $nAxis->position = ezcGraph::BOTTOM;
    $graph->data[2]->yAxis = $nAxis;
    $graph->xAxis->labelCallback = 'graph_date_format';
    $graph->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
    $graph->xAxis->axisLabelRenderer->angle = -45;
    //$graph->xAxis->axisSpace = .8;
    $graph->legend->position = ezcGraph::BOTTOM;
    $graph->legend->background = '#FFFFFF80';
    $graph->driver = new ezcGraphGdDriver();
    //$graph->driver->options->supersampling = 1;
    $graph->driver->options->jpegQuality = 100;
    $graph->driver->options->imageFormat = IMG_JPEG;
    //	$graph->img->SetMargin( 40, 40, 40, 170 );
    //	if( ON == config_get_global( 'jpgraph_antialias' ) ) {
    //		$graph->img->SetAntiAliasing();
    //	}
    //	$graph->SetScale( 'linlin');
    //	$graph->yaxis->SetColor("red");
    //	$graph->SetY2Scale("lin");
    //	$graph->SetMarginColor( 'white' );
    //	$graph->SetFrame( false );
    $graph->title = plugin_lang_get('cumulative') . ' ' . lang_get('by_date');
    $graph->options->font = $t_graph_font;
    //	$graph->title->SetFont( $t_graph_font, FS_BOLD );
    /*	$graph->legend->Pos( 0.05, 0.9, 'right', 'bottom' );
    	$graph->legend->SetShadow( false );
    	$graph->legend->SetFillColor( 'white' );
    	$graph->legend->SetLayout( LEGEND_HOR );
    	$graph->legend->SetFont( $t_graph_font );
    
    	$graph->yaxis->scale->ticks->SetDirection( -1 );
    	$graph->yaxis->SetFont( $t_graph_font );
    	$graph->y2axis->SetFont( $t_graph_font );
    
    	if( FF_FONT2 <= $t_graph_font ) {
    		$graph->xaxis->SetLabelAngle( 60 );
    	} else {
    		$graph->xaxis->SetLabelAngle( 90 );
    
    		# can't rotate non truetype fonts
    	}
    	$graph->xaxis->SetLabelFormatCallback( 'graph_date_format' );
    	$graph->xaxis->SetFont( $t_graph_font );
    
    	$p1 = new LinePlot( $reported_plot, $plot_date );
    	$p1->SetColor( 'blue' );
    	$p1->SetCenter();
    	$graph->AddY2( $p1 );
    
    	$p3 = new LinePlot( $still_open_plot, $plot_date );
    	$p3->SetColor( 'red' );
    	$p3->SetCenter();
    	$p3->SetLegend(  );
    	$graph->Add( $p3 );
    
    	$p2 = new LinePlot( $resolved_plot, $plot_date );
    	$p2->SetColor( 'black' );
    	$p2->SetCenter();
    	$p2->SetLegend(  );
    	$graph->AddY2( $p2 );
    */
    /*	if( helper_show_queries() ) {
    		$graph->subtitle->Set( db_count_queries() . ' queries (' . db_time_queries() . 'sec)' );
    		$graph->subtitle->SetFont( $t_graph_font, FS_NORMAL, 8 );
    	}*/
    $graph->renderToOutput($p_graph_width, $p_graph_height);
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:87,代码来源:summary_graph_cumulative_bydate2.php


示例17: service_form_delete_process

function service_form_delete_process()
{
    log_debug("inc_services_process", "Executing service_form_delete_process()");
    /*
    	Fetch all form data
    */
    // get form data
    $id = @security_form_input_predefined("int", "id_service", 1, "");
    $data["delete_confirm"] = @security_form_input_predefined("any", "delete_confirm", 1, "You must confirm the deletion");
    //// ERROR CHECKING ///////////////////////
    // make sure the service actually exists
    $sql_obj = new sql_query();
    $sql_obj->string = "SELECT id FROM services WHERE id='{$id}' LIMIT 1";
    $sql_obj->execute();
    if (!$sql_obj->num_rows()) {
        log_write("error", "process", "The service you have attempted to edit - {$id} - does not exist in this system.");
    }
    // make sure the service is not active for any customers
    $sql_obj = new sql_query();
    $sql_obj->string = "SELECT id FROM services_customers WHERE serviceid='{$id}' LIMIT 1";
    $sql_obj->execute();
    if ($sql_obj->num_rows()) {
        log_write("error", "process", "Service is active for customers and can therefore not be deleted.");
    }
    /// if there was an error, go back to the entry page
    if ($_SESSION["error"]["message"]) {
        $_SESSION["error"]["form"]["service_delete"] = "failed";
        header("Location: ../index.php?page=services/delete.php&id={$id}");
        exit(0);
    } else {
        /*
        	Begin Transaction
        */
        $sql_obj = new sql_query();
        $sql_obj->trans_begin();
        /*
        	Delete the service data
        */
        $sql_obj->string = "DELETE FROM services WHERE id='{$id}' LIMIT 1";
        $sql_obj->execute();
        /*
        	Delete the service taxes
        */
        $sql_obj->string = "DELETE FROM services_taxes WHERE serviceid='{$id}'";
        $sql_obj->execute();
        /*
        	Delete the service bundle components (if any)
        */
        $sql_bundle_obj = new sql_query();
        $sql_bundle_obj->string = "SELECT id FROM services_bundles WHERE id_service='{$id}'";
        $sql_bundle_obj->execute();
        if ($sql_bundle_obj->num_rows()) {
            $sql_bundle_obj->fetch_array();
            foreach ($sql_bundle_obj->data as $data_bundle) {
                // delete any options for each bundle item
                $sql_obj->string = "DELETE FROM services_options WHERE option_type='service' AND option_type_id='" . $data_bundle["id"] . "'";
                $sql_obj->execute();
            }
        }
        $sql_obj->string = "DELETE FROM services_bundles WHERE id_service='{$id}'";
        $sql_obj->execute();
        /*
        	Delete the service cdr rate overrides (if any)
        */
        $sql_obj->string = "DELETE FROM cdr_rate_tables_overrides WHERE option_type='service' AND option_type_id='{$id}'";
        $sql_obj->execute();
        /*
        	Delete service journal data
        */
        journal_delete_entire("services", $id);
        /*
        	Commit
        */
        if (error_check()) {
            $sql_obj->trans_rollback();
            log_write("error", "process", "An error occured whilst attempting to delete the transaction. No changes have been made.");
            header("Location: ../index.php?page=services/view.php&id={$id}");
            exit(0);
        } else {
            $sql_obj->trans_ 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP error_code函数代码示例发布时间:2022-05-15
下一篇:
PHP error_box函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap