mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 18:36:31 +00:00
Multilinguified Menu Manager
This commit is contained in:
@@ -26,14 +26,23 @@
|
||||
require_once "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (if_group("admin") || if_group("superadmin")) {
|
||||
if (permission_exists('menu_add') || permission_exists('menu_edit') || permission_exists('menu_delete')) {
|
||||
//access granted
|
||||
}
|
||||
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-menus'];
|
||||
|
||||
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>Menu Manager</b></td>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['header-menus']."</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 " Used to customize one or more menus.<br /><br />\n";
|
||||
echo " ".$text['description-menus']."<br /><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
@@ -77,9 +86,9 @@ require_once "includes/paging.php";
|
||||
$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 list
|
||||
$sql = " select * from v_menus ";
|
||||
@@ -98,11 +107,11 @@ 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('menu_name', 'Name', $order_by, $order);
|
||||
echo th_order_by('menu_language', 'Language', $order_by, $order);
|
||||
echo th_order_by('menu_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('menu_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('menu_language', $text['label-language'], $order_by, $order);
|
||||
echo th_order_by('menu_description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo " <a href='menu_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='menu_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
@@ -113,8 +122,8 @@ require_once "includes/paging.php";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['menu_language']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['menu_description']." </td>\n";
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
echo " <a href='menu_edit.php?id=".$row['menu_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='menu_delete.php?id=".$row['menu_uuid']."&menu_uuid=".$row['menu_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='menu_edit.php?id=".$row['menu_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='menu_delete.php?id=".$row['menu_uuid']."&menu_uuid=".$row['menu_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
@@ -129,7 +138,7 @@ require_once "includes/paging.php";
|
||||
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";
|
||||
echo " <a href='menu_edit.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='menu_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
Reference in New Issue
Block a user