|
@@ -86,7 +86,7 @@ if (!class_exists('menu')) {
|
|
//build the delete array
|
|
//build the delete array
|
|
$x = 0;
|
|
$x = 0;
|
|
foreach ($records as $record) {
|
|
foreach ($records as $record) {
|
|
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
|
|
|
|
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
//remove menu languages
|
|
//remove menu languages
|
|
$array['menu_languages'][$x][$this->name.'_uuid'] = $record['uuid'];
|
|
$array['menu_languages'][$x][$this->name.'_uuid'] = $record['uuid'];
|
|
|
|
|
|
@@ -156,7 +156,7 @@ if (!class_exists('menu')) {
|
|
//build the delete array
|
|
//build the delete array
|
|
$x = 0;
|
|
$x = 0;
|
|
foreach ($records as $record) {
|
|
foreach ($records as $record) {
|
|
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
|
|
|
|
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
//build array
|
|
//build array
|
|
$uuids[] = "'".$record['uuid']."'";
|
|
$uuids[] = "'".$record['uuid']."'";
|
|
//remove menu languages
|
|
//remove menu languages
|
|
@@ -171,12 +171,12 @@ if (!class_exists('menu')) {
|
|
}
|
|
}
|
|
|
|
|
|
//include child menu items
|
|
//include child menu items
|
|
- if (is_array($uuids) && @sizeof($uuids) != 0) {
|
|
|
|
|
|
+ if (!empty($uuids) && @sizeof($uuids) != 0) {
|
|
$sql = "select menu_item_uuid as uuid from v_".$this->table." ";
|
|
$sql = "select menu_item_uuid as uuid from v_".$this->table." ";
|
|
$sql .= "where menu_item_parent_uuid in (".implode(', ', $uuids).") ";
|
|
$sql .= "where menu_item_parent_uuid in (".implode(', ', $uuids).") ";
|
|
$database = new database;
|
|
$database = new database;
|
|
- $rows = $database->select($sql, $parameters, 'all');
|
|
|
|
- if (is_array($rows) && @sizeof($rows) != 0) {
|
|
|
|
|
|
+ $rows = $database->select($sql, null, 'all');
|
|
|
|
+ if (!empty($rows) && @sizeof($rows) != 0) {
|
|
foreach ($rows as $row) {
|
|
foreach ($rows as $row) {
|
|
//remove menu languages
|
|
//remove menu languages
|
|
$array['menu_languages'][$x][$this->name.'_uuid'] = $row['uuid'];
|
|
$array['menu_languages'][$x][$this->name.'_uuid'] = $row['uuid'];
|
|
@@ -240,12 +240,12 @@ if (!class_exists('menu')) {
|
|
header('Location: '.$this->location);
|
|
header('Location: '.$this->location);
|
|
exit;
|
|
exit;
|
|
}
|
|
}
|
|
-https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805e327
|
|
|
|
|
|
+
|
|
//toggle the checked records
|
|
//toggle the checked records
|
|
if (is_array($records) && @sizeof($records) != 0) {
|
|
if (is_array($records) && @sizeof($records) != 0) {
|
|
//get current toggle state
|
|
//get current toggle state
|
|
foreach ($records as $record) {
|
|
foreach ($records as $record) {
|
|
- if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
|
|
|
|
+ if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
|
$uuids[] = "'".$record['uuid']."'";
|
|
$uuids[] = "'".$record['uuid']."'";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -253,6 +253,7 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$sql = "select ".$this->name."_uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
|
|
$sql = "select ".$this->name."_uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
|
|
$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
|
|
$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
|
|
$database = new database;
|
|
$database = new database;
|
|
|
|
+ $parameters = null;
|
|
$rows = $database->select($sql, $parameters, 'all');
|
|
$rows = $database->select($sql, $parameters, 'all');
|
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
|
foreach ($rows as $row) {
|
|
foreach ($rows as $row) {
|
|
@@ -912,7 +913,7 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
public function menu_horizontal($menu_array) {
|
|
public function menu_horizontal($menu_array) {
|
|
|
|
|
|
//determine menu behavior
|
|
//determine menu behavior
|
|
- $menu_style = $_SESSION['theme']['menu_style']['text'] != '' ? $_SESSION['theme']['menu_style']['text'] : 'fixed';
|
|
|
|
|
|
+ $menu_style = !empty($_SESSION['theme']['menu_style']['text']) ? $_SESSION['theme']['menu_style']['text'] : 'fixed';
|
|
switch ($menu_style) {
|
|
switch ($menu_style) {
|
|
case 'inline':
|
|
case 'inline':
|
|
$menu_type = 'default';
|
|
$menu_type = 'default';
|
|
@@ -949,10 +950,10 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$html .= " <a class='navbar-brand-text' href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
|
|
$html .= " <a class='navbar-brand-text' href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
|
|
break;
|
|
break;
|
|
case 'image_text':
|
|
case 'image_text':
|
|
- $menu_brand_image = ($_SESSION['theme']['menu_brand_image']['text'] != '') ? escape($_SESSION['theme']['menu_brand_image']['text']) : PROJECT_PATH."/themes/default/images/logo.png";
|
|
|
|
|
|
+ $menu_brand_image = (!empty($_SESSION['theme']['menu_brand_image']['text'])) ? escape($_SESSION['theme']['menu_brand_image']['text']) : PROJECT_PATH."/themes/default/images/logo.png";
|
|
$html .= " <a href='".PROJECT_PATH."/'>";
|
|
$html .= " <a href='".PROJECT_PATH."/'>";
|
|
$html .= " <img id='menu_brand_image' class='navbar-logo' src='".$menu_brand_image."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= " <img id='menu_brand_image' class='navbar-logo' src='".$menu_brand_image."' title=\"".escape($menu_brand_text)."\">";
|
|
- if ($_SESSION['theme']['menu_brand_image_hover']['text'] != '') {
|
|
|
|
|
|
+ if (!empty($_SESSION['theme']['menu_brand_image_hover']['text'])) {
|
|
$html .= "<img id='menu_brand_image_hover' class='navbar-logo' style='display: none;' src='".$_SESSION['theme']['menu_brand_image_hover']['text']."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= "<img id='menu_brand_image_hover' class='navbar-logo' style='display: none;' src='".$_SESSION['theme']['menu_brand_image_hover']['text']."' title=\"".escape($menu_brand_text)."\">";
|
|
}
|
|
}
|
|
$html .= "</a>\n";
|
|
$html .= "</a>\n";
|
|
@@ -965,7 +966,7 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$menu_brand_image = !empty($_SESSION['theme']['menu_brand_image']['text']) ? escape($_SESSION['theme']['menu_brand_image']['text']) : PROJECT_PATH."/themes/default/images/logo.png";
|
|
$menu_brand_image = !empty($_SESSION['theme']['menu_brand_image']['text']) ? escape($_SESSION['theme']['menu_brand_image']['text']) : PROJECT_PATH."/themes/default/images/logo.png";
|
|
$html .= " <a href='".PROJECT_PATH."/'>";
|
|
$html .= " <a href='".PROJECT_PATH."/'>";
|
|
$html .= " <img id='menu_brand_image' class='navbar-logo' src='".$menu_brand_image."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= " <img id='menu_brand_image' class='navbar-logo' src='".$menu_brand_image."' title=\"".escape($menu_brand_text)."\">";
|
|
- if (isset($_SESSION['theme']['menu_brand_image_hover']['text']) && $_SESSION['theme']['menu_brand_image_hover']['text'] != '') {
|
|
|
|
|
|
+ if (isset($_SESSION['theme']['menu_brand_image_hover']['text']) && !empty($_SESSION['theme']['menu_brand_image_hover']['text'])) {
|
|
$html .= "<img id='menu_brand_image_hover' class='navbar-logo' style='display: none;' src='".$_SESSION['theme']['menu_brand_image_hover']['text']."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= "<img id='menu_brand_image_hover' class='navbar-logo' style='display: none;' src='".$_SESSION['theme']['menu_brand_image_hover']['text']."' title=\"".escape($menu_brand_text)."\">";
|
|
}
|
|
}
|
|
$html .= "</a>\n";
|
|
$html .= "</a>\n";
|
|
@@ -982,20 +983,20 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$html .= " <div class='collapse navbar-collapse' id='main_navbar'>\n";
|
|
$html .= " <div class='collapse navbar-collapse' id='main_navbar'>\n";
|
|
$html .= " <ul class='navbar-nav'>\n";
|
|
$html .= " <ul class='navbar-nav'>\n";
|
|
|
|
|
|
- if (is_array($menu_array) && sizeof($menu_array) != 0) {
|
|
|
|
|
|
+ if (!empty($menu_array) && sizeof($menu_array) != 0) {
|
|
foreach ($menu_array as $index_main => $menu_parent) {
|
|
foreach ($menu_array as $index_main => $menu_parent) {
|
|
$mod_li = "nav-item";
|
|
$mod_li = "nav-item";
|
|
$mod_a_1 = "";
|
|
$mod_a_1 = "";
|
|
$submenu = false;
|
|
$submenu = false;
|
|
- if (is_array($menu_parent['menu_items']) && sizeof($menu_parent['menu_items']) > 0) {
|
|
|
|
|
|
+ if (!empty($menu_parent['menu_items']) && sizeof($menu_parent['menu_items']) > 0) {
|
|
$mod_li = "nav-item dropdown ";
|
|
$mod_li = "nav-item dropdown ";
|
|
$mod_a_1 = "data-toggle='dropdown' ";
|
|
$mod_a_1 = "data-toggle='dropdown' ";
|
|
$submenu = true;
|
|
$submenu = true;
|
|
}
|
|
}
|
|
- $mod_a_2 = ($menu_parent['menu_item_link'] != '' && !$submenu) ? $menu_parent['menu_item_link'] : '#';
|
|
|
|
|
|
+ $mod_a_2 = (!empty($menu_parent['menu_item_link']) && !$submenu) ? $menu_parent['menu_item_link'] : '#';
|
|
$mod_a_3 = ($menu_parent['menu_item_category'] == 'external') ? "target='_blank' " : null;
|
|
$mod_a_3 = ($menu_parent['menu_item_category'] == 'external') ? "target='_blank' " : null;
|
|
if (isset($_SESSION['theme']['menu_main_icons']['boolean']) && $_SESSION['theme']['menu_main_icons']['boolean'] == 'true') {
|
|
if (isset($_SESSION['theme']['menu_main_icons']['boolean']) && $_SESSION['theme']['menu_main_icons']['boolean'] == 'true') {
|
|
- if ($menu_parent['menu_item_icon'] != '' && substr_count($menu_parent['menu_item_icon'], 'fa-') > 0) {
|
|
|
|
|
|
+ if (!empty($menu_parent['menu_item_icon']) && substr_count($menu_parent['menu_item_icon'], 'fa-') > 0) {
|
|
$menu_main_icon = "<span class='fas ".$menu_parent['menu_item_icon']."' title=\"".escape($menu_parent['menu_language_title'])."\"></span>\n";
|
|
$menu_main_icon = "<span class='fas ".$menu_parent['menu_item_icon']."' title=\"".escape($menu_parent['menu_language_title'])."\"></span>\n";
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -1020,7 +1021,7 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$mod_a_3 = ($menu_sub['menu_item_category'] == 'external') ? "target='_blank' " : null;
|
|
$mod_a_3 = ($menu_sub['menu_item_category'] == 'external') ? "target='_blank' " : null;
|
|
$menu_sub_icon = null;
|
|
$menu_sub_icon = null;
|
|
if ($_SESSION['theme']['menu_sub_icons']['boolean'] != 'false') {
|
|
if ($_SESSION['theme']['menu_sub_icons']['boolean'] != 'false') {
|
|
- if ($menu_sub['menu_item_icon'] != '' && substr_count($menu_sub['menu_item_icon'], 'fa-') > 0) {
|
|
|
|
|
|
+ if (!empty($menu_sub['menu_item_icon']) && substr_count($menu_sub['menu_item_icon'], 'fa-') > 0) {
|
|
$menu_sub_icon = "<span class='fas ".escape($menu_sub['menu_item_icon'])."'></span>";
|
|
$menu_sub_icon = "<span class='fas ".escape($menu_sub['menu_item_icon'])."'></span>";
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -1040,17 +1041,17 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
//current user
|
|
//current user
|
|
if (isset($_SESSION['theme']['user_visible']['text']) && $_SESSION['theme']['user_visible']['text'] == 'true') {
|
|
if (isset($_SESSION['theme']['user_visible']['text']) && $_SESSION['theme']['user_visible']['text'] == 'true') {
|
|
$html .= " <li class='nav-item'>\n";
|
|
$html .= " <li class='nav-item'>\n";
|
|
- $html .= " <a class='header_user' href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".($_SESSION['theme']['body_header_icon_user']['text'] != '' ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
|
|
|
|
|
|
+ $html .= " <a class='header_user' href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".(!empty($_SESSION['theme']['body_header_icon_user']['text']) ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
|
|
$html .= " </li>\n";
|
|
$html .= " </li>\n";
|
|
}
|
|
}
|
|
//domain name/selector
|
|
//domain name/selector
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
|
|
$html .= " <li class='nav-item'>\n";
|
|
$html .= " <li class='nav-item'>\n";
|
|
- $html .= " <a class='header_domain' href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-".($_SESSION['theme']['body_header_icon_domain']['text'] != '' ? $_SESSION['theme']['body_header_icon_domain']['text'] : 'globe-americas')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
|
|
|
|
|
|
+ $html .= " <a class='header_domain' href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-".(!empty($_SESSION['theme']['body_header_icon_domain']['text']) ? $_SESSION['theme']['body_header_icon_domain']['text'] : 'globe-americas')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
|
|
$html .= " </li>\n";
|
|
$html .= " </li>\n";
|
|
}
|
|
}
|
|
//logout icon
|
|
//logout icon
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && isset($_SESSION['theme']['logout_icon_visible']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && isset($_SESSION['theme']['logout_icon_visible']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
$username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null);
|
|
$username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null);
|
|
$html .= " <li class='nav-item'>\n";
|
|
$html .= " <li class='nav-item'>\n";
|
|
$html .= " <a class='logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
|
$html .= " <a class='logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
|
@@ -1064,7 +1065,7 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$html .= "</nav>\n";
|
|
$html .= "</nav>\n";
|
|
|
|
|
|
//modal for logout icon (above)
|
|
//modal for logout icon (above)
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && isset($_SESSION['theme']['logout_icon_visible']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && isset($_SESSION['theme']['logout_icon_visible']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
|
|
$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1092,13 +1093,13 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'none') {
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'none') {
|
|
$html .= " <a class='menu_side_item_main menu_side_contract' onclick='menu_side_contract();' style='".($_SESSION['theme']['menu_side_pin']['boolean'] == 'true' ? "max-width: calc(100% - 50px);" : null)." ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "display: none;" : null)."' title=\"".$this->text['theme-label-contract_menu']."\"><i class='fas fa-bars fa-fw' style='z-index: 99800; padding-left: 1px;'></i></a>";
|
|
$html .= " <a class='menu_side_item_main menu_side_contract' onclick='menu_side_contract();' style='".($_SESSION['theme']['menu_side_pin']['boolean'] == 'true' ? "max-width: calc(100% - 50px);" : null)." ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "display: none;" : null)."' title=\"".$this->text['theme-label-contract_menu']."\"><i class='fas fa-bars fa-fw' style='z-index: 99800; padding-left: 1px;'></i></a>";
|
|
}
|
|
}
|
|
- $menu_brand_text = $_SESSION['theme']['menu_brand_text']['text'] != '' ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
|
|
|
|
|
|
+ $menu_brand_text = !empty($_SESSION['theme']['menu_brand_text']['text']) ? escape($_SESSION['theme']['menu_brand_text']['text']) : "FusionPBX";
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'text') {
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'text') {
|
|
$html .= " <a class='menu_brand_text' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
|
|
$html .= " <a class='menu_brand_text' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." href='".PROJECT_PATH."/'>".$menu_brand_text."</a>\n";
|
|
}
|
|
}
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'image' || $_SESSION['theme']['menu_brand_type']['text'] == 'image_text' || $_SESSION['theme']['menu_brand_type']['text'] == '') {
|
|
if ($_SESSION['theme']['menu_brand_type']['text'] == 'image' || $_SESSION['theme']['menu_brand_type']['text'] == 'image_text' || $_SESSION['theme']['menu_brand_type']['text'] == '') {
|
|
- $menu_brand_image_contracted = $_SESSION['theme']['menu_side_brand_image_contracted']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_contracted']['text'] : PROJECT_PATH."/themes/default/images/logo_side_contracted.png";
|
|
|
|
- $menu_brand_image_expanded = $_SESSION['theme']['menu_side_brand_image_expanded']['text'] != '' ? $_SESSION['theme']['menu_side_brand_image_expanded']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
|
|
|
|
|
|
+ $menu_brand_image_contracted = !empty($_SESSION['theme']['menu_side_brand_image_contracted']['text']) ? $_SESSION['theme']['menu_side_brand_image_contracted']['text'] : PROJECT_PATH."/themes/default/images/logo_side_contracted.png";
|
|
|
|
+ $menu_brand_image_expanded = !empty($_SESSION['theme']['menu_side_brand_image_expanded']['text']) ? $_SESSION['theme']['menu_side_brand_image_expanded']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
|
|
$html .= " <a class='menu_brand_image' href='".PROJECT_PATH."/'>";
|
|
$html .= " <a class='menu_brand_image' href='".PROJECT_PATH."/'>";
|
|
$html .= "<img id='menu_brand_image_contracted' style='".($_SESSION['theme']['menu_side_state']['text'] == 'expanded' ? "display: none;" : null)."' src='".escape($menu_brand_image_contracted)."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= "<img id='menu_brand_image_contracted' style='".($_SESSION['theme']['menu_side_state']['text'] == 'expanded' ? "display: none;" : null)."' src='".escape($menu_brand_image_contracted)."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= "<img id='menu_brand_image_expanded' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." src='".escape($menu_brand_image_expanded)."' title=\"".escape($menu_brand_text)."\">";
|
|
$html .= "<img id='menu_brand_image_expanded' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null)." src='".escape($menu_brand_image_expanded)."' title=\"".escape($menu_brand_text)."\">";
|
|
@@ -1109,14 +1110,14 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
// }
|
|
// }
|
|
$html .= " </div>\n";
|
|
$html .= " </div>\n";
|
|
//main menu items
|
|
//main menu items
|
|
- if (is_array($menu_array) && sizeof($menu_array) != 0) {
|
|
|
|
|
|
+ if (!empty($menu_array)) {
|
|
foreach ($menu_array as $menu_index_main => $menu_item_main) {
|
|
foreach ($menu_array as $menu_index_main => $menu_item_main) {
|
|
$menu_target = ($menu_item_main['menu_item_category'] == 'external') ? '_blank' : '';
|
|
$menu_target = ($menu_item_main['menu_item_category'] == 'external') ? '_blank' : '';
|
|
- $html .= " <a class='menu_side_item_main' ".($menu_item_main['menu_item_link'] != '' ? "href='".$menu_item_main['menu_item_link']."' target='".$menu_target."'" : "onclick=\"menu_side_expand(); menu_side_item_toggle('".$menu_item_main['menu_item_uuid']."');\"")." title=\"".$menu_item_main['menu_language_title']."\">";
|
|
|
|
|
|
+ $html .= " <a class='menu_side_item_main' ".(!empty($menu_item_main['menu_item_link']) ? "href='".$menu_item_main['menu_item_link']."' target='".$menu_target."'" : "onclick=\"menu_side_expand(); menu_side_item_toggle('".$menu_item_main['menu_item_uuid']."');\"")." title=\"".$menu_item_main['menu_language_title']."\">";
|
|
if (is_array($menu_item_main['menu_items']) && sizeof($menu_item_main['menu_items']) != 0 && $_SESSION['theme']['menu_side_item_main_sub_icons']['boolean'] == 'true') {
|
|
if (is_array($menu_item_main['menu_items']) && sizeof($menu_item_main['menu_items']) != 0 && $_SESSION['theme']['menu_side_item_main_sub_icons']['boolean'] == 'true') {
|
|
- $html .= " <div class='menu_side_item_main_sub_icons' style='float: right; margin-right: -1px; ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "display: none;" : null)."'><i id='sub_arrow_".$menu_item_main['menu_item_uuid']."' class='sub_arrows fas fa-".($_SESSION['theme']['menu_side_item_main_sub_icon_expand']['text'] != '' ? $_SESSION['theme']['menu_side_item_main_sub_icon_expand']['text'] : 'chevron-down')." fa-xs'></i></div>\n";
|
|
|
|
|
|
+ $html .= " <div class='menu_side_item_main_sub_icons' style='float: right; margin-right: -1px; ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "display: none;" : null)."'><i id='sub_arrow_".$menu_item_main['menu_item_uuid']."' class='sub_arrows fas fa-".(!empty($_SESSION['theme']['menu_side_item_main_sub_icon_expand']['text']) ? $_SESSION['theme']['menu_side_item_main_sub_icon_expand']['text'] : 'chevron-down')." fa-xs'></i></div>\n";
|
|
}
|
|
}
|
|
- if ($menu_item_main['menu_item_icon'] != '') {
|
|
|
|
|
|
+ if (!empty($menu_item_main['menu_item_icon'])) {
|
|
$html .= "<i class='menu_side_item_icon fas ".$menu_item_main['menu_item_icon']." fa-fw' style='z-index: 99800; margin-right: 8px;'></i>";
|
|
$html .= "<i class='menu_side_item_icon fas ".$menu_item_main['menu_item_icon']." fa-fw' style='z-index: 99800; margin-right: 8px;'></i>";
|
|
}
|
|
}
|
|
$html .= "<span class='menu_side_item_title' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null).">".$menu_item_main['menu_language_title']."</span>";
|
|
$html .= "<span class='menu_side_item_title' ".($_SESSION['theme']['menu_side_state']['text'] != 'expanded' ? "style='display: none;'" : null).">".$menu_item_main['menu_language_title']."</span>";
|
|
@@ -1143,9 +1144,9 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
//header: left
|
|
//header: left
|
|
$html .= "<div class='float-left'>\n";
|
|
$html .= "<div class='float-left'>\n";
|
|
$html .= button::create(['type'=>'button','id'=>'menu_side_state_hidden_button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default '.($_SESSION['theme']['menu_side_state']['text'] != 'hidden' ? 'hide-sm-up ' : null).'float-left','onclick'=>'menu_side_expand();']);
|
|
$html .= button::create(['type'=>'button','id'=>'menu_side_state_hidden_button','title'=>$this->text['theme-label-expand_menu'],'icon'=>'bars','class'=>'default '.($_SESSION['theme']['menu_side_state']['text'] != 'hidden' ? 'hide-sm-up ' : null).'float-left','onclick'=>'menu_side_expand();']);
|
|
- $body_header_brand_text = $_SESSION['theme']['body_header_brand_text']['text'] != '' ? escape($_SESSION['theme']['body_header_brand_text']['text']) : "FusionPBX";
|
|
|
|
|
|
+ $body_header_brand_text = !empty($_SESSION['theme']['body_header_brand_text']['text']) ? escape($_SESSION['theme']['body_header_brand_text']['text']) : "FusionPBX";
|
|
if ($_SESSION['theme']['body_header_brand_type']['text'] == 'image' || $_SESSION['theme']['body_header_brand_type']['text'] == 'image_text') {
|
|
if ($_SESSION['theme']['body_header_brand_type']['text'] == 'image' || $_SESSION['theme']['body_header_brand_type']['text'] == 'image_text') {
|
|
- $body_header_brand_image = $_SESSION['theme']['body_header_brand_image']['text'] != '' ? $_SESSION['theme']['body_header_brand_image']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
|
|
|
|
|
|
+ $body_header_brand_image = !empty($_SESSION['theme']['body_header_brand_image']['text']) ? $_SESSION['theme']['body_header_brand_image']['text'] : PROJECT_PATH."/themes/default/images/logo_side_expanded.png";
|
|
$html .= "<div id='body_header_brand_image'>";
|
|
$html .= "<div id='body_header_brand_image'>";
|
|
$html .= "<a href='".PROJECT_PATH."/'><img id='body_header_brand_image' src='".escape($body_header_brand_image)."' title=\"".escape($body_header_brand_text)."\"></a>";
|
|
$html .= "<a href='".PROJECT_PATH."/'><img id='body_header_brand_image' src='".escape($body_header_brand_image)."' title=\"".escape($body_header_brand_text)."\"></a>";
|
|
$html .= "</div>";
|
|
$html .= "</div>";
|
|
@@ -1161,20 +1162,20 @@ https://www.fusionpbx.com/app/pages/page.php?id=f48cceb2-5e31-47c2-a84a-8f45d805
|
|
$html .= " <a href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".($_SESSION['theme']['body_header_icon_user']['text'] != '' ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
|
|
$html .= " <a href='".PROJECT_PATH."/core/users/user_edit.php?id=user' title=\"".$this->text['theme-label-user']."\"><i class='fas fa-".($_SESSION['theme']['body_header_icon_user']['text'] != '' ? $_SESSION['theme']['body_header_icon_user']['text'] : 'user-circle')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".$_SESSION['username']."</a>";
|
|
$html .= "</span>\n";
|
|
$html .= "</span>\n";
|
|
//domain name/selector (sm+)
|
|
//domain name/selector (sm+)
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && permission_exists('domain_select') && count($_SESSION['domains']) > 1 && $_SESSION['theme']['domain_visible']['text'] == 'true') {
|
|
$html .= "<span style='display: inline-block; padding-right: 10px; font-size: 90%;'>\n";
|
|
$html .= "<span style='display: inline-block; padding-right: 10px; font-size: 90%;'>\n";
|
|
$html .= " <a href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-".($_SESSION['theme']['body_header_icon_domain']['text'] != '' ? $_SESSION['theme']['body_header_icon_domain']['text'] : 'globe-americas')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
|
|
$html .= " <a href='#' id='header_domain_selector_domain' title='".$this->text['theme-label-open_selector']."'><i class='fas fa-".($_SESSION['theme']['body_header_icon_domain']['text'] != '' ? $_SESSION['theme']['body_header_icon_domain']['text'] : 'globe-americas')." fa-lg fa-fw' style='margin-top: 6px; margin-right: 5px;'></i>".escape($_SESSION['domain_name'])."</a>";
|
|
$html .= "</span>\n";
|
|
$html .= "</span>\n";
|
|
}
|
|
}
|
|
//logout icon
|
|
//logout icon
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
$html .= "<a id='header_logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
|
$html .= "<a id='header_logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
|
}
|
|
}
|
|
$html .= "</div>";
|
|
$html .= "</div>";
|
|
$html .= " </div>\n";
|
|
$html .= " </div>\n";
|
|
|
|
|
|
//modal for logout icon (above)
|
|
//modal for logout icon (above)
|
|
- if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
|
|
|
|
+ if (!empty($_SESSION['username']) && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
|
$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
|
|
$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
|
|
}
|
|
}
|
|
|
|
|