Auto Translate Language
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
_auth();
|
||||
$ui->assign('_title', $_L['My_Account']);
|
||||
$ui->assign('_title', Lang::T('My Account'));
|
||||
$ui->assign('_system_menu', 'accounts');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -62,18 +62,18 @@ switch ($action) {
|
||||
$d->password = $npass;
|
||||
$d->save();
|
||||
|
||||
_msglog('s', $_L['Password_Changed_Successfully']);
|
||||
_msglog('s', Lang::T('Password changed successfully, Please login again'));
|
||||
_log('[' . $user['username'] . ']: Password changed successfully', 'User', $user['id']);
|
||||
|
||||
r2(U . 'login');
|
||||
} else {
|
||||
r2(U . 'accounts/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'accounts/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
} else {
|
||||
r2(U . 'accounts/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'accounts/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
} else {
|
||||
r2(U . 'accounts/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'accounts/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -105,7 +105,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_customers')->find_one($user['id']);
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
if ($msg == '') {
|
||||
@ -115,8 +115,8 @@ switch ($action) {
|
||||
$d->phonenumber = $phonenumber;
|
||||
$d->save();
|
||||
|
||||
_log('[' . $user['username'] . ']: ' . $_L['User_Updated_Successfully'], 'User', $user['id']);
|
||||
r2(U . 'accounts/profile', 's', $_L['User_Updated_Successfully']);
|
||||
_log('[' . $user['username'] . ']: ' . Lang::T('User Updated Successfully'), 'User', $user['id']);
|
||||
r2(U . 'accounts/profile', 's', Lang::T('User Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'accounts/profile', 'e', $msg);
|
||||
}
|
||||
|
@ -25,19 +25,19 @@ switch ($do) {
|
||||
Admin::setCookie($d['id']);
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username . ' ' . $_L['Login_Successful'], $d['user_type'], $d['id']);
|
||||
_log($username . ' ' . Lang::T('Login Successful'), $d['user_type'], $d['id']);
|
||||
r2(U . 'dashboard');
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_log($username . ' ' . $_L['Failed_Login'], $d['user_type']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
_log($username . ' ' . Lang::T('Failed Login'), $d['user_type']);
|
||||
r2(U . 'admin');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
r2(U . 'admin');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
r2(U . 'admin');
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Network']);
|
||||
$ui->assign('_title', Lang::T('Network'));
|
||||
$ui->assign('_system_menu', 'network');
|
||||
|
||||
$action = $routes['1'];
|
||||
|
@ -5,7 +5,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Bandwidth_Plans']);
|
||||
$ui->assign('_title', Lang::T('Bandwidth Plans'));
|
||||
$ui->assign('_system_menu', 'services');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -13,7 +13,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U."dashboard",'e',$_L['Do_Not_Access']);
|
||||
r2(U."dashboard",'e',Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
@ -57,7 +57,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_bandwidth')->find_one($id);
|
||||
if($d){
|
||||
$d->delete();
|
||||
r2(U . 'bandwidth/list', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'bandwidth/list', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -78,7 +78,7 @@ switch ($action) {
|
||||
|
||||
$d = ORM::for_table('tbl_bandwidth')->where('name_bw',$name)->find_one();
|
||||
if($d){
|
||||
$msg .= $_L['BW_already_exist']. '<br>';
|
||||
$msg .= Lang::T('Name Bandwidth Already Exist'). '<br>';
|
||||
}
|
||||
|
||||
if($msg == ''){
|
||||
@ -90,7 +90,7 @@ switch ($action) {
|
||||
$d->rate_up_unit = $rate_up_unit;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'bandwidth/list', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'bandwidth/list', 's', Lang::T('Data Created Successfully'));
|
||||
}else{
|
||||
r2(U . 'bandwidth/add', 'e', $msg);
|
||||
}
|
||||
@ -112,13 +112,13 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_bandwidth')->find_one($id);
|
||||
if($d){
|
||||
}else{
|
||||
$msg .= $_L['Data_Not_Found']. '<br>';
|
||||
$msg .= Lang::T('Data Not Found'). '<br>';
|
||||
}
|
||||
|
||||
if($d['name_bw'] != $name){
|
||||
$c = ORM::for_table('tbl_bandwidth')->where('name_bw',$name)->find_one();
|
||||
if($c){
|
||||
$msg .= $_L['BW_already_exist']. '<br>';
|
||||
$msg .= Lang::T('Name Bandwidth Already Exist'). '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ switch ($action) {
|
||||
$d->rate_up_unit = $rate_up_unit;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'bandwidth/list', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'bandwidth/list', 's', Lang::T('Data Updated Successfully'));
|
||||
}else{
|
||||
r2(U . 'bandwidth/edit/'.$id, 'e', $msg);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ $ui->assign('_admin', $admin);
|
||||
$cache = File::pathFixer('system/cache/codecanyon.json');
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
if (empty($config['envato_token'])) {
|
||||
r2(U . 'settings/app', 'w', '<a href="' . U . 'settings/app#envato' . '">Envato Personal Access Token</a> is not set');
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Customers']);
|
||||
$ui->assign('_title', Lang::T('Customer'));
|
||||
$ui->assign('_system_menu', 'customers');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -15,7 +15,7 @@ $ui->assign('_admin', $admin);
|
||||
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
@ -252,7 +252,7 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
|
||||
r2(U . 'customers/list', 's', $_L['User_Delete_Ok']);
|
||||
r2(U . 'customers/list', 's', Lang::T('User deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -279,7 +279,7 @@ switch ($action) {
|
||||
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Account already axist') . '<br>';
|
||||
}
|
||||
|
||||
if ($msg == '') {
|
||||
@ -293,7 +293,7 @@ switch ($action) {
|
||||
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
||||
$d->service_type = $service_type;
|
||||
$d->save();
|
||||
r2(U . 'customers/list', 's', $_L['account_created_successfully']);
|
||||
r2(U . 'customers/list', 's', Lang::T('Account Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'customers/add', 'e', $msg);
|
||||
}
|
||||
@ -325,7 +325,7 @@ switch ($action) {
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_customers')->find_one($id);
|
||||
if (!$d) {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
$oldusername = $d['username'];
|
||||
@ -337,7 +337,7 @@ switch ($action) {
|
||||
if ($oldusername != $username) {
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($c) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Account already axist') . '<br>';
|
||||
}
|
||||
$userDiff = true;
|
||||
}
|
||||
|
@ -6,11 +6,11 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Dashboard']);
|
||||
$ui->assign('_title', Lang::T('Dashboard'));
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "home", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "home", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$fdate = date('Y-m-01');
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Reports']);
|
||||
$ui->assign('_title', Lang::T('Reports'));
|
||||
$ui->assign('_sysfrm_menu', 'reports');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -75,21 +75,21 @@ switch ($action) {
|
||||
<div id="address">
|
||||
<h3>' . $config['CompanyName'] . '</h3>
|
||||
' . $config['address'] . '<br>
|
||||
' . $_L['Phone_Number'] . ': ' . $config['phone'] . '<br>
|
||||
' . Lang::T('Phone Number') . ': ' . $config['phone'] . '<br>
|
||||
</div>
|
||||
<div id="logo"><img id="image" src="'.$logo.'" alt="logo" /></div>
|
||||
</div>
|
||||
<div id="header">' . $_L['All_Transactions_at_Date'] . ': ' . date($config['date_format'], strtotime($mdate)) . '</div>
|
||||
<div id="header">' . Lang::T('All Transactions at Date') . ': ' . date($config['date_format'], strtotime($mdate)) . '</div>
|
||||
<table id="customers">
|
||||
<tr>
|
||||
<th>' . $_L['Username'] . '</th>
|
||||
<th>' . $_L['Plan_Name'] . '</th>
|
||||
<th>' . $_L['Type'] . '</th>
|
||||
<th>' . $_L['Plan_Price'] . '</th>
|
||||
<th>' . $_L['Created_On'] . '</th>
|
||||
<th>' . $_L['Expires_On'] . '</th>
|
||||
<th>' . $_L['Method'] . '</th>
|
||||
<th>' . $_L['Routers'] . '</th>
|
||||
<th>' . Lang::T('Username') . '</th>
|
||||
<th>' . Lang::T('Plan Name') . '</th>
|
||||
<th>' . Lang::T('Type') . '</th>
|
||||
<th>' . Lang::T('Plan Price') . '</th>
|
||||
<th>' . Lang::T('Created On') . '</th>
|
||||
<th>' . Lang::T('Expires On') . '</th>
|
||||
<th>' . Lang::T('Method') . '</th>
|
||||
<th>' . Lang::T('Routers') . '</th>
|
||||
</tr>';
|
||||
$c = true;
|
||||
foreach ($x as $value) {
|
||||
@ -116,7 +116,7 @@ switch ($action) {
|
||||
</tr>";
|
||||
}
|
||||
$html .= '</table>
|
||||
<h4 class="text-uppercase text-bold">' . $_L['Total_Income'] . ':</h4>
|
||||
<h4 class="text-uppercase text-bold">' . Lang::T('Total Income') . ':</h4>
|
||||
<h3 class="sum">' . $config['currency_code'] . ' ' . number_format($xy, 2, $config['dec_point'], $config['thousands_sep']) . '</h3>';
|
||||
run_hook('print_pdf_by_date'); #HOOK
|
||||
|
||||
@ -247,21 +247,21 @@ EOF;
|
||||
<div id="address">
|
||||
<h3>' . $config['CompanyName'] . '</h3>
|
||||
' . $config['address'] . '<br>
|
||||
' . $_L['Phone_Number'] . ': ' . $config['phone'] . '<br>
|
||||
' . Lang::T('Phone Number') . ': ' . $config['phone'] . '<br>
|
||||
</div>
|
||||
<div id="logo"><img id="image" src="'.$logo.'" alt="logo" /></div>
|
||||
</div>
|
||||
<div id="header">' . $_L['All_Transactions_at_Date'] . ': ' . date($config['date_format'], strtotime($fdate)) . ' - ' . date($config['date_format'], strtotime($tdate)) . '</div>
|
||||
<div id="header">' . Lang::T('All Transactions at Date') . ': ' . date($config['date_format'], strtotime($fdate)) . ' - ' . date($config['date_format'], strtotime($tdate)) . '</div>
|
||||
<table id="customers">
|
||||
<tr>
|
||||
<th>' . $_L['Username'] . '</th>
|
||||
<th>' . $_L['Plan_Name'] . '</th>
|
||||
<th>' . $_L['Type'] . '</th>
|
||||
<th>' . $_L['Plan_Price'] . '</th>
|
||||
<th>' . $_L['Created_On'] . '</th>
|
||||
<th>' . $_L['Expires_On'] . '</th>
|
||||
<th>' . $_L['Method'] . '</th>
|
||||
<th>' . $_L['Routers'] . '</th>
|
||||
<th>' . Lang::T('Username') . '</th>
|
||||
<th>' . Lang::T('Plan Name') . '</th>
|
||||
<th>' . Lang::T('Type') . '</th>
|
||||
<th>' . Lang::T('Plan Price') . '</th>
|
||||
<th>' . Lang::T('Created On') . '</th>
|
||||
<th>' . Lang::T('Expires On') . '</th>
|
||||
<th>' . Lang::T('Method') . '</th>
|
||||
<th>' . Lang::T('Routers') . '</th>
|
||||
</tr>';
|
||||
$c = true;
|
||||
foreach ($x as $value) {
|
||||
@ -288,7 +288,7 @@ EOF;
|
||||
</tr>";
|
||||
}
|
||||
$html .= '</table>
|
||||
<h4 class="text-uppercase text-bold">' . $_L['Total_Income'] . ':</h4>
|
||||
<h4 class="text-uppercase text-bold">' . Lang::T('Total Income') . ':</h4>
|
||||
<h3 class="sum">' . $config['currency_code'] . ' ' . number_format($xy, 2, $config['dec_point'], $config['thousands_sep']) . '</h3>';
|
||||
|
||||
run_hook('pdf_by_period'); #HOOK
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_auth();
|
||||
$ui->assign('_title', $_L['Dashboard']);
|
||||
$ui->assign('_title', Lang::T('Dashboard'));
|
||||
|
||||
$user = User::_info();
|
||||
$ui->assign('_user', $user);
|
||||
|
@ -25,19 +25,19 @@ switch ($do) {
|
||||
User::setCookie($d['id']);
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username . ' ' . $_L['Login_Successful'], 'User', $d['id']);
|
||||
_log($username . ' ' . Lang::T('Login Successful'), 'User', $d['id']);
|
||||
r2(U . 'home');
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_log($username . ' ' . $_L['Failed_Login'], 'User');
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
_log($username . ' ' . Lang::T('Failed Login'), 'User');
|
||||
r2(U . 'login');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
r2(U . 'login');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
r2(U . 'login');
|
||||
}
|
||||
|
||||
@ -141,11 +141,11 @@ switch ($do) {
|
||||
}
|
||||
} else {
|
||||
// voucher used by other customer
|
||||
r2(U . 'login', 'e', $_L['Voucher_Not_Valid']);
|
||||
r2(U . 'login', 'e', Lang::T('Voucher Not Valid'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
r2(U . 'login');
|
||||
}
|
||||
default:
|
||||
|
@ -14,7 +14,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ $ui->assign('_user', $user);
|
||||
switch ($action) {
|
||||
case 'voucher':
|
||||
$ui->assign('_system_menu', 'voucher');
|
||||
$ui->assign('_title', $_L['Order_Voucher']);
|
||||
$ui->assign('_title', Lang::T('Order Voucher'));
|
||||
run_hook('customer_view_order'); #HOOK
|
||||
$ui->display('user-order.tpl');
|
||||
break;
|
||||
|
@ -5,7 +5,7 @@
|
||||
**/
|
||||
|
||||
_auth();
|
||||
$ui->assign('_title', $_L['Order_Voucher']);
|
||||
$ui->assign('_title', Lang::T('Order Voucher'));
|
||||
$ui->assign('_system_menu', 'order');
|
||||
|
||||
$action = $routes['1'];
|
||||
|
@ -54,9 +54,9 @@ if(strpos($action,"-reset")!==false){
|
||||
$html = _post("html");
|
||||
run_hook('save_pages'); #HOOK
|
||||
if(file_put_contents($path, str_replace(["<div","</div>"],"",$html))){
|
||||
r2(U . 'pages/'.$action, 's', $_L['Success_Save_Page']);
|
||||
r2(U . 'pages/'.$action, 's', Lang::T("Saving page success"));
|
||||
}else{
|
||||
r2(U . 'pages/'.$action, 'e', $_L['Failed_Save_Page']);
|
||||
r2(U . 'pages/'.$action, 'e', Lang::T("Failed to save page, make sure i can write to folder pages, <i>chmod 664 pages/*.html<i>"));
|
||||
}
|
||||
}else
|
||||
$ui->display('a404.tpl');
|
||||
|
@ -16,7 +16,7 @@ $ui->assign('_admin', $admin);
|
||||
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$cache = File::pathFixer('system/cache/plugin_repository.json');
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Network']);
|
||||
$ui->assign('_title', Lang::T('Network'));
|
||||
$ui->assign('_system_menu', 'network');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -14,7 +14,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ switch ($action) {
|
||||
}
|
||||
$d->delete();
|
||||
|
||||
r2(U . 'pool/list', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'pool/list', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -101,12 +101,12 @@ switch ($action) {
|
||||
$msg .= 'Name should be between 3 to 30 characters' . '<br>';
|
||||
}
|
||||
if ($ip_address == '' or $routers == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_pool')->where('pool_name', $name)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Pool_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Pool Name Already Exist') . '<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
if ($routers != 'radius') {
|
||||
@ -121,7 +121,7 @@ switch ($action) {
|
||||
$b->routers = $routers;
|
||||
$b->save();
|
||||
|
||||
r2(U . 'pool/list', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'pool/list', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'pool/add', 'e', $msg);
|
||||
}
|
||||
@ -135,14 +135,14 @@ switch ($action) {
|
||||
$msg = '';
|
||||
|
||||
if ($ip_address == '' or $routers == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_pool')->find_one($id);
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
if ($msg == '') {
|
||||
@ -156,7 +156,7 @@ switch ($action) {
|
||||
$d->routers = $routers;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'pool/list', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'pool/list', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'pool/edit/' . $id, 'e', $msg);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Recharge_Account']);
|
||||
$ui->assign('_title', Lang::T('Recharge Account'));
|
||||
$ui->assign('_system_menu', 'prepaid');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -14,7 +14,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin', 'Sales'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$select2_customer = <<<EOT
|
||||
@ -64,7 +64,7 @@ switch ($action) {
|
||||
r2(U . 'prepaid/list', 's', $log);
|
||||
case 'list':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/prepaid.js"></script>');
|
||||
$ui->assign('_title', $_L['Customers']);
|
||||
$ui->assign('_title', Lang::T('Customer'));
|
||||
$username = _post('username');
|
||||
if ($username != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_user_recharges'), ['username' => '%' . $username . '%'], $username);
|
||||
@ -203,7 +203,7 @@ switch ($action) {
|
||||
}
|
||||
$d->delete();
|
||||
_log('[' . $admin['username'] . ']: ' . 'Delete Plan for Customer ' . $c['username'] . ' [' . $in['plan_name'] . '][' . Lang::moneyFormat($in['price']) . ']', $admin['user_type'], $admin['id']);
|
||||
r2(U . 'prepaid/list', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'prepaid/list', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -218,7 +218,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $id_plan)->where('enabled', '1')->find_one();
|
||||
if ($d) {
|
||||
@ -248,7 +248,7 @@ switch ($action) {
|
||||
Package::changeTo($username, $id_plan, $id);
|
||||
}
|
||||
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['namebp'] . '][' . Lang::moneyFormat($p['price']) . ']', $admin['user_type'], $admin['id']);
|
||||
r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'prepaid/list', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'prepaid/edit/' . $id, 'e', $msg);
|
||||
}
|
||||
@ -256,7 +256,7 @@ switch ($action) {
|
||||
|
||||
case 'voucher':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/voucher.js"></script>');
|
||||
$ui->assign('_title', $_L['Prepaid_Vouchers']);
|
||||
$ui->assign('_title', Lang::T('Prepaid Vouchers'));
|
||||
$code = _post('code');
|
||||
if ($code != '') {
|
||||
$ui->assign('code', $code);
|
||||
@ -283,7 +283,7 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'add-voucher':
|
||||
$ui->assign('_title', $_L['Add_Voucher']);
|
||||
$ui->assign('_title', Lang::T('Add Vouchers'));
|
||||
$c = ORM::for_table('tbl_customers')->find_many();
|
||||
$ui->assign('c', $c);
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
||||
@ -304,7 +304,7 @@ switch ($action) {
|
||||
$jml++;
|
||||
}
|
||||
}
|
||||
r2(U . 'prepaid/voucher', 's', "$jml ".$_L['Delete_Successfully']);
|
||||
r2(U . 'prepaid/voucher', 's', "$jml ".Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
case 'print-voucher':
|
||||
$from_id = _post('from_id');
|
||||
@ -374,7 +374,7 @@ switch ($action) {
|
||||
$template = file_get_contents("pages/Voucher.html");
|
||||
$template = str_replace('[[company_name]]', $config['CompanyName'], $template);
|
||||
|
||||
$ui->assign('_title', $_L['Voucher_Hotspot']);
|
||||
$ui->assign('_title', Lang::T('Hotspot Voucher'));
|
||||
$ui->assign('from_id', $from_id);
|
||||
$ui->assign('vpl', $vpl);
|
||||
$ui->assign('pagebreak', $pagebreak);
|
||||
@ -416,7 +416,7 @@ switch ($action) {
|
||||
|
||||
$msg = '';
|
||||
if ($type == '' or $plan == '' or $server == '' or $numbervoucher == '' or $lengthcode == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
if (Validator::UnsignedNumber($numbervoucher) == false) {
|
||||
$msg .= 'The Number of Vouchers must be a number' . '<br>';
|
||||
@ -456,7 +456,7 @@ switch ($action) {
|
||||
$d->save();
|
||||
}
|
||||
|
||||
r2(U . 'prepaid/voucher', 's', $_L['Voucher_Successfully']);
|
||||
r2(U . 'prepaid/voucher', 's', Lang::T('Create Vouchers Successfully'));
|
||||
} else {
|
||||
r2(U . 'prepaid/add-voucher/' . $id, 'e', $msg);
|
||||
}
|
||||
@ -468,13 +468,13 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_voucher')->find_one($id);
|
||||
if ($d) {
|
||||
$d->delete();
|
||||
r2(U . 'prepaid/voucher', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'prepaid/voucher', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'refill':
|
||||
$ui->assign('xfooter', $select2_customer);
|
||||
$ui->assign('_title', $_L['Refill_Account']);
|
||||
$ui->assign('_title', Lang::T('Refill Account'));
|
||||
run_hook('view_refill'); #HOOK
|
||||
$ui->display('refill.tpl');
|
||||
|
||||
@ -499,7 +499,7 @@ switch ($action) {
|
||||
r2(U . 'prepaid/refill', 'e', "Failed to refill account");
|
||||
}
|
||||
} else {
|
||||
r2(U . 'prepaid/refill', 'e', $_L['Voucher_Not_Valid']);
|
||||
r2(U . 'prepaid/refill', 'e', Lang::T('Voucher Not Valid'));
|
||||
}
|
||||
break;
|
||||
case 'deposit':
|
||||
|
@ -13,7 +13,7 @@ $ui->assign('_admin', $admin);
|
||||
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
@ -41,7 +41,7 @@ switch ($do) {
|
||||
$msg .= 'Email is not Valid<br>';
|
||||
}
|
||||
if ($password != $cpassword) {
|
||||
$msg .= $_L['PasswordsNotMatch'] . '<br>';
|
||||
$msg .= Lang::T('Passwords does not match') . '<br>';
|
||||
}
|
||||
|
||||
if(!empty($config['sms_url'])){
|
||||
@ -72,7 +72,7 @@ switch ($do) {
|
||||
}
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Account already axist') . '<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
run_hook('register_user'); #HOOK
|
||||
@ -85,7 +85,7 @@ switch ($do) {
|
||||
$d->phonenumber = $phonenumber;
|
||||
if ($d->save()) {
|
||||
$user = $d->id();
|
||||
r2(U . 'login', 's', $_L['Register_Success']);
|
||||
r2(U . 'login', 's', Lang::T('Register Success! You can login now'));
|
||||
} else {
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('fullname', $fullname);
|
||||
@ -115,7 +115,7 @@ switch ($do) {
|
||||
if(!empty($username)){
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
r2(U . 'register', 's', $_L['account_already_exist']);
|
||||
r2(U . 'register', 's', Lang::T('Account already axist'));
|
||||
}
|
||||
if(!file_exists($otpPath)){
|
||||
mkdir($otpPath);
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Reports']);
|
||||
$ui->assign('_title', Lang::T('Reports'));
|
||||
$ui->assign('_system_menu', 'reports');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -14,7 +14,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin', 'Sales'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$mdate = date('Y-m-d');
|
||||
|
@ -6,7 +6,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Network']);
|
||||
$ui->assign('_title', Lang::T('Network'));
|
||||
$ui->assign('_system_menu', 'network');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -18,7 +18,7 @@ use PEAR2\Net\RouterOS;
|
||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
@ -66,7 +66,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_routers')->find_one($id);
|
||||
if ($d) {
|
||||
$d->delete();
|
||||
r2(U . 'routers/list', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'routers/list', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -83,12 +83,12 @@ switch ($action) {
|
||||
$msg .= 'Name should be between 5 to 30 characters' . '<br>';
|
||||
}
|
||||
if ($ip_address == '' or $username == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_routers')->where('ip_address', $ip_address)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Router_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('IP Router Already Exist') . '<br>';
|
||||
}
|
||||
if (strtolower($name) == 'radius') {
|
||||
$msg .= '<b>Radius</b> name is reserved<br>';
|
||||
@ -106,7 +106,7 @@ switch ($action) {
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'routers/list', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'routers/list', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'routers/add', 'e', $msg);
|
||||
}
|
||||
@ -125,14 +125,14 @@ switch ($action) {
|
||||
$msg .= 'Name should be between 5 to 30 characters' . '<br>';
|
||||
}
|
||||
if ($ip_address == '' or $username == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_routers')->find_one($id);
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
if ($d['name'] != $name) {
|
||||
@ -185,7 +185,7 @@ switch ($action) {
|
||||
$p->set('routers', $name);
|
||||
$p->save();
|
||||
}
|
||||
r2(U . 'routers/list', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'routers/list', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'routers/edit/' . $id, 'e', $msg);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Hotspot_Plans']);
|
||||
$ui->assign('_title', Lang::T('Hotspot Plans'));
|
||||
$ui->assign('_system_menu', 'services');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -13,7 +13,7 @@ $admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
@ -180,7 +180,7 @@ switch ($action) {
|
||||
|
||||
$d->delete();
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'services/hotspot', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -211,16 +211,16 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '' or $id_bw == '' or $price == '' or $validity == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
if (empty($radius)) {
|
||||
if ($routers == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
}
|
||||
$d = ORM::for_table('tbl_plans')->where('name_plan', $name)->where('type', 'Hotspot')->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Plan_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Name Plan Already Exist') . '<br>';
|
||||
}
|
||||
|
||||
run_hook('add_plan'); #HOOK
|
||||
@ -283,7 +283,7 @@ switch ($action) {
|
||||
}
|
||||
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'services/hotspot', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/add', 'e', $msg);
|
||||
}
|
||||
@ -316,12 +316,12 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '' or $id_bw == '' or $price == '' or $validity == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
$d = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
run_hook('edit_plan'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -371,14 +371,14 @@ switch ($action) {
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'services/hotspot', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/edit/' . $id, 'e', $msg);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'pppoe':
|
||||
$ui->assign('_title', $_L['PPPOE_Plans']);
|
||||
$ui->assign('_title', Lang::T('PPPOE Plans'));
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/pppoe.js"></script>');
|
||||
|
||||
$name = _post('name');
|
||||
@ -397,7 +397,7 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'pppoe-add':
|
||||
$ui->assign('_title', $_L['PPPOE_Plans']);
|
||||
$ui->assign('_title', Lang::T('PPPOE Plans'));
|
||||
$d = ORM::for_table('tbl_bandwidth')->find_many();
|
||||
$ui->assign('d', $d);
|
||||
$r = ORM::for_table('tbl_routers')->find_many();
|
||||
@ -407,7 +407,7 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'pppoe-edit':
|
||||
$ui->assign('_title', $_L['PPPOE_Plans']);
|
||||
$ui->assign('_title', Lang::T('PPPOE Plans'));
|
||||
$id = $routes['2'];
|
||||
$d = ORM::for_table('tbl_plans')->find_one($id);
|
||||
if ($d) {
|
||||
@ -449,7 +449,7 @@ switch ($action) {
|
||||
}
|
||||
$d->delete();
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'services/pppoe', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -475,17 +475,17 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '' or $id_bw == '' or $price == '' or $validity == '' or $pool == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
if (empty($radius)) {
|
||||
if ($routers == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('name_plan', $name)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Plan_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Name Plan Already Exist') . '<br>';
|
||||
}
|
||||
run_hook('add_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -539,7 +539,7 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'services/pppoe', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/pppoe-add', 'e', $msg);
|
||||
}
|
||||
@ -566,13 +566,13 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '' or $id_bw == '' or $price == '' or $validity == '' or $pool == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
run_hook('edit_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -617,7 +617,7 @@ switch ($action) {
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'services/pppoe', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/pppoe-edit/' . $id, 'e', $msg);
|
||||
}
|
||||
@ -658,7 +658,7 @@ switch ($action) {
|
||||
if ($d) {
|
||||
run_hook('delete_balance'); #HOOK
|
||||
$d->delete();
|
||||
r2(U . 'services/balance', 's', $_L['Delete_Successfully']);
|
||||
r2(U . 'services/balance', 's', Lang::T('Data Deleted Successfully'));
|
||||
}
|
||||
break;
|
||||
case 'balance-edit-post':
|
||||
@ -673,13 +673,13 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('id', $id)->find_one();
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
run_hook('edit_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -689,7 +689,7 @@ switch ($action) {
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/balance', 's', $_L['Updated_Successfully']);
|
||||
r2(U . 'services/balance', 's', Lang::T('Data Updated Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/balance-edit/' . $id, 'e', $msg);
|
||||
}
|
||||
@ -705,12 +705,12 @@ switch ($action) {
|
||||
$msg .= 'The price must be a number' . '<br>';
|
||||
}
|
||||
if ($name == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->where('name_plan', $name)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Plan_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Name Plan Already Exist') . '<br>';
|
||||
}
|
||||
run_hook('add_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -727,7 +727,7 @@ switch ($action) {
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/balance', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'services/balance', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'services/balance-add', 'e', $msg);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Settings']);
|
||||
$ui->assign('_title', Lang::T('Settings'));
|
||||
$ui->assign('_system_menu', 'settings');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -15,7 +15,7 @@ $ui->assign('_admin', $admin);
|
||||
switch ($action) {
|
||||
case 'app':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
if (!empty(_get('testWa'))) {
|
||||
@ -71,15 +71,16 @@ switch ($action) {
|
||||
|
||||
case 'localisation':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
$folders = [];
|
||||
$files = scandir('system/lan/');
|
||||
foreach ($files as $file) {
|
||||
if (is_dir('system/lan/' . $file) && !in_array($file, ['.', '..'])) {
|
||||
$folders[] = $file;
|
||||
}
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
// $folders = [];
|
||||
// $files = scandir('system/lan/');
|
||||
// foreach ($files as $file) {
|
||||
// if (is_dir('system/lan/' . $file) && !in_array($file, ['.', '..'])) {
|
||||
// $folders[] = $file;
|
||||
// }
|
||||
// }
|
||||
$folders = Lang::getIsoLang();
|
||||
$ui->assign('lan', $folders);
|
||||
$timezonelist = Timezone::timezoneList();
|
||||
$ui->assign('tlist', $timezonelist);
|
||||
@ -90,7 +91,7 @@ switch ($action) {
|
||||
|
||||
case 'users':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/users.js"></script>');
|
||||
@ -112,7 +113,7 @@ switch ($action) {
|
||||
|
||||
case 'users-add':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
run_hook('view_add_admin'); #HOOK
|
||||
$ui->display('users-add.tpl');
|
||||
@ -120,7 +121,7 @@ switch ($action) {
|
||||
|
||||
case 'users-edit':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$id = $routes['2'];
|
||||
@ -136,7 +137,7 @@ switch ($action) {
|
||||
|
||||
case 'users-delete':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$id = $routes['2'];
|
||||
@ -147,7 +148,7 @@ switch ($action) {
|
||||
if ($d) {
|
||||
run_hook('delete_admin'); #HOOK
|
||||
$d->delete();
|
||||
r2(U . 'settings/users', 's', $_L['User_Delete_Ok']);
|
||||
r2(U . 'settings/users', 's', Lang::T('User deleted Successfully'));
|
||||
} else {
|
||||
r2(U . 'settings/users', 'e', $_L['Account_Not_Found']);
|
||||
}
|
||||
@ -175,7 +176,7 @@ switch ($action) {
|
||||
|
||||
$d = ORM::for_table('tbl_users')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Account already axist') . '<br>';
|
||||
}
|
||||
$date_now = date("Y-m-d H:i:s");
|
||||
run_hook('add_admin'); #HOOK
|
||||
@ -191,8 +192,8 @@ switch ($action) {
|
||||
|
||||
$d->save();
|
||||
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['account_created_successfully'], $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/users', 's', $_L['account_created_successfully']);
|
||||
_log('[' . $admin['username'] . ']: ' . Lang::T('Account Created Successfully'), $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/users', 's', Lang::T('Account Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'settings/users-add', 'e', $msg);
|
||||
}
|
||||
@ -224,13 +225,13 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_users')->find_one($id);
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
$msg .= Lang::T('Data Not Found') . '<br>';
|
||||
}
|
||||
|
||||
if ($d['username'] != $username) {
|
||||
$c = ORM::for_table('tbl_users')->where('username', $username)->find_one();
|
||||
if ($c) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Account already axist') . '<br>';
|
||||
}
|
||||
}
|
||||
run_hook('edit_admin'); #HOOK
|
||||
@ -249,7 +250,7 @@ switch ($action) {
|
||||
|
||||
$d->save();
|
||||
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['User_Updated_Successfully'], $admin['user_type'], $admin['id']);
|
||||
_log('[' . $admin['username'] . ']: ' . Lang::T('User Updated Successfully'), $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/users', 's', 'User Updated Successfully');
|
||||
} else {
|
||||
r2(U . 'settings/users-edit/' . $id, 'e', $msg);
|
||||
@ -271,7 +272,7 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
if ($company == '') {
|
||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||
r2(U . 'settings/app', 'e', Lang::T('All field is required'));
|
||||
} else {
|
||||
if ($radius_enable) {
|
||||
try {
|
||||
@ -316,9 +317,9 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['Settings_Saved_Successfully'], $admin['user_type'], $admin['id']);
|
||||
_log('[' . $admin['username'] . ']: ' . Lang::T('Settings Saved Successfully'), $admin['user_type'], $admin['id']);
|
||||
|
||||
r2(U . 'settings/app', 's', $_L['Settings_Saved_Successfully']);
|
||||
r2(U . 'settings/app', 's', Lang::T('Settings Saved Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -329,7 +330,7 @@ switch ($action) {
|
||||
$lan = _post('lan');
|
||||
run_hook('save_localisation'); #HOOK
|
||||
if ($tzone == '' or $date_format == '' or $lan == '') {
|
||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||
r2(U . 'settings/app', 'e', Lang::T('All field is required'));
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'timezone')->find_one();
|
||||
$d->value = $tzone;
|
||||
@ -404,14 +405,14 @@ switch ($action) {
|
||||
$d->value = $lan;
|
||||
$d->save();
|
||||
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['Settings_Saved_Successfully'], $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/localisation', 's', $_L['Settings_Saved_Successfully']);
|
||||
_log('[' . $admin['username'] . ']: ' . Lang::T('Settings Saved Successfully'), $admin['user_type'], $admin['id']);
|
||||
r2(U . 'settings/localisation', 's', Lang::T('Settings Saved Successfully'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'change-password':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
run_hook('view_change_password'); #HOOK
|
||||
$ui->display('change-password.tpl');
|
||||
@ -438,24 +439,24 @@ switch ($action) {
|
||||
$d->password = $npass;
|
||||
$d->save();
|
||||
|
||||
_msglog('s', $_L['Password_Changed_Successfully']);
|
||||
_msglog('s', Lang::T('Password changed successfully, Please login again'));
|
||||
_log('[' . $admin['username'] . ']: Password changed successfully', $admin['user_type'], $admin['id']);
|
||||
|
||||
r2(U . 'admin');
|
||||
} else {
|
||||
r2(U . 'settings/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'settings/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
} else {
|
||||
r2(U . 'settings/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'settings/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
} else {
|
||||
r2(U . 'settings/change-password', 'e', $_L['Incorrect_Current_Password']);
|
||||
r2(U . 'settings/change-password', 'e', Lang::T('Incorrect Current Password'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'notifications':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
run_hook('view_notifications'); #HOOK
|
||||
if (file_exists("system/uploads/notifications.json")) {
|
||||
@ -468,11 +469,11 @@ switch ($action) {
|
||||
break;
|
||||
case 'notifications-post':
|
||||
file_put_contents("system/uploads/notifications.json", json_encode($_POST));
|
||||
r2(U . 'settings/notifications', 's', $_L['Settings_Saved_Successfully']);
|
||||
r2(U . 'settings/notifications', 's', Lang::T('Settings Saved Successfully'));
|
||||
break;
|
||||
case 'dbstatus':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
|
||||
$dbc = new mysqli($db_host, $db_user, $db_password, $db_name);
|
||||
@ -490,7 +491,7 @@ switch ($action) {
|
||||
|
||||
case 'dbbackup':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
$tables = $_POST['tables'];
|
||||
set_time_limit(-1);
|
||||
@ -510,7 +511,7 @@ switch ($action) {
|
||||
break;
|
||||
case 'dbrestore':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
if (file_exists($_FILES['json']['tmp_name'])) {
|
||||
$suc = 0;
|
||||
@ -540,7 +541,7 @@ switch ($action) {
|
||||
break;
|
||||
case 'language':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
r2(U . "dashboard", 'e', Lang::T('You do not have permission to access this page'));
|
||||
}
|
||||
run_hook('view_add_language'); #HOOK
|
||||
$ui->display('language-add.tpl');
|
||||
@ -552,12 +553,12 @@ switch ($action) {
|
||||
$translator = _post('translator');
|
||||
|
||||
if ($name == '' or $folder == '') {
|
||||
$msg .= $_L['All_field_is_required'] . '<br>';
|
||||
$msg .= Lang::T('All field is required') . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_language')->where('name', $name)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['Lang_already_exist'] . '<br>';
|
||||
$msg .= Lang::T('Language Name Already Exist') . '<br>';
|
||||
}
|
||||
run_hook('save_language'); #HOOK
|
||||
if ($msg == '') {
|
||||
@ -567,7 +568,7 @@ switch ($action) {
|
||||
$b->author = $translator;
|
||||
$b->save();
|
||||
|
||||
r2(U . 'settings/localisation', 's', $_L['Created_Successfully']);
|
||||
r2(U . 'settings/localisation', 's', Lang::T('Data Created Successfully'));
|
||||
} else {
|
||||
r2(U . 'settings/language', 'e', $msg);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
_auth();
|
||||
$ui->assign('_title', $_L['Voucher']);
|
||||
$ui->assign('_title', Lang::T('Voucher'));
|
||||
$ui->assign('_system_menu', 'voucher');
|
||||
|
||||
$action = $routes['1'];
|
||||
@ -29,12 +29,12 @@ switch ($action) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
r2(U . "voucher/list-activated", 's', $_L['Activation_Vouchers_Successfully']);
|
||||
r2(U . "voucher/list-activated", 's', Lang::T('Activation Vouchers Successfully'));
|
||||
} else {
|
||||
r2(U . 'voucher/activation', 'e', "Failed to refill account");
|
||||
}
|
||||
} else {
|
||||
r2(U . 'voucher/activation', 'e', $_L['Voucher_Not_Valid']);
|
||||
r2(U . 'voucher/activation', 'e', Lang::T('Voucher Not Valid'));
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user