if (!$obj_customer->id_service_customer) { $obj_customer->obj_service->id = $data["serviceid"]; if (!$obj_customer->obj_service->verify_id()) { log_write("error", "process", "Unable to find service " . $obj_customer->obj_service->id . ""); } else { $obj_customer->obj_service->load_data(); } } // verify that this is a phone trunk service if ($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 ($obj_ddi->id) { if (!$obj_ddi->verify_id()) { log_write("error", "page_output", "The supplied DDI ID is not valid"); return 0; } } // ensure the DDI range is valid if ($obj_ddi->data["ddi_start"] > $obj_ddi->data["ddi_finish"]) { log_write("error", "process", "The supplied DDI range is invalid, the finish DDI must be the same or higher than the start DDI"); error_flag_field("ddi_start"); error_flag_field("ddi_finish"); } /* Check for any errors */ if (error_check()) { $_SESSION["error"]["form"]["service_ddi_edit"] = "failed";