本文整理汇总了PHP中customer::verify_uniqueness_contact方法的典型用法代码示例。如果您正苦于以下问题:PHP customer::verify_uniqueness_contact方法的具体用法?PHP customer::verify_uniqueness_contact怎么用?PHP customer::verify_uniqueness_contact使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类customer
的用法示例。
在下文中一共展示了customer::verify_uniqueness_contact方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// don't allow a date closed to be set if there are active services belonging to this customer
if (!$obj_customer->verify_date_end()) {
log_write("error", "process", "You can not close this customer, as there are still active services on this account");
$_SESSION["error"]["date_end-error"] = 1;
}
//make sure each contact has a name
for ($i = 0; $i < $num_contacts; $i++) {
if (!$obj_customer->verify_name_contact($i)) {
log_write("error", "process", "Each contact must be given a name - please ensure each contact has been assigned a unique name");
error_flag_field("contact_" . $i);
log_debug("edit-process", "NO NAME ERROR FLAG: contact_" . $i);
}
}
//make sure each contact name is unique
for ($i = 0; $i < $num_contacts; $i++) {
$uniqueness = $obj_customer->verify_uniqueness_contact($i);
if ($uniqueness != "unique") {
log_write("error", "process", "You have assigned the same name to two or more contacts - please choose unique names");
error_flag_field("contact_" . $i);
error_flag_field("contact_" . $uniqueness);
}
}
// return to input page if any errors occurred
if ($_SESSION["error"]["message"]) {
if ($obj_customer->id) {
$_SESSION["error"]["form"]["customer_view"] = "failed";
header("Location: ../index.php?page=customers/view.php&id=" . $obj_customer->id . "");
exit(0);
} else {
$_SESSION["error"]["form"]["customer_add"] = "failed";
header("Location: ../index.php?page=customers/add.php");