add menu hook

This commit is contained in:
Ibnu Maksum 2022-09-17 22:34:55 +07:00
parent 1c63cd674c
commit 742e0df1f2
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
8 changed files with 180 additions and 139 deletions

View File

@ -23,6 +23,7 @@ if (file_exists('system/config.php')) {
r2('system/install'); r2('system/install');
} }
function safedata($value) function safedata($value)
{ {
$value = trim($value); $value = trim($value);
@ -38,6 +39,50 @@ function _post($param, $defvalue = '')
} }
} }
$menu_registered = array();
/**
* Register for global menu
* @param string name Name of the menu
* @param bool admin true if for admin and false for customer
* @param string function function to run after menu clicks
* @param string position position of menu, use AFTER_ for root menu |
* Admin/Sales menu: AFTER_DASHBOARD, CUSTOMERS, PREPAID, SERVICES, REPORTS, VOUCHER, AFTER_ORDER, NETWORK, SETTINGS, AFTER_PAYMENTGATEWAY
* | Customer menu: AFTER_DASHBOARD, ORDER, HISTORY, ACCOUNTS
* @param string icon from ion icon, ion-person, only for AFTER_
*/
function register_menu($name, $admin, $function, $position, $icon = '')
{
global $menu_registered;
$menu_registered[] = [
"name" => $name,
"admin" => $admin,
"position" => $position,
"icon" => $icon,
"function" => $function
];
}
$hook_registered = array();
function register_hook($action, $function){
$hook_registered[] = [
'action' => $action,
'function' => $function
];
}
function run_hook($action){
global $hook_registered;
foreach($hook_registered as $hook){
if($hook['action'] == $action){
if(function_exists($hook['function'])){
call_user_func($hook['function']);
}
}
}
}
function _get($param, $defvalue = '') function _get($param, $defvalue = '')
{ {
if (!isset($_GET[$param])) { if (!isset($_GET[$param])) {
@ -115,6 +160,13 @@ if (isset($_SESSION['notify'])) {
unset($_SESSION['ntype']); unset($_SESSION['ntype']);
} }
//register all plugin
foreach (glob("system/plugin/*.php") as $filename)
{
include $filename;
}
// on some server, it getting error because of slash is backwards // on some server, it getting error because of slash is backwards
function _autoloader($class) function _autoloader($class)
{ {
@ -140,21 +192,29 @@ function _autoloader($class)
spl_autoload_register('_autoloader'); spl_autoload_register('_autoloader');
function _auth() function _auth($login = true)
{ {
if (isset($_SESSION['uid'])) { if (isset($_SESSION['uid'])) {
return true; return true;
} else { } else {
r2(U . 'login'); if ($login) {
r2(U . 'login');
} else {
return false;
}
} }
} }
function _admin() function _admin($login = true)
{ {
if (isset($_SESSION['aid'])) { if (isset($_SESSION['aid'])) {
return true; return true;
} else { } else {
r2(U . 'login'); if ($login) {
r2(U . 'login');
} else {
return false;
}
} }
} }
@ -263,34 +323,43 @@ function time_elapsed_string($datetime, $full = false)
// Routing Engine // Routing Engine
$req = _get('_route'); $req = _get('_route');
$routes = explode('/', $req); $routes = explode('/', $req);
$handler = $routes['0']; $ui->assign('_routes', $routes);
$handler = $routes[0];
if ($handler == '') { if ($handler == '') {
$handler = 'default'; $handler = 'default';
} }
$sys_render = 'system/controllers/' . $handler . '.php'; $sys_render = 'system/controllers/' . $handler . '.php';
if (file_exists($sys_render)) { if (file_exists($sys_render)) {
$menus = array();
// "name" => $name,
// "admin" => $admin,
// "position" => $position,
// "function" => $function
$ui->assign('_system_menu', $routes[0]);
foreach ($menu_registered as $menu) {
if($menu['admin'] && _admin(false)) {
if(strpos($menu['position'],'AFTER_')===false) {
$menus[$menu['position']] .= '<li'.(($routes[1]==$menu['function'])?' class="active"':'').'><a href="'.U.'plugin/'.$menu['function'].'">'.$menu['name'].'</a></li>';
}else{
$menus[$menu['position']] .= '<li'.(($routes[1]==$menu['function'])?' class="active"':'').'><a href="'.U.'plugin/'.$menu['function'].'">'.
'<i class="ion '.$menu['function'].'"></i>'.
'<span class="text">'.$menu['name'].'</span></a></li>';
}
}else if(!$menu['admin'] && _auth(false)) {
if(strpos($menu['position'],'AFTER_')===false) {
$menus[$menu['position']] .= '<li'.(($routes[1]==$menu['function'])?' class="active"':'').'><a href="'.U.'plugin/'.$menu['function'].'">'.$menu['name'].'</a></li>';
}else{
$menus[$menu['position']] .= '<li'.(($routes[1]==$menu['function'])?' class="active"':'').'><a href="'.U.'plugin/'.$menu['function'].'">'.
'<i class="ion '.$menu['function'].'"></i>'.
'<span class="text">'.$menu['name'].'</span></a></li>';
}
}
}
foreach ($menus as $k => $v) {
$ui->assign('_MENU_'.$k, $v);
}
unset($menus, $menu_registered);
include($sys_render); include($sys_render);
} else { } else {
header("HTTP/1.0 404 Not Found"); r2(U.'dashboard', 'e', 'not found');
exit("<pre>
___ ___ ___
| | | | | |
|_ | | |_ |
|_|___| |_|
_____ _ _____ _
| | |___| |_ | __|___ _ _ ___ _| |
| | | | . | _| | __| . | | | | . |
|_|___|___|_| |__| |___|___|_|_|___|
_ ______ ____ _____ ____ ____
(_) |_ _ \ |_ \|_ _| |_ _||_ _|
__ | |_) | | \ | | __ _ \ \ / /
[ | | __'. | |\ \| | [ | | | > `' <
| | _| |__) |_| |_\ |_ | \_/ |, _/ /'`\ \_
[___]|_______/|_____|\____|'.__.'_/|____||____|
</pre>");
} }

View File

@ -21,6 +21,7 @@ switch ($action) {
case 'change-password-post': case 'change-password-post':
$password = _post('password'); $password = _post('password');
run_hook('customer_change_password'); #HOOK
if($password != ''){ if($password != ''){
$d = ORM::for_table('tbl_customers')->where('username',$user['username'])->find_one(); $d = ORM::for_table('tbl_customers')->where('username',$user['username'])->find_one();
if($d){ if($d){
@ -148,7 +149,7 @@ switch ($action) {
$fullname = _post('fullname'); $fullname = _post('fullname');
$address = _post('address'); $address = _post('address');
$phonenumber = _post('phonenumber'); $phonenumber = _post('phonenumber');
run_hook('customer_edit_profile'); #HOOK
$msg = ''; $msg = '';
if(Validator::Length($fullname,31,2) == false){ if(Validator::Length($fullname,31,2) == false){
$msg .= 'Full Name should be between 3 to 30 characters'. '<br>'; $msg .= 'Full Name should be between 3 to 30 characters'. '<br>';

View File

@ -1,40 +1,42 @@
<?php <?php
/** /**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/) * PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/ **/
if (isset($routes['1'])) { if (isset($routes['1'])) {
$do = $routes['1']; $do = $routes['1'];
} else { } else {
$do = 'login-display'; $do = 'login-display';
} }
switch($do){ switch ($do) {
case 'post': case 'post':
$username = _post('username'); $username = _post('username');
$password = _post('password'); $password = _post('password');
if($username != '' AND $password != ''){ run_hook('admin_login'); #HOOK
$d = ORM::for_table('tbl_users')->where('username',$username)->find_one(); if ($username != '' and $password != '') {
if($d){ $d = ORM::for_table('tbl_users')->where('username', $username)->find_one();
$d_pass = $d['password']; if ($d) {
if(Password::_verify($password,$d_pass) == true){ $d_pass = $d['password'];
$_SESSION['aid'] = $d['id']; if (Password::_verify($password, $d_pass) == true) {
$d->last_login = date('Y-m-d H:i:s'); $_SESSION['aid'] = $d['id'];
$d->save(); $d->last_login = date('Y-m-d H:i:s');
_log($username .' '. $_L['Login_Successful'],'Admin',$d['id']); $d->save();
r2(U.'dashboard'); _log($username . ' ' . $_L['Login_Successful'], 'Admin', $d['id']);
}else{ r2(U . 'dashboard');
_msglog('e',$_L['Invalid_Username_or_Password']); } else {
_log($username .' '. $_L['Failed_Login'],'Admin'); _msglog('e', $_L['Invalid_Username_or_Password']);
r2(U.'admin'); _log($username . ' ' . $_L['Failed_Login'], 'Admin');
} r2(U . 'admin');
}else{ }
_msglog('e',$_L['Invalid_Username_or_Password']); } else {
r2(U.'admin'); _msglog('e', $_L['Invalid_Username_or_Password']);
} r2(U . 'admin');
}else{ }
_msglog('e',$_L['Invalid_Username_or_Password']); } else {
r2(U.'admin'); _msglog('e', $_L['Invalid_Username_or_Password']);
} r2(U . 'admin');
}
break; break;
@ -46,4 +48,3 @@ switch($do){
$ui->display('admin.tpl'); $ui->display('admin.tpl');
break; break;
} }

View File

@ -0,0 +1,7 @@
<?php
if(function_exists($routes[1])){
call_user_func($routes[1]);
}else{
r2(U.'dashboard', 'e', 'Function not found');
}

View File

@ -293,3 +293,4 @@ $_L['Date_Done'] = 'Date Done';
$_L['Unpaid_Order'] = 'Unpaid Order'; $_L['Unpaid_Order'] = 'Unpaid Order';
$_L['Payment_Gateway_Not_Found'] = 'Payment Gateway Not Found'; $_L['Payment_Gateway_Not_Found'] = 'Payment Gateway Not Found';
$_L['Payment_Gateway_saved_successfully'] = 'Payment Gateway saved successfully'; $_L['Payment_Gateway_saved_successfully'] = 'Payment Gateway saved successfully';
$_L['ORDER'] = 'ORDER';

View File

@ -3,7 +3,6 @@
<div class="page page-err clearfix"> <div class="page page-err clearfix">
<div class="err-container"> <div class="err-container">
<h1 class="m404 mb0">404 <a href="{$_url}dashboard" class="ion ion-forward" title="go to dashboard"></a></h1> <h1 class="m404 mb0">404 <a href="{$_url}dashboard" class="ion ion-forward" title="go to dashboard"></a></h1>
<p class="text-desc mb20">Coming Soon!! Next Version...</p>
</div> </div>
</div> </div>

View File

@ -130,19 +130,7 @@
<span class="text">{$_L['Dashboard']}</span> <span class="text">{$_L['Dashboard']}</span>
</a> </a>
</li> </li>
<!-- Message on progress, hide it --> {$_MENU_AFTER_DASHBOARD}
<li class="hidden {if $_system_menu eq 'message'}open{/if}">
<a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-email"></i>
<span class="text">{$_L['Private_Message']}</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'message'}class="active"{/if}><a href="{$_url}message/inbox">{$_L['Inbox']}</a></li>
<li {if $_system_menu eq 'message'}class="active"{/if}><a href="{$_url}message/outbox">{$_L['Outbox']}</a></li>
<li {if $_system_menu eq 'message'}class="active"{/if}><a href="{$_url}message/compose">{$_L['Compose']}</a></li>
</ul>
</li>
{if $_admin['user_type'] eq 'Admin' || $_admin['user_type'] eq 'Sales'} {if $_admin['user_type'] eq 'Admin' || $_admin['user_type'] eq 'Sales'}
<li {if $_system_menu eq 'customers'}class="open"{/if}> <li {if $_system_menu eq 'customers'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
@ -151,10 +139,12 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'customers'}class="active"{/if}><a href="{$_url}customers/add">{$_L['Add_Contact']}</a></li> <li {if $_routes[1] eq 'add'}class="active"{/if}><a href="{$_url}customers/add">{$_L['Add_Contact']}</a></li>
<li {if $_system_menu eq 'customers'}class="active"{/if}><a href="{$_url}customers/list">{$_L['List_Contact']}</a></li> <li {if $_routes[1] eq 'list'}class="active"{/if}><a href="{$_url}customers/list">{$_L['List_Contact']}</a></li>
{$_MENU_CUSTOMERS}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_CUSTOMERS}
<li {if $_system_menu eq 'prepaid'}class="open"{/if}> <li {if $_system_menu eq 'prepaid'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-card"></i> <i class="ion ion-card"></i>
@ -162,12 +152,14 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'prepaid'}class="active"{/if}><a href="{$_url}prepaid/list">{$_L['Prepaid_User']}</a></li> <li {if $_routes[1] eq 'list'}class="active"{/if}><a href="{$_url}prepaid/list">{$_L['Prepaid_User']}</a></li>
<li {if $_system_menu eq 'prepaid'}class="active"{/if}><a href="{$_url}prepaid/voucher">{$_L['Prepaid_Vouchers']}</a></li> <li {if $_routes[1] eq 'voucher'}class="active"{/if}><a href="{$_url}prepaid/voucher">{$_L['Prepaid_Vouchers']}</a></li>
<li {if $_system_menu eq 'prepaid'}class="active"{/if}><a href="{$_url}prepaid/refill">{$_L['Refill_Account']}</a></li> <li {if $_routes[1] eq 'refill'}class="active"{/if}><a href="{$_url}prepaid/refill">{$_L['Refill_Account']}</a></li>
<li {if $_system_menu eq 'prepaid'}class="active"{/if}><a href="{$_url}prepaid/recharge">{$_L['Recharge_Account']}</a></li> <li {if $_routes[1] eq 'recharge'}class="active"{/if}><a href="{$_url}prepaid/recharge">{$_L['Recharge_Account']}</a></li>
{$_MENU_PREPAID}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_PREPAID}
<li {if $_system_menu eq 'services'}class="open"{/if}> <li {if $_system_menu eq 'services'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-cube"></i> <i class="ion ion-cube"></i>
@ -175,11 +167,13 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'services'}class="active"{/if}><a href="{$_url}services/hotspot">{$_L['Hotspot_Plans']}</a></li> <li {if $_routes[1] eq 'hotspot'}class="active"{/if}><a href="{$_url}services/hotspot">{$_L['Hotspot_Plans']}</a></li>
<li {if $_system_menu eq 'services'}class="active"{/if}><a href="{$_url}services/pppoe">{$_L['PPPOE_Plans']}</a></li> <li {if $_routes[1] eq 'pppoe'}class="active"{/if}><a href="{$_url}services/pppoe">{$_L['PPPOE_Plans']}</a></li>
<li {if $_system_menu eq 'services'}class="active"{/if}><a href="{$_url}bandwidth/list">{$_L['Bandwidth_Plans']}</a></li> <li {if $_routes[1] eq 'list'}class="active"{/if}><a href="{$_url}bandwidth/list">{$_L['Bandwidth_Plans']}</a></li>
{$_MENU_SERVICES}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_SERVICES}
<li {if $_system_menu eq 'reports'}class="open"{/if}> <li {if $_system_menu eq 'reports'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-clipboard"></i> <i class="ion ion-clipboard"></i>
@ -187,40 +181,12 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'reports'}class="active"{/if}><a href="{$_url}reports/daily-report">{$_L['Daily_Report']}</a></li> <li {if $_routes[1] eq 'daily-report'}class="active"{/if}><a href="{$_url}reports/daily-report">{$_L['Daily_Report']}</a></li>
<li {if $_system_menu eq 'reports'}class="active"{/if}><a href="{$_url}reports/by-period">{$_L['Period_Reports']}</a></li> <li {if $_routes[1] eq 'by-period'}class="active"{/if}><a href="{$_url}reports/by-period">{$_L['Period_Reports']}</a></li>
</ul> {$_MENU_REPORTS}
</li>
{else}
<li {if $_system_menu eq 'voucher'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-card"></i>
<span class="text">{$_L['Voucher']}</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'voucher'}class="active"{/if}><a href="{$_url}voucher/activation">{$_L['Voucher_Activation']}</a></li>
<li {if $_system_menu eq 'voucher'}class="active"{/if}><a href="{$_url}voucher/list-activated">{$_L['List_Activated_Voucher']}</a></li>
</ul>
</li>
<li {if $_system_menu eq 'order'}class="active"{/if}>
<a href="{$_url}order">
<i class="ion ion-ios-cart"></i>
<span class="text">{$_L['Order_Voucher']}</span>
</a>
</li>
<li {if $_system_menu eq 'accounts'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-gear-a"></i>
<span class="text">{$_L['My_Account']}</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/profile">{$_L['My_Profile']}</a></li>
<li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/change-password">{$_L['Change_Password']}</a></li>
<li>&nbsp;</li>
</ul> </ul>
</li> </li>
{$_MENU_AFTER_REPORTS}
{/if} {/if}
{if $_admin['user_type'] eq 'Admin'} {if $_admin['user_type'] eq 'Admin'}
<li {if $_system_menu eq 'network'}class="open"{/if}> <li {if $_system_menu eq 'network'}class="open"{/if}>
@ -230,10 +196,12 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'network'}class="active"{/if}><a href="{$_url}routers/list">{$_L['Routers']}</a></li> <li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list'}class="active"{/if}><a href="{$_url}routers/list">{$_L['Routers']}</a></li>
<li {if $_system_menu eq 'network'}class="active"{/if}><a href="{$_url}pool/list">{$_L['Pool']}</a></li> <li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list'}class="active"{/if}><a href="{$_url}pool/list">{$_L['Pool']}</a></li>
{$_MENU_NETWORK}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_NETWORKS}
<li {if $_system_menu eq 'pages'}class="open"{/if}> <li {if $_system_menu eq 'pages'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-document"></i> <i class="ion ion-document"></i>
@ -241,12 +209,14 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'pages'}class="active"{/if}><a href="{$_url}pages/Order_Voucher">{$_L['Order_Voucher']}</a></li> <li {if $_routes[1] eq 'Order_Voucher'}class="active"{/if}><a href="{$_url}pages/Order_Voucher">{$_L['Order_Voucher']}</a></li>
<li {if $_system_menu eq 'pages'}class="active"{/if}><a href="{$_url}pages/Voucher">{$_L['Voucher']} Template</a></li> <li {if $_routes[1] eq 'Voucher'}class="active"{/if}><a href="{$_url}pages/Voucher">{$_L['Voucher']} Template</a></li>
<li {if $_system_menu eq 'pages'}class="active"{/if}><a href="{$_url}pages/Announcement">{$_L['Announcement']} Editor</a></li> <li {if $_routes[1] eq 'Announcement'}class="active"{/if}><a href="{$_url}pages/Announcement">{$_L['Announcement']} Editor</a></li>
<li {if $_system_menu eq 'pages'}class="active"{/if}><a href="{$_url}pages/Registration_Info">{$_L['Registration_Info']} Editor</a></li> <li {if $_routes[1] eq 'Registration_Info'}class="active"{/if}><a href="{$_url}pages/Registration_Info">{$_L['Registration_Info']} Editor</a></li>
{$_MENU_PAGES}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_PAGES}
<li {if $_system_menu eq 'settings'}class="open"{/if}> <li {if $_system_menu eq 'settings'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-gear-a"></i> <i class="ion ion-gear-a"></i>
@ -254,19 +224,21 @@
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'settings'}class="active"{/if}><a href="{$_url}settings/app">{$_L['General_Settings']}</a></li> <li {if $_routes[1] eq 'app'}class="active"{/if}><a href="{$_url}settings/app">{$_L['General_Settings']}</a></li>
<li {if $_system_menu eq 'settings'}class="active"{/if}><a href="{$_url}settings/localisation">{$_L['Localisation']}</a></li> <li {if $_routes[1] eq 'localisation'}class="active"{/if}><a href="{$_url}settings/localisation">{$_L['Localisation']}</a></li>
<li {if $_system_menu eq 'settings'}class="active"{/if}><a href="{$_url}settings/users">{$_L['Administrator_Users']}</a></li> <li {if $_routes[1] eq 'users'}class="active"{/if}><a href="{$_url}settings/users">{$_L['Administrator_Users']}</a></li>
<li {if $_system_menu eq 'settings'}class="active"{/if}><a href="{$_url}settings/dbstatus">{$_L['Backup_Restore']}</a></li> <li {if $_routes[1] eq 'dbstatus'}class="active"{/if}><a href="{$_url}settings/dbstatus">{$_L['Backup_Restore']}</a></li>
<li>&nbsp;</li> {$_MENU_SETTINGS}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_SETTINGS}
<li {if $_system_menu eq 'paymentgateway'}class="active"{/if}> <li {if $_system_menu eq 'paymentgateway'}class="active"{/if}>
<a href="{$_url}paymentgateway"> <a href="{$_url}paymentgateway">
<i class="ion ion-cash"></i> <i class="ion ion-cash"></i>
<span class="text">{Lang::T('Payment Gateway')}</span> <span class="text">{Lang::T('Payment Gateway')}</span>
</a> </a>
</li> </li>
{$_MENU_AFTER_PAYMENTGATEWAY}
<li {if $_system_menu eq 'community'}class="active"{/if}> <li {if $_system_menu eq 'community'}class="active"{/if}>
<a href="{$_url}community"> <a href="{$_url}community">
<i class="ion ion-chatboxes"></i> <i class="ion ion-chatboxes"></i>

View File

@ -105,23 +105,11 @@
<span class="text">{$_L['Dashboard']}</span> <span class="text">{$_L['Dashboard']}</span>
</a> </a>
</li> </li>
<li class="hidden {if $_system_menu eq 'pm'}open{/if}"> {$_MENU_AFTER_DASHBOARD}
<a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-email"></i>
<span class="text">{$_L['Private_Message']}</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'pm'}class="active"{/if}><a href="{$_url}pm/inbox">{$_L['Inbox']}</a></li>
<li {if $_system_menu eq 'pm'}class="active"{/if}><a href="{$_url}pm/outbox">{$_L['Outbox']}</a></li>
<li {if $_system_menu eq 'pm'}class="active"{/if}><a href="{$_url}pm/compose">{$_L['Compose']}</a></li>
</ul>
</li>
<li {if $_system_menu eq 'order'}class="open"{/if}> <li {if $_system_menu eq 'order'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-ios-cart"></i> <i class="ion ion-ios-cart"></i>
<span class="text">ORDER</span> <span class="text">{Lang::T('ORDER')}</span>
<i class="arrow ion-chevron-left"></i> <i class="arrow ion-chevron-left"></i>
</a> </a>
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
@ -130,14 +118,17 @@
<li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/package">{Lang::T('Package')}</a></li> <li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/package">{Lang::T('Package')}</a></li>
<li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/history">{Lang::T('History')}</a></li> <li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/history">{Lang::T('History')}</a></li>
{/if} {/if}
{$_MENU_ORDER}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_ORDER}
<li {if $_system_menu eq 'voucher'}class="active"{/if}> <li {if $_system_menu eq 'voucher'}class="active"{/if}>
<a href="{$_url}voucher/list-activated"> <a href="{$_url}voucher/list-activated">
<i class="ion ion-card"></i> <i class="ion ion-card"></i>
<span class="text">{Lang::T('History')}</span> <span class="text">{Lang::T('History')}</span>
</a> </a>
</li> </li>
{$_MENU_AFTER_HISTORY}
<li {if $_system_menu eq 'accounts'}class="open"{/if}> <li {if $_system_menu eq 'accounts'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-gear-a"></i> <i class="ion ion-gear-a"></i>
@ -147,10 +138,10 @@
<ul class="inner-drop list-unstyled"> <ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/profile">{$_L['My_Profile']}</a></li> <li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/profile">{$_L['My_Profile']}</a></li>
<li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/change-password">{$_L['Change_Password']}</a></li> <li {if $_system_menu eq 'accounts'}class="active"{/if}><a href="{$_url}accounts/change-password">{$_L['Change_Password']}</a></li>
<li>&nbsp;</li> {$_MENU_ACCOUNTS}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_ACCOUNTS}
</ul> </ul>
</nav> </nav>