mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-05 23:49:19 +00:00
Multilingualified the Extensions app. Added ability to preset the new extension when the Copy button is clicked.
This commit is contained in:
@@ -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-extensions'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//get the http values and set them as variables
|
||||
@@ -52,14 +61,14 @@ require_once "includes/paging.php";
|
||||
//show the content header
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"6\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'><b>Extensions</b><br>\n";
|
||||
echo " Use this to configure your SIP extensions.\n";
|
||||
echo " <td align='left'><b>".$text['header-extensions']."</b><br>\n";
|
||||
echo " ".$text['description-extensions']."\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />";
|
||||
|
||||
//get the number of rows in v_extensions
|
||||
//get the number of rows in v_extensions
|
||||
$sql = "select count(*) as num_rows from v_extensions ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
@@ -80,8 +89,8 @@ require_once "includes/paging.php";
|
||||
$param = "";
|
||||
if (!isset($_GET['page'])) { $_GET['page'] = 0; }
|
||||
$_GET['page'] = check_str($_GET['page']);
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $_GET['page'];
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $_GET['page'];
|
||||
|
||||
//get the extension list
|
||||
$sql = "select * from v_extensions ";
|
||||
@@ -106,14 +115,14 @@ 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('extension', 'Extension', $order_by, $order);
|
||||
echo th_order_by('call_group', 'Call Group', $order_by, $order);
|
||||
echo th_order_by('vm_mailto', 'Voicemail Mail To', $order_by, $order);
|
||||
echo th_order_by('enabled', 'Enabled', $order_by, $order);
|
||||
echo th_order_by('description', 'Description', $order_by, $order);
|
||||
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('call_group', $text['label-call_group'], $order_by, $order);
|
||||
echo th_order_by('vm_mailto', $text['label-vm_mailto'], $order_by, $order);
|
||||
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('extension_add')) {
|
||||
echo " <a href='extension_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='extension_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
@@ -128,10 +137,10 @@ require_once "includes/paging.php";
|
||||
echo " <td valign='top' class='row_stylebg' width='30%'>".$row['description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('extension_edit')) {
|
||||
echo " <a href='extension_edit.php?id=".$row['extension_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='extension_edit.php?id=".$row['extension_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('extension_delete')) {
|
||||
echo " <a href='extension_delete.php?id=".$row['extension_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='extension_delete.php?id=".$row['extension_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -148,7 +157,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('extension_add')) {
|
||||
echo " <a href='extension_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='extension_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user