Multilinguified Hunt Groups. Fixed Copy functionality, and added JS extension prompt on Copy.
This commit is contained in:
@@ -36,7 +36,15 @@ require_once "includes/checkauth.php";
|
||||
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-hunt_groups'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
$order_by = $_GET["order_by"];
|
||||
@@ -50,10 +58,8 @@ echo " <br />";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <td align='left'><p><span class='vexpl'><span class='red'><strong>Hunt Group<br />\n";
|
||||
echo " </strong></span>\n";
|
||||
echo " A Hunt Group is a list of destinations that can be called in sequence or simultaneously.\n";
|
||||
echo " </span></p></td>\n";
|
||||
echo " <td align='left'><p><span class='vexpl'><span class='red'><strong>".$text['header-hunt_groups']."<br />\n";
|
||||
echo " </strong></span>".$text['description-hunt_groups']."</span></p></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br />\n";
|
||||
@@ -68,7 +74,7 @@ if ($prep_statement) {
|
||||
if ($row['num_rows'] > 0) {
|
||||
$num_rows = $row['num_rows'];
|
||||
}
|
||||
else {
|
||||
else {
|
||||
$num_rows = '0';
|
||||
}
|
||||
}
|
||||
@@ -78,9 +84,9 @@ unset($prep_statement, $result);
|
||||
$rows_per_page = 150;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var_3) = 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, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the hunt group list
|
||||
$sql = "select * from v_hunt_groups ";
|
||||
@@ -105,13 +111,13 @@ $row_style["1"] = "row_style1";
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('hunt_group_extension', 'Extension', $order_by, $order);
|
||||
echo th_order_by('hunt_group_name', 'Hunt Group Name', $order_by, $order);
|
||||
echo th_order_by('hunt_group_name', 'Enabled', $order_by, $order);
|
||||
echo th_order_by('hunt_group_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('hunt_group_extension', $text['label-extension'], $order_by, $order);
|
||||
echo th_order_by('hunt_group_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('hunt_group_name', $text['label-enabled'], $order_by, $order);
|
||||
echo th_order_by('hunt_group_description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if (permission_exists('hunt_group_add')) {
|
||||
echo " <a href='hunt_group_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='hunt_group_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
@@ -121,14 +127,21 @@ if ($result_count > 0) {
|
||||
echo "<tr >\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['hunt_group_extension']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['hunt_group_name']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['hunt_group_enabled']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if ($row['hunt_group_enabled'] == "true") {
|
||||
echo $text['option-true'];
|
||||
}
|
||||
else if ($row['hunt_group_enabled'] == "false") {
|
||||
echo $text['option-false'];
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td valign='top' class='row_stylebg' width='40%'>".$row['hunt_group_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if (permission_exists('hunt_group_edit')) {
|
||||
echo " <a href='hunt_group_edit.php?id=".$row['hunt_group_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='hunt_group_edit.php?id=".$row['hunt_group_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('hunt_group_delete')) {
|
||||
echo " <a href='hunt_group_delete.php?id=".$row['hunt_group_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='hunt_group_delete.php?id=".$row['hunt_group_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -145,7 +158,7 @@ echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
if (permission_exists('hunt_group_add')) {
|
||||
echo " <a href='hunt_group_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='hunt_group_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