Multilinguified Call Flows.
This commit is contained in:
parent
252af521b2
commit
9d8886b925
|
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
|
||||
//Call Flows
|
||||
|
||||
$text['title-call_flows']['en-us'] = 'Call Flows';
|
||||
$text['title-call_flows']['pt-pt'] = '';
|
||||
|
||||
$text['header-call_flows']['en-us'] = 'Call Flows';
|
||||
$text['header-call_flows']['pt-pt'] = '';
|
||||
|
||||
$text['description-call_flows']['en-us'] = 'Direct calls between two destinations by calling a feature code.';
|
||||
$text['description-call_flows']['pt-pt'] = '';
|
||||
|
||||
//------
|
||||
|
||||
$text['title-call_flow-edit']['en-us'] = 'Call Flow Edit';
|
||||
$text['title-call_flow-edit']['pt-pt'] = '';
|
||||
|
||||
$text['header-call_flow-edit']['en-us'] = 'Call Flow Edit';
|
||||
$text['header-call_flow-edit']['pt-pt'] = '';
|
||||
|
||||
//------
|
||||
|
||||
$text['title-call_flow-add']['en-us'] = 'Call Flow Add';
|
||||
$text['title-call_flow-add']['pt-pt'] = '';
|
||||
|
||||
$text['header-call_flow-add']['en-us'] = 'Call Flow Add';
|
||||
$text['header-call_flow-add']['pt-pt'] = '';
|
||||
|
||||
//------
|
||||
|
||||
$text['label-name']['en-us'] = 'Name';
|
||||
$text['label-name']['pt-pt'] = '';
|
||||
|
||||
$text['description-name']['en-us'] = 'Enter the name.';
|
||||
$text['description-name']['pt-pt'] = '';
|
||||
|
||||
$text['label-extension']['en-us'] = 'Extension';
|
||||
$text['label-extension']['pt-pt'] = '';
|
||||
|
||||
$text['description-extension']['en-us'] = 'Enter the extension number.';
|
||||
$text['description-extension']['pt-pt'] = '';
|
||||
|
||||
$text['label-feature_code']['en-us'] = 'Feature Code';
|
||||
$text['label-feature_code']['pt-pt'] = '';
|
||||
|
||||
$text['description-feature_code']['en-us'] = 'Enter the feature code.';
|
||||
$text['description-feature_code']['pt-pt'] = '';
|
||||
|
||||
$text['label-context']['en-us'] = 'Context';
|
||||
$text['label-context']['pt-pt'] = '';
|
||||
|
||||
$text['description-context']['en-us'] = 'Enter the context.';
|
||||
$text['description-context']['pt-pt'] = '';
|
||||
|
||||
$text['label-status']['en-us'] = 'Status';
|
||||
$text['label-status']['pt-pt'] = '';
|
||||
|
||||
$text['description-status']['en-us'] = 'Select the status.';
|
||||
$text['description-status']['pt-pt'] = '';
|
||||
|
||||
$text['label-pin_number']['en-us'] = 'PIN Number';
|
||||
$text['label-pin_number']['pt-pt'] = '';
|
||||
|
||||
$text['description-pin_number']['en-us'] = 'Enter the pin number.';
|
||||
$text['description-pin_number']['pt-pt'] = '';
|
||||
|
||||
$text['label-destination_label']['en-us'] = 'Destination Label';
|
||||
$text['label-destination_label']['pt-pt'] = '';
|
||||
|
||||
$text['description-destination_label']['en-us'] = 'Enter the destination label.';
|
||||
$text['description-destination_label']['pt-pt'] = '';
|
||||
|
||||
$text['label-destination']['en-us'] = 'Destination';
|
||||
$text['label-destination']['pt-pt'] = '';
|
||||
|
||||
$text['description-destination']['en-us'] = 'Select the destination.';
|
||||
$text['description-destination']['pt-pt'] = '';
|
||||
|
||||
$text['label-alternate_label']['en-us'] = 'Alternate Label';
|
||||
$text['label-alternate_label']['pt-pt'] = '';
|
||||
|
||||
$text['description-alternate_label']['en-us'] = 'Enter the alternate destination label.';
|
||||
$text['description-alternate_label']['pt-pt'] = '';
|
||||
|
||||
$text['label-alternate_destination']['en-us'] = 'Alternate Destination';
|
||||
$text['label-alternate_destination']['pt-pt'] = '';
|
||||
|
||||
$text['description-alternate_destination']['en-us'] = 'Select the alternate destination.';
|
||||
$text['description-alternate_destination']['pt-pt'] = '';
|
||||
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
$text['label-description']['pt-pt'] = '';
|
||||
|
||||
$text['description-description']['en-us'] = 'Enter a description, if desired.';
|
||||
$text['description-description']['pt-pt'] = '';
|
||||
|
||||
$text['label-true']['en-us'] = 'True';
|
||||
$text['label-true']['pt-pt'] = '';
|
||||
|
||||
$text['label-false']['en-us'] = 'False';
|
||||
$text['label-false']['pt-pt'] = 'falso';
|
||||
|
||||
$text['label-none']['en-us'] = 'None';
|
||||
$text['label-none']['pt-pt'] = '';
|
||||
|
||||
$text['button-add']['en-us'] = 'Add';
|
||||
$text['button-add']['pt-pt'] = '';
|
||||
|
||||
$text['button-edit']['en-us'] = 'Edit';
|
||||
$text['button-edit']['pt-pt'] = '';
|
||||
|
||||
$text['button-delete']['en-us'] = 'Delete';
|
||||
$text['button-delete']['pt-pt'] = '';
|
||||
|
||||
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||
$text['confirm-delete']['pt-pt'] = '';
|
||||
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
$text['button-save']['pt-pt'] = 'Guardar';
|
||||
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
$text['button-back']['pt-pt'] = 'Voltar';
|
||||
|
||||
$text['message-message']['en-us'] = 'Message';
|
||||
$text['message-message']['pt-pt'] = '';
|
||||
|
||||
$text['message-add']['en-us'] = 'Add Completed';
|
||||
$text['message-add']['pt-pt'] = '';
|
||||
|
||||
$text['message-update']['en-us'] = 'Update Completed';
|
||||
$text['message-update']['pt-pt'] = '';
|
||||
|
||||
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||
$text['message-delete']['pt-pt'] = '';
|
||||
|
||||
$text['message-required']['en-us'] = 'Please provide: ';
|
||||
$text['message-required']['pt-pt'] = '';
|
||||
|
||||
?>
|
||||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
|
|
@ -90,7 +96,7 @@ if (strlen($id)>0) {
|
|||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ else {
|
|||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//action add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
|
|
@ -89,20 +95,20 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($call_flow_name) == 0) { $msg .= "Please provide: Name<br>\n"; }
|
||||
if (strlen($call_flow_extension) == 0) { $msg .= "Please provide: Extension<br>\n"; }
|
||||
//if (strlen($call_flow_feature_code) == 0) { $msg .= "Please provide: Feature Code<br>\n"; }
|
||||
if (strlen($call_flow_context) == 0) { $msg .= "Please provide: Context<br>\n"; }
|
||||
//if (strlen($call_flow_status) == 0) { $msg .= "Please provide: Status<br>\n"; }
|
||||
//if (strlen($call_flow_pin_number) == 0) { $msg .= "Please provide: PIN Number<br>\n"; }
|
||||
//if (strlen($call_flow_status) == 0) { $msg .= "Please provide: Status<br>\n"; }
|
||||
//if (strlen($call_flow_label) == 0) { $msg .= "Please provide: Destination Label<br>\n"; }
|
||||
//if (strlen($call_flow_app) == 0) { $msg .= "Please provide: Application<br>\n"; }
|
||||
//if (strlen($call_flow_data) == 0) { $msg .= "Please provide: Application Data<br>\n"; }
|
||||
//if (strlen($call_flow_anti_label) == 0) { $msg .= "Please provide: Alternate Destination Label<br>\n"; }
|
||||
//if (strlen($call_flow_anti_app) == 0) { $msg .= "Please provide: Alternate Application<br>\n"; }
|
||||
//if (strlen($call_flow_anti_data) == 0) { $msg .= "Please provide: Application Data<br>\n"; }
|
||||
//if (strlen($call_flow_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($call_flow_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
||||
if (strlen($call_flow_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
//if (strlen($call_flow_feature_code) == 0) { $msg .= $text['message-required'].$text['label-feature_code']."<br>\n"; }
|
||||
if (strlen($call_flow_context) == 0) { $msg .= $text['message-required'].$text['label-context']."<br>\n"; }
|
||||
//if (strlen($call_flow_status) == 0) { $msg .= $text['message-required'].$text['label-status']."<br>\n"; }
|
||||
//if (strlen($call_flow_pin_number) == 0) { $msg .= $text['message-required'].$text['label-pin_number']."<br>\n"; }
|
||||
//if (strlen($call_flow_status) == 0) { $msg .= $text['message-required'].$text['label-status']."<br>\n"; }
|
||||
//if (strlen($call_flow_label) == 0) { $msg .= $text['message-required'].$text['label-destination_label']."<br>\n"; }
|
||||
//if (strlen($call_flow_app) == 0) { $msg .= $text['message-required'].$text['label-destination']."<br>\n"; }
|
||||
//if (strlen($call_flow_data) == 0) { $msg .= $text['message-required'].$text['label-destination']."<br>\n"; }
|
||||
//if (strlen($call_flow_anti_label) == 0) { $msg .= $text['message-required'].$text['label-alternate_label']."<br>\n"; }
|
||||
//if (strlen($call_flow_anti_app) == 0) { $msg .= $text['message-required'].$text['label-alternate_destination']."<br>\n"; }
|
||||
//if (strlen($call_flow_anti_data) == 0) { $msg .= $text['message-required'].$text['label-alternate_destination']."<br>\n"; }
|
||||
//if (strlen($call_flow_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
|
|
@ -351,16 +357,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
if ($action == "add") {
|
||||
echo "Add Complete\n";
|
||||
echo $text['message-add']."\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
}
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
}
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
|
|
@ -420,6 +426,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
if ($action == "update") {
|
||||
$page["title"] = $text['title-call_flow-edit'];
|
||||
}
|
||||
if ($action == "add") {
|
||||
$page["title"] = $text['title-call_flow-add'];
|
||||
}
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
|
|
@ -432,57 +444,64 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>Call Flow</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='call_flows.php'\" value='Back'></td>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>";
|
||||
if ($action == "update") {
|
||||
echo $text['header-call_flow-edit'];
|
||||
}
|
||||
if ($action == "add") {
|
||||
echo $text['header-call_flow-add'];
|
||||
}
|
||||
echo "</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='call_flows.php'\" value='".$text['button-back']."'></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Name:\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_name' maxlength='255' value=\"$call_flow_name\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the name.\n";
|
||||
echo $text['description-name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Extension:\n";
|
||||
echo " ".$text['label-extension'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_extension' maxlength='255' value=\"$call_flow_extension\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the extension number.\n";
|
||||
echo $text['description-extension']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Feature Code:\n";
|
||||
echo " ".$text['label-feature_code'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_feature_code' maxlength='255' value=\"$call_flow_feature_code\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the feature code.\n";
|
||||
echo $text['description-feature_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Context:\n";
|
||||
echo " ".$text['label-context'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_context' maxlength='255' value=\"$call_flow_context\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the context.\n";
|
||||
echo $text['description-context']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Status:\n";
|
||||
echo " ".$text['label-status'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='call_flow_status'>\n";
|
||||
|
|
@ -492,7 +511,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <option value='true' selected='selected'>$call_flow_label</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true' selected='selected'>true</option>\n";
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -500,7 +519,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <option value='true'>$call_flow_label</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
}
|
||||
if ($call_flow_status == "false") {
|
||||
|
|
@ -508,7 +527,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <option value='false' selected='selected'>$call_flow_anti_label</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false' selected='selected'>false</option>\n";
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -516,40 +535,40 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <option value='false'>$call_flow_anti_label</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo "Select the status.\n";
|
||||
echo $text['description-status']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " PIN Number:\n";
|
||||
echo " ".$text['label-pin_number'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_pin_number' maxlength='255' value=\"$call_flow_pin_number\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the pin number\n";
|
||||
echo $text['description-pin_number']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Destination Label:\n";
|
||||
echo " ".$text['label-destination_label'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_label' maxlength='255' value=\"$call_flow_label\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the destination label\n";
|
||||
echo $text['description-destination_label']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Destination:\n";
|
||||
echo " ".$text['label-destination'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$select_value = '';
|
||||
|
|
@ -562,24 +581,24 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
switch_select_destination("dialplan", $destination_label, "call_flow_destination", $select_value, "", $call_flow_data);
|
||||
unset($select_value);
|
||||
echo "<br />\n";
|
||||
echo "Select the destination.\n";
|
||||
echo $text['description-destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Alternate Label:\n";
|
||||
echo " ".$text['label-alternate_label'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_anti_label' maxlength='255' value=\"$call_flow_anti_label\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the alternate destination label\n";
|
||||
echo $text['description-alternate_label']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Alternate Destination:\n";
|
||||
echo " ".$text['label-alternate_destination'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
//switch_select_destination($select_type, $select_label, $select_name, $select_value, $select_style, $action='')
|
||||
|
|
@ -590,18 +609,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
switch_select_destination("dialplan", $alternate_destination_label, "call_flow_alternate_destination", $select_value, "", $call_flow_anti_data);
|
||||
unset($select_value);
|
||||
echo "<br />\n";
|
||||
echo "Select the alternate destination.\n";
|
||||
echo $text['description-alternate_destination']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Description:\n";
|
||||
echo " ".$text['label-description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"$call_flow_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "Enter the description.\n";
|
||||
echo $text['description-description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
|
|
@ -611,7 +630,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <input type='hidden' name='call_flow_uuid' value='$call_flow_uuid'>\n";
|
||||
echo " <input type='hidden' name='dialplan_uuid' value='$dialplan_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
|
|
|
|||
|
|
@ -33,7 +33,16 @@ else {
|
|||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-call_flows'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//get variables used to control the order
|
||||
|
|
@ -49,12 +58,12 @@ require_once "includes/paging.php";
|
|||
|
||||
echo "<table width='100%' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>Call Flows</b></td>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['header-call_flows']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " Direct calls between two destinations by calling a feature code.<br /><br />\n";
|
||||
echo " ".$text['description-call_flows']."<br /><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
|
|
@ -79,9 +88,9 @@ require_once "includes/paging.php";
|
|||
$rows_per_page = 10;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_call_flows ";
|
||||
|
|
@ -101,16 +110,16 @@ require_once "includes/paging.php";
|
|||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('call_flow_status', 'Status', $order_by, $order);
|
||||
//echo th_order_by('call_flow_name', 'Name', $order_by, $order);
|
||||
echo th_order_by('call_flow_extension', 'Extension', $order_by, $order);
|
||||
echo th_order_by('call_flow_feature_code', 'Feature Code', $order_by, $order);
|
||||
//echo "<th>Destination</th>\n";
|
||||
//echo "<th>Alternate Destination</th>\n";
|
||||
echo th_order_by('call_flow_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('call_flow_status', $text['label-status'], $order_by, $order);
|
||||
//echo th_order_by('call_flow_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('call_flow_extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('call_flow_feature_code', $text['label-feature_code'], $order_by, $order);
|
||||
//echo "<th>".$text['label-destination']."</th>\n";
|
||||
//echo "<th>".$text['label-alternate_destination']."</th>\n";
|
||||
echo th_order_by('call_flow_description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('call_flow_add')) {
|
||||
echo " <a href='call_flow_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='call_flow_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
|
|
@ -138,10 +147,10 @@ require_once "includes/paging.php";
|
|||
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['call_flow_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('call_flow_edit')) {
|
||||
echo " <a href='call_flow_edit.php?id=".$row['call_flow_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='call_flow_edit.php?id=".$row['call_flow_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('call_flow_delete')) {
|
||||
echo " <a href='call_flow_delete.php?id=".$row['call_flow_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='call_flow_delete.php?id=".$row['call_flow_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
@ -158,7 +167,7 @@ require_once "includes/paging.php";
|
|||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('call_flow_add')) {
|
||||
echo " <a href='call_flow_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='call_flow_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue