Compare commits

...

16 Commits

Author SHA1 Message Date
bae079f71c Fix Hook Functionality 2024-02-29 13:32:46 +07:00
28f4624e8d change Customer menu 2024-02-29 11:37:54 +07:00
fbd215e741 Merge branch 'master' into Development 2024-02-29 09:26:19 +07:00
2437096473 $_c to $config in php file 2024-02-29 09:25:26 +07:00
dfeee540cf Fix variable $_c 2024-02-28 18:19:17 +07:00
a0b9e85f38 Add Expired date for reminder 2024-02-28 11:31:36 +07:00
08153e6ec1 Fix Buy Plan with Balance 2024-02-28 11:31:31 +07:00
2660f5d2d0 Dashboard 2 Column 2024-02-27 14:22:17 +07:00
82e67f0b83 fix Recharge 2024-02-27 13:12:53 +07:00
41dd0d86e7 Fix Recharge 2024-02-27 13:12:25 +07:00
c8004f1a27 fix update file 2024-02-27 13:10:06 +07:00
61edfb932a fix wrong logic != to == 2024-02-27 12:00:49 +07:00
747a67b691 2024.2.27 2024-02-27 10:39:21 +07:00
b938db9e5d redirect after login 2024-02-27 10:37:41 +07:00
1ec8049068 fix path 2024-02-27 10:32:09 +07:00
848dcb5caf fix variable Admin.php 2024-02-27 07:12:02 +07:00
20 changed files with 176 additions and 134 deletions

View File

@ -2,6 +2,21 @@
# CHANGELOG # CHANGELOG
## 2024.2.29
- Fix Hook Functionality
- Change Customer Menu
## 2024.2.28
- Fix Buy Plan with Balance
- Add Expired date for reminder
## 2024.2.27
- fix path notification
- redirect to dashboard if already login
## 2024.2.26 ## 2024.2.26
- Clean Unused JS and CSS - Clean Unused JS and CSS

View File

@ -76,10 +76,10 @@ if ($_app_stage != 'Live') {
define('U', APP_URL . '/index.php?_route='); define('U', APP_URL . '/index.php?_route=');
// notification message // notification message
if (file_exists($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) { if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . "notifications.json")) {
$_notifmsg = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true); $_notifmsg = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.json'), true);
} }
$_notifmsg_default = json_decode(file_get_contents($root_path . $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true); $_notifmsg_default = json_decode(file_get_contents($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'notifications.default.json'), true);
//register all plugin //register all plugin
foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) { foreach (glob(File::pathFixer($PLUGIN_PATH . DIRECTORY_SEPARATOR . '*.php')) as $filename) {
@ -96,6 +96,7 @@ $result = ORM::for_table('tbl_appconfig')->find_many();
foreach ($result as $value) { foreach ($result as $value) {
$config[$value['setting']] = $value['value']; $config[$value['setting']] = $value['value'];
} }
$_c = $config;
if (empty($http_proxy) && !empty($config['http_proxy'])) { if (empty($http_proxy) && !empty($config['http_proxy'])) {
$http_proxy = $config['http_proxy']; $http_proxy = $config['http_proxy'];
if (empty($http_proxyauth) && !empty($config['http_proxyauth'])) { if (empty($http_proxyauth) && !empty($config['http_proxyauth'])) {

View File

@ -51,7 +51,7 @@ class Admin
if ($id) { if ($id) {
return ORM::for_table('tbl_users')->find_one($id); return ORM::for_table('tbl_users')->find_one($id);
} else { } else {
return []; return null;
} }
} }
} }

View File

@ -38,6 +38,7 @@ function register_menu($name, $admin, $function, $position, $icon = '', $label =
$hook_registered = array(); $hook_registered = array();
function register_hook($action, $function){ function register_hook($action, $function){
global $hook_registered;
$hook_registered[] = [ $hook_registered[] = [
'action' => $action, 'action' => $action,
'function' => $function 'function' => $function

View File

@ -68,9 +68,13 @@ class Message
public static function sendPackageNotification($phone, $name, $package, $price, $message, $via) public static function sendPackageNotification($phone, $name, $package, $price, $message, $via)
{ {
global $u;
$msg = str_replace('[[name]]', $name, $message); $msg = str_replace('[[name]]', $name, $message);
$msg = str_replace('[[package]]', $package, $msg); $msg = str_replace('[[package]]', $package, $msg);
$msg = str_replace('[[price]]', $price, $msg); $msg = str_replace('[[price]]', $price, $msg);
if($u){
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg);
}
if ( if (
!empty($phone) && strlen($phone) > 5 !empty($phone) && strlen($phone) > 5
&& !empty($message) && in_array($via, ['sms', 'wa']) && !empty($message) && in_array($via, ['sms', 'wa'])

View File

@ -48,8 +48,8 @@ class Package
$t->routers = $router_name; $t->routers = $router_name;
$t->type = "Balance"; $t->type = "Balance";
if ($admin) { if ($admin) {
$t->admin_id = $admin['id']; $t->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$t->admin_id = '0'; $t->admin_id = '0';
} }
$t->save(); $t->save();
@ -152,8 +152,8 @@ class Package
$b->routers = $router_name; $b->routers = $router_name;
$b->type = "Hotspot"; $b->type = "Hotspot";
if ($admin) { if ($admin) {
$b->admin_id = $admin['id']; $b->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$b->admin_id = '0'; $b->admin_id = '0';
} }
$b->save(); $b->save();
@ -172,8 +172,8 @@ class Package
$t->routers = $router_name; $t->routers = $router_name;
$t->type = "Hotspot"; $t->type = "Hotspot";
if ($admin) { if ($admin) {
$t->admin_id = $admin['id']; $t->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$t->admin_id = '0'; $t->admin_id = '0';
} }
$t->save(); $t->save();
@ -201,9 +201,9 @@ class Package
$d->routers = $router_name; $d->routers = $router_name;
$d->type = "Hotspot"; $d->type = "Hotspot";
if ($admin) { if ($admin) {
$b->admin_id = $admin['id']; $d->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$b->admin_id = '0'; $d->admin_id = '0';
} }
$d->save(); $d->save();
@ -221,8 +221,8 @@ class Package
$t->routers = $router_name; $t->routers = $router_name;
$t->type = "Hotspot"; $t->type = "Hotspot";
if ($admin) { if ($admin) {
$t->admin_id = $admin['id']; $t->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$t->admin_id = '0'; $t->admin_id = '0';
} }
$t->save(); $t->save();
@ -276,8 +276,8 @@ class Package
$b->routers = $router_name; $b->routers = $router_name;
$b->type = "PPPOE"; $b->type = "PPPOE";
if ($admin) { if ($admin) {
$b->admin_id = $admin['id']; $b->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$b->admin_id = '0'; $b->admin_id = '0';
} }
$b->save(); $b->save();
@ -296,8 +296,8 @@ class Package
$t->routers = $router_name; $t->routers = $router_name;
$t->type = "PPPOE"; $t->type = "PPPOE";
if ($admin) { if ($admin) {
$t->admin_id = $admin['id']; $t->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$t->admin_id = '0'; $t->admin_id = '0';
} }
$t->save(); $t->save();
@ -325,8 +325,8 @@ class Package
$d->routers = $router_name; $d->routers = $router_name;
$d->type = "PPPOE"; $d->type = "PPPOE";
if ($admin) { if ($admin) {
$d->admin_id = $admin['id']; $d->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$d->admin_id = '0'; $d->admin_id = '0';
} }
$d->save(); $d->save();
@ -344,8 +344,8 @@ class Package
$t->method = "$gateway - $channel"; $t->method = "$gateway - $channel";
$t->routers = $router_name; $t->routers = $router_name;
if ($admin) { if ($admin) {
$t->admin_id = $admin['id']; $t->admin_id = ($admin['id']) ? $admin['id'] : '0';
}else{ } else {
$t->admin_id = '0'; $t->admin_id = '0';
} }
$t->type = "PPPOE"; $t->type = "PPPOE";
@ -511,6 +511,6 @@ class Package
$invoice .= Lang::pad("", '=') . "\n"; $invoice .= Lang::pad("", '=') . "\n";
$invoice .= Lang::pad($config['note'], ' ', 2) . "\n"; $invoice .= Lang::pad($config['note'], ' ', 2) . "\n";
$ui->assign('whatsapp', urlencode("```$invoice```")); $ui->assign('whatsapp', urlencode("```$invoice```"));
$ui->assign('in',$in); $ui->assign('in', $in);
} }
} }

View File

@ -5,6 +5,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(Admin::getID()){
r2(U.'dashboard');
}
if (isset($routes['1'])) { if (isset($routes['1'])) {
$do = $routes['1']; $do = $routes['1'];
} else { } else {

View File

@ -12,6 +12,9 @@ $ui->assign('_system_menu', 'customers');
$action = $routes['1']; $action = $routes['1'];
$ui->assign('_admin', $admin); $ui->assign('_admin', $admin);
if(empty($action)){
$action = 'list';
}
switch ($action) { switch ($action) {
case 'list': case 'list':
@ -274,7 +277,7 @@ switch ($action) {
} catch (Throwable $e) { } catch (Throwable $e) {
} }
try { try {
$c->delete(); if($c) $c->delete();
} catch (Exception $e) { } catch (Exception $e) {
} catch (Throwable $e) { } catch (Throwable $e) {
} }

View File

@ -4,5 +4,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(Admin::getID()){
r2(APP_URL.'/index.php?_route=dashboard'); r2(U.'dashboard');
}if(User::getID()){
r2(U.'home');
}else{
r2(U.'login');
}

View File

@ -5,6 +5,10 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
if(User::getID()){
r2(U.'home');
}
if (isset($routes['1'])) { if (isset($routes['1'])) {
$do = $routes['1']; $do = $routes['1'];
} else { } else {

View File

@ -142,7 +142,7 @@ switch ($action) {
$ui->display('user-orderView.tpl'); $ui->display('user-orderView.tpl');
break; break;
case 'pay': case 'pay':
if ($_c['enable_balance'] != 'yes' && $config['allow_balance_transfer'] != 'yes') { if ($config['enable_balance'] != 'yes') {
r2(U . "order/package", 'e', Lang::T("Balance not enabled")); r2(U . "order/package", 'e', Lang::T("Balance not enabled"));
} }
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']); $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']);
@ -176,7 +176,7 @@ switch ($action) {
} }
break; break;
case 'send': case 'send':
if ($_c['enable_balance'] != 'yes') { if ($config['enable_balance'] != 'yes') {
r2(U . "order/package", 'e', Lang::T("Balance not enabled")); r2(U . "order/package", 'e', Lang::T("Balance not enabled"));
} }
$ui->assign('_title', Lang::T('Buy for friend')); $ui->assign('_title', Lang::T('Buy for friend'));

View File

@ -36,9 +36,9 @@ switch ($action) {
$logo = $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.default.png'; $logo = $UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.default.png';
} }
$ui->assign('logo', $logo); $ui->assign('logo', $logo);
if ($_c['radius_enable'] && empty($_c['radius_client'])) { if ($config['radius_enable'] && empty($config['radius_client'])) {
try { try {
$_c['radius_client'] = Radius::getClient(); $config['radius_client'] = Radius::getClient();
$ui->assign('_c', $_c); $ui->assign('_c', $_c);
} catch (Exception $e) { } catch (Exception $e) {
//ignore //ignore

View File

@ -24,7 +24,7 @@ echo "Found " . count($d) . " user(s)\n";
run_hook('cronjob'); #HOOK run_hook('cronjob'); #HOOK
foreach ($d as $ds) { foreach ($d as $ds) {
if ($ds['type'] == 'Hotspot') { if ($ds['type'] == 'Hotspot') { # HOTSPOT
$date_now = strtotime(date("Y-m-d H:i:s")); $date_now = strtotime(date("Y-m-d H:i:s"));
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']); $expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username'])); echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));
@ -82,7 +82,7 @@ foreach ($d as $ds) {
} }
} else } else
echo " : ACTIVE \r\n"; echo " : ACTIVE \r\n";
} else { } else { # PPPOE
$date_now = strtotime(date("Y-m-d H:i:s")); $date_now = strtotime(date("Y-m-d H:i:s"));
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']); $expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username'])); echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));

View File

@ -15,13 +15,14 @@
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Expired Notification Message')}</label> <label class="col-md-2 control-label">{Lang::T('Expired Notification Message')}</label>
<div class="col-md-6"> <div class="col-md-6">
<textarea class="form-control" id="expired" <textarea class="form-control" id="expired" name="expired"
name="expired"
placeholder="Hello [[name]], your internet package [[package]] has been expired" placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea> rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
</div> </div>
<p class="help-block col-md-4"> <p class="help-block col-md-4">
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price. <b>[[name]]</b> will be replaced with Customer Name.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
</p> </p>
</div> </div>
</div> </div>
@ -33,7 +34,10 @@
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea> rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
</div> </div>
<p class="help-block col-md-4"> <p class="help-block col-md-4">
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price. <b>[[name]]</b> will be replaced with Customer Name.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
</p> </p>
</div> </div>
</div> </div>
@ -45,7 +49,10 @@
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea> rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
</div> </div>
<p class="help-block col-md-4"> <p class="help-block col-md-4">
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price. <b>[[name]]</b> will be replaced with Customer Name.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
</p> </p>
</div> </div>
</div> </div>
@ -57,7 +64,10 @@
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea> rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
</div> </div>
<p class="help-block col-md-4"> <p class="help-block col-md-4">
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price. <b>[[name]]</b> will be replaced with Customer Name.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
</p> </p>
</div> </div>
</div> </div>
@ -149,8 +159,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<button class="btn btn-success btn-block" <button class="btn btn-success btn-block" type="submit">{Lang::T('Save Changes')}</button>
type="submit">{Lang::T('Save Changes')}</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -13,10 +13,10 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="input-group"> <div class="input-group">
{if $_c['country_code_phone']!= ''} {if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1">+</span> <span class="input-group-addon" id="basic-addon1">+</span>
{else} {else}
<span class="input-group-addon" id="basic-addon1"><i <span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span> class="glyphicon glyphicon-phone-alt"></i></span>
{/if} {/if}
<input type="text" class="form-control" name="username" value="{$d['username']}" <input type="text" class="form-control" name="username" value="{$d['username']}"
required required
@ -42,10 +42,10 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="input-group"> <div class="input-group">
{if $_c['country_code_phone']!= ''} {if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1">+</span> <span class="input-group-addon" id="basic-addon1">+</span>
{else} {else}
<span class="input-group-addon" id="basic-addon1"><i <span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span> class="glyphicon glyphicon-phone-alt"></i></span>
{/if} {/if}
<input type="text" class="form-control" name="phonenumber" value="{$d['phonenumber']}" <input type="text" class="form-control" name="phonenumber" value="{$d['phonenumber']}"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']}{/if} {Lang::T('Phone Number')}"> placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']}{/if} {Lang::T('Phone Number')}">
@ -91,25 +91,24 @@
</div> </div>
<!--Customers Attributes edit start --> <!--Customers Attributes edit start -->
{if $customFields} {if $customFields}
{foreach $customFields as $customField} {foreach $customFields as $customField}
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label" <label class="col-md-2 control-label"
for="{$customField.field_name}">{$customField.field_name}</label> for="{$customField.field_name}">{$customField.field_name}</label>
<div class="col-md-6"> <div class="col-md-6">
<input class="form-control" type="text" name="custom_fields[{$customField.field_name}]" <input class="form-control" type="text" name="custom_fields[{$customField.field_name}]"
id="{$customField.field_name}" value="{$customField.field_value}"> id="{$customField.field_name}" value="{$customField.field_value}">
</div> </div>
<input type="checkbox" name="delete_custom_fields[]" value="{$customField.field_name}"> Delete <input type="checkbox" name="delete_custom_fields[]" value="{$customField.field_name}"> Delete
</div> </div>
{/foreach} {/foreach}
{/if} {/if}
<!--Customers Attributes edit end --> <!--Customers Attributes edit end -->
<!--Customers Attributes add start --> <!--Customers Attributes add start -->
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Attributes')}</label> <label class="col-md-2 control-label">{Lang::T('Attributes')}</label>
<div id="custom-fields-container" class="col-md-6"> <div id="custom-fields-container" class="col-md-6">
<button class="btn btn-success btn-sm" type="button" <button class="btn btn-success btn-sm" type="button" id="add-custom-field">+</button>
id="add-custom-field">+</button>
</div> </div>
</div> </div>
<!--Customers Attributes add end --> <!--Customers Attributes add end -->
@ -129,16 +128,16 @@
</div> </div>
{literal} {literal}
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function() {
var customFieldsContainer = document.getElementById('custom-fields-container'); var customFieldsContainer = document.getElementById('custom-fields-container');
var addCustomFieldButton = document.getElementById('add-custom-field'); var addCustomFieldButton = document.getElementById('add-custom-field');
addCustomFieldButton.addEventListener('click', function () { addCustomFieldButton.addEventListener('click', function() {
var fieldIndex = customFieldsContainer.children.length; var fieldIndex = customFieldsContainer.children.length;
var newField = document.createElement('div'); var newField = document.createElement('div');
newField.className = 'form-group'; newField.className = 'form-group';
newField.innerHTML = ` newField.innerHTML = `
<label class="col-md-2 control-label">Name:</label> <label class="col-md-2 control-label">Name:</label>
<div class="col-md-3"> <div class="col-md-3">
<input type="text" class="form-control" name="custom_field_name[]" placeholder="Name"> <input type="text" class="form-control" name="custom_field_name[]" placeholder="Name">
@ -151,17 +150,17 @@
<button type="button" class="remove-custom-field btn btn-danger btn-sm">-</button> <button type="button" class="remove-custom-field btn btn-danger btn-sm">-</button>
</div> </div>
`; `;
customFieldsContainer.appendChild(newField); customFieldsContainer.appendChild(newField);
}); });
customFieldsContainer.addEventListener('click', function (event) { customFieldsContainer.addEventListener('click', function(event) {
if (event.target.classList.contains('remove-custom-field')) { if (event.target.classList.contains('remove-custom-field')) {
var fieldContainer = event.target.parentNode.parentNode; var fieldContainer = event.target.parentNode.parentNode;
fieldContainer.parentNode.removeChild(fieldContainer); fieldContainer.parentNode.removeChild(fieldContainer);
} }
});
}); });
}); </script>
</script>
{/literal} {/literal}
{include file="sections/footer.tpl"} {include file="sections/footer.tpl"}

View File

@ -60,49 +60,52 @@
</div> </div>
</div> </div>
</div> </div>
<!-- solid sales graph -->
{if $_c['hide_mrc'] != 'yes'}
<div class="box box-solid ">
<div class="box-header">
<i class="fa fa-th"></i>
<h3 class="box-title">{Lang::T('Monthly Registered Customers')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm" ><i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="box-body border-radius-none">
<canvas class="chart" id="chart" style="height: 250px;"></canvas>
</div>
</div>
{/if}
<!-- solid sales graph -->
{if $_c['hide_tms'] != 'yes'}
<div class="box box-solid ">
<div class="box-header">
<i class="fa fa-inbox"></i>
<h3 class="box-title">{Lang::T('Total Monthly Sales')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm" ><i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="box-body border-radius-none">
<canvas class="chart" id="salesChart" style="height: 250px;"></canvas>
</div>
</div>
{/if}
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-7">
<!-- solid sales graph -->
{if $_c['hide_mrc'] != 'yes'}
<div class="box box-solid ">
<div class="box-header">
<i class="fa fa-th"></i>
<h3 class="box-title">{Lang::T('Monthly Registered Customers')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm"><i
class="fa fa-times"></i>
</a>
</div>
</div>
<div class="box-body border-radius-none">
<canvas class="chart" id="chart" style="height: 250px;"></canvas>
</div>
</div>
{/if}
<!-- solid sales graph -->
{if $_c['hide_tms'] != 'yes'}
<div class="box box-solid ">
<div class="box-header">
<i class="fa fa-inbox"></i>
<h3 class="box-title">{Lang::T('Total Monthly Sales')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm"><i
class="fa fa-times"></i>
</a>
</div>
</div>
<div class="box-body border-radius-none">
<canvas class="chart" id="salesChart" style="height: 250px;"></canvas>
</div>
</div>
{/if}
{if $_c['disable_voucher'] != 'yes' && $stocks['unused']>0 || $stocks['used']>0} {if $_c['disable_voucher'] != 'yes' && $stocks['unused']>0 || $stocks['used']>0}
{if $_c['hide_vs'] != 'yes'} {if $_c['hide_vs'] != 'yes'}
<div class="panel panel-primary mb20 panel-hovered project-stats table-responsive"> <div class="panel panel-primary mb20 panel-hovered project-stats table-responsive">

View File

@ -130,20 +130,11 @@
</li> </li>
{$_MENU_AFTER_DASHBOARD} {$_MENU_AFTER_DASHBOARD}
{if !in_array($_admin['user_type'],['Report'])} {if !in_array($_admin['user_type'],['Report'])}
<li class="{if $_system_menu eq 'customers'}active{/if} treeview"> <li {if $_system_menu eq 'customers'}class="active" {/if}>
<a href="#"> <a href="{$_url}customers">
<i class="ion ion-android-contacts"></i> <span>{Lang::T('Customer')}</span> <i class="fa fa-users"></i>
<span class="pull-right-container"> <span>{Lang::T('Customer')}</span>
<i class="fa fa-angle-left pull-right"></i>
</span>
</a> </a>
<ul class="treeview-menu">
<li {if $_routes[1] eq 'add'}class="active" {/if}><a href="{$_url}customers/add"><i
class="fa fa-user-plus"></i> {Lang::T('Add New Contact')}</a></li>
<li {if $_routes[1] eq 'list'}class="active" {/if}><a href="{$_url}customers/list"><i
class="fa fa-users"></i> {Lang::T('List Contact')}</a></li>
{$_MENU_CUSTOMERS}
</ul>
</li> </li>
{$_MENU_AFTER_CUSTOMERS} {$_MENU_AFTER_CUSTOMERS}
<li class="{if $_system_menu eq 'prepaid'}active{/if} treeview"> <li class="{if $_system_menu eq 'prepaid'}active{/if} treeview">

View File

@ -111,7 +111,7 @@
<div class="box-header"> <div class="box-header">
<h3 class="box-title">{$_bill['routers']}</h3> <h3 class="box-title">{$_bill['routers']}</h3>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
{if $_bill['type'] != 'Hotspot'} {if $_bill['type'] == 'Hotspot'}
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if} {if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
{else} {else}
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if} {if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}

View File

@ -77,6 +77,9 @@ if (empty($step)) {
// remove downloaded zip // remove downloaded zip
if (file_exists($file)) unlink($file); if (file_exists($file)) unlink($file);
} else if ($step == 3) { } else if ($step == 3) {
deleteFolder('system/autoload/');
deleteFolder('system/vendor/');
deleteFolder('ui/ui/');
copyFolder($folder, pathFixer('./')); copyFolder($folder, pathFixer('./'));
deleteFolder('install/'); deleteFolder('install/');
deleteFolder($folder); deleteFolder($folder);

View File

@ -1,3 +1,3 @@
{ {
"version": "2024.2.26" "version": "2024.2.29"
} }