Multilinguified Call Flows.

This commit is contained in:
Nate Jones
2013-05-14 15:09:15 +00:00
parent 252af521b2
commit 9d8886b925
4 changed files with 237 additions and 63 deletions

View File

@@ -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'>&nbsp;</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 " &nbsp;\n";
@@ -138,10 +147,10 @@ require_once "includes/paging.php";
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['call_flow_description']."&nbsp;</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 " &nbsp;\n";