diff --git a/CHANGELOG.md b/CHANGELOG.md index fd8ea0cd..ccbdff79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ # CHANGELOG +## 2024.8.19 + +- New Page, Payment Info, To Inform Customer, which payment gateway is good +- Move Customer UI to user-ui folder +- Voucher Template +- Change editor to summernote +- Customer can change language + ## 2024.8.6 - Fix QRCode Scanner diff --git a/init.php b/init.php index d3da03d8..0a875ba9 100644 --- a/init.php +++ b/init.php @@ -136,6 +136,11 @@ if (!empty($_SESSION['user_language'])) { $config['language'] = $_SESSION['user_language']; }else if (!empty($_COOKIE['user_language'])) { $config['language'] = $_COOKIE['user_language']; +}else if(User::getID()>0){ + $lang = User::getAttribute("Language"); + if(!empty($lang)){ + $config['language'] = $lang; + } } if (empty($_SESSION['Lang'])) { diff --git a/system/autoload/Message.php b/system/autoload/Message.php index ce0806c6..a7fbae9b 100644 --- a/system/autoload/Message.php +++ b/system/autoload/Message.php @@ -96,7 +96,7 @@ class Message public static function sendEmail($to, $subject, $body) { - global $config, $PAGES_PATH, $_app_stage; + global $config, $PAGES_PATH, $debug_mail; if (empty($body)) { return ""; } @@ -116,7 +116,7 @@ class Message } else { $mail = new PHPMailer(); $mail->isSMTP(); - if ($_app_stage == 'Dev') { + if (isset($debug_mail) && $debug_mail == 'Dev') { $mail->SMTPDebug = SMTP::DEBUG_SERVER; } $mail->Host = $config['smtp_host']; diff --git a/system/autoload/User.php b/system/autoload/User.php index e9358620..e8e6e65f 100644 --- a/system/autoload/User.php +++ b/system/autoload/User.php @@ -123,7 +123,7 @@ class User return 0; } - public static function getAttribute($name, $id = 0) + public static function getAttribute($name, $id = 0, $default = '') { if (!$id) { $id = User::getID(); @@ -135,7 +135,7 @@ class User if ($f) { return $f['field_value']; } - return ''; + return $default; } public static function getAttributes($endWith, $id = 0) diff --git a/system/controllers/accounts.php b/system/controllers/accounts.php index 06ec95ae..5a1e4726 100644 --- a/system/controllers/accounts.php +++ b/system/controllers/accounts.php @@ -18,7 +18,7 @@ switch ($action) { case 'change-password': run_hook('customer_view_change_password'); #HOOK - $ui->display('user-change-password.tpl'); + $ui->display('user-ui/change-password.tpl'); break; case 'change-password-post': @@ -67,16 +67,9 @@ switch ($action) { break; case 'profile': - $d = ORM::for_table('tbl_customers')->find_one($user['id']); - if ($d) { - run_hook('customer_view_edit_profile'); #HOOK - $ui->assign('d', $d); - $ui->display('user-profile.tpl'); - } else { - r2(U . 'home', 'e', Lang::T('Account Not Found')); - } + run_hook('customer_view_edit_profile'); #HOOK + $ui->display('user-ui/profile.tpl'); break; - case 'edit-profile-post': $fullname = _post('fullname'); $address = _post('address'); @@ -84,45 +77,32 @@ switch ($action) { $phonenumber = _post('phonenumber'); run_hook('customer_edit_profile'); #HOOK $msg = ''; - if (Validator::Length($fullname, 31, 2) == false) { - $msg .= 'Full Name should be between 3 to 30 characters' . '
'; + if (Validator::Length($fullname, 31, 1) == false) { + $msg .= 'Full Name should be between 1 to 30 characters' . '
'; } if (Validator::UnsignedNumber($phonenumber) == false) { $msg .= 'Phone Number must be a number' . '
'; } - $d = ORM::for_table('tbl_customers')->find_one($user['id']); - if ($d) { - } else { - $msg .= Lang::T('Data Not Found') . '
'; + $user->fullname = $fullname; + $user->address = $address; + if ($_c['allow_phone_otp'] != 'yes') { + $user->phonenumber = $phonenumber; + } + if ($_c['allow_email_otp'] != 'yes') { + $user->email = $email; } - if ($msg == '') { - $d->fullname = $fullname; - $d->address = $address; - $d->email = $email; - $d->phonenumber = $phonenumber; - $d->save(); + $user->save(); - _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); - } + _log('[' . $user['username'] . ']: ' . Lang::T('User Updated Successfully'), 'User', $user['id']); + r2(U . 'accounts/profile', 's', Lang::T('User Updated Successfully')); break; case 'phone-update': - - $d = ORM::for_table('tbl_customers')->find_one($user['id']); - if ($d) { - //run_hook('customer_view_edit_profile'); #HOOK - $ui->assign('d', $d); - $ui->assign('new_phone', $_SESSION['new_phone']); - $ui->display('user-phone-update.tpl'); - } else { - r2(U . 'home', 'e', Lang::T('Account Not Found')); - } + $ui->assign('new_phone', $_SESSION['new_phone']); + $ui->display('user-ui/phone-update.tpl'); break; case 'phone-update-otp': @@ -131,7 +111,7 @@ switch ($action) { $otpPath = $CACHE_PATH . '/sms/'; $_SESSION['new_phone'] = $phone; // Validate the phone number format - if (!preg_match('/^[0-9]{10,}$/', $phone)) { + if (!preg_match('/^[0-9]{10,}$/', $phone) || empty($phone)) { r2(U . 'accounts/phone-update', 'e', Lang::T('Invalid phone number format')); } @@ -139,39 +119,35 @@ switch ($action) { r2(U . 'accounts/phone-update', 'e', Lang::T('SMS server not Available, Please try again later')); } - if (!empty($config['sms_url'])) { - if (!empty($phone)) { - $d = ORM::for_table('tbl_customers')->where('username', $username)->where('phonenumber', $phone)->find_one(); - if ($d) { - r2(U . 'accounts/phone-update', 'e', Lang::T('You cannot use your current phone number')); - } - if (!file_exists($otpPath)) { - mkdir($otpPath); - touch($otpPath . 'index.html'); - } - $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; - $phoneFile = $otpPath . sha1($username . $db_pass) . "_phone.txt"; + $d = ORM::for_table('tbl_customers')->whereNotEqual('username', $username)->where('phonenumber', $phone)->find_one(); + if ($d) { + r2(U . 'accounts/phone-update', 'e', Lang::T('Phone number already registered by another customer')); + } + if (!file_exists($otpPath)) { + mkdir($otpPath); + touch($otpPath . 'index.html'); + } + $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; + $phoneFile = $otpPath . sha1($username . $db_pass) . "_phone.txt"; - // expired 10 minutes - if (file_exists($otpFile) && time() - filemtime($otpFile) < 600) { - r2(U . 'accounts/phone-update', 'e', Lang::T('Please wait ' . (600 - (time() - filemtime($otpFile))) . ' seconds before sending another SMS')); - } else { - $otp = rand(100000, 999999); - file_put_contents($otpFile, $otp); - file_put_contents($phoneFile, $phone); - // send send OTP to user - if ($config['phone_otp_type'] === 'sms') { - Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - } elseif ($config['phone_otp_type'] === 'whatsapp') { - Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - } elseif ($config['phone_otp_type'] === 'both') { - Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - } - //redirect after sending OTP - r2(U . 'accounts/phone-update', 'e', Lang::T('Verification code has been sent to your phone')); - } + // expired 10 minutes + if (file_exists($otpFile) && time() - filemtime($otpFile) < 600) { + r2(U . 'accounts/phone-update', 'e', Lang::T('Please wait ') . (600 - (time() - filemtime($otpFile))) . Lang::T(' seconds before sending another SMS')); + } else { + $otp = rand(100000, 999999); + file_put_contents($otpFile, $otp); + file_put_contents($phoneFile, $phone); + // send send OTP to user + if ($config['phone_otp_type'] === 'sms') { + Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); + } elseif ($config['phone_otp_type'] === 'whatsapp') { + Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); + } elseif ($config['phone_otp_type'] === 'both') { + Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); + Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); } + //redirect after sending OTP + r2(U . 'accounts/phone-update', 'e', Lang::T('Verification code has been sent to your phone')); } break; @@ -185,60 +161,157 @@ switch ($action) { // Validate the phone number format if (!preg_match('/^[0-9]{10,}$/', $phone)) { r2(U . 'accounts/phone-update', 'e', Lang::T('Invalid phone number format')); + } + + if (empty($config['sms_url'])) { + r2(U . 'accounts/phone-update', 'e', Lang::T('SMS server not Available, Please try again later')); + } + + $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; + $phoneFile = $otpPath . sha1($username . $db_pass) . "_phone.txt"; + + // Check if OTP file exists + if (!file_exists($otpFile)) { + r2(U . 'accounts/phone-update', 'e', Lang::T('Please request OTP first')); exit(); } - if (!empty($config['sms_url'])) { - $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; - $phoneFile = $otpPath . sha1($username . $db_pass) . "_phone.txt"; - - // Check if OTP file exists - if (!file_exists($otpFile)) { - r2(U . 'accounts/phone-update', 'e', Lang::T('Please request OTP first')); - exit(); - } - - // expired 10 minutes - if (time() - filemtime($otpFile) > 1200) { - unlink($otpFile); - unlink($phoneFile); - r2(U . 'accounts/phone-update', 'e', Lang::T('Verification code expired')); - exit(); - } else { - $code = file_get_contents($otpFile); - - // Check if OTP code matches - if ($code != $otp_code) { - r2(U . 'accounts/phone-update', 'e', Lang::T('Wrong Verification code')); - exit(); - } - - // Check if the phone number matches the one that requested the OTP - $savedPhone = file_get_contents($phoneFile); - if ($savedPhone !== $phone) { - r2(U . 'accounts/phone-update', 'e', Lang::T('The phone number does not match the one that requested the OTP')); - exit(); - } - - // OTP verification successful, delete OTP and phone number files - unlink($otpFile); - unlink($phoneFile); - } - } else { - r2(U . 'accounts/phone-update', 'e', Lang::T('SMS server not available')); + // expired 10 minutes + if (time() - filemtime($otpFile) > 1200) { + unlink($otpFile); + unlink($phoneFile); + r2(U . 'accounts/phone-update', 'e', Lang::T('Verification code expired')); exit(); + } else { + $code = file_get_contents($otpFile); + + // Check if OTP code matches + if ($code != $otp_code) { + r2(U . 'accounts/phone-update', 'e', Lang::T('Wrong Verification code')); + exit(); + } + + // Check if the phone number matches the one that requested the OTP + $savedPhone = file_get_contents($phoneFile); + if ($savedPhone !== $phone) { + r2(U . 'accounts/phone-update', 'e', Lang::T('The phone number does not match the one that requested the OTP')); + exit(); + } + + // OTP verification successful, delete OTP and phone number files + unlink($otpFile); + unlink($phoneFile); } // Update the phone number in the database - $d = ORM::for_table('tbl_customers')->where('username', $username)->find_one(); - if ($d) { - $d->phonenumber = Lang::phoneFormat($phone); - $d->save(); - } + $user->phonenumber = Lang::phoneFormat($phone); + $user->save(); r2(U . 'accounts/profile', 's', Lang::T('Phone number updated successfully')); break; + case 'email-update': + $ui->assign('new_email', $_SESSION['new_email']); + $ui->display('user-ui/email-update.tpl'); + break; + case 'email-update-otp': + $email = trim(_post('email')); + $username = $user['username']; + $otpPath = $CACHE_PATH . '/email/'; + $_SESSION['new_email'] = $email; + // Validate the phone number format + if (!Validator::Email($email)) { + r2(U . 'accounts/email-update', 'e', Lang::T('Invalid Email address format')); + } + + if (empty($config['smtp_host'])) { + r2(U . 'accounts/email-update', 'e', Lang::T('Email server not Available, Please ask admin to configure it')); + } + + $d = ORM::for_table('tbl_customers')->whereNotEqual('username', $username)->where('email', $email)->find_one(); + if ($d) { + r2(U . 'accounts/email-update', 'e', Lang::T('Email already used by another Customer')); + } + if (!file_exists($otpPath)) { + mkdir($otpPath); + touch($otpPath . 'index.html'); + } + $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; + $emailFile = $otpPath . sha1($username . $db_pass) . "_email.txt"; + + // expired 10 minutes + if (file_exists($otpFile) && time() - filemtime($otpFile) < 600) { + r2(U . 'accounts/email-update', 'e', Lang::T('Please wait ') . (600 - (time() - filemtime($otpFile))) . Lang::T(' seconds before sending another Email')); + } else { + $otp = rand(100000, 999999); + file_put_contents($otpFile, $otp); + file_put_contents($emailFile, $email); + // send OTP to user + $body = Lang::T("Hello") . ' ' . $user['fullname'] . ",\n\n" . Lang::T("Your Email Verification Code is:") . " $otp"; + Message::sendEmail($email, Lang::T('Change Email Verification Code'), $body); + //redirect after sending OTP + r2(U . 'accounts/email-update', 'e', Lang::T('Verification code has been sent to your email. Check Spam folder if not found.')); + } + + break; + + case 'email-update-post': + $email = trim(_post('email')); + $otp_code = _post('otp'); + $username = $user['username']; + $otpPath = $CACHE_PATH . '/email/'; + // Validate the phone number format + if (!Validator::Email($email)) { + r2(U . 'accounts/email-update', 'e', Lang::T('Invalid Email address format')); + exit(); + } + + if (empty($config['smtp_host'])) { + r2(U . 'accounts/email-update', 'e', Lang::T('Email server not Available, Please ask admin to configure it')); + } + + $otpFile = $otpPath . sha1($username . $db_pass) . ".txt"; + $emailFile = $otpPath . sha1($username . $db_pass) . "_email.txt"; + + // Check if OTP file exists + if (!file_exists($otpFile)) { + r2(U . 'accounts/email-update', 'e', Lang::T('Please request OTP first')); + exit(); + } + + // expired 10 minutes + if (time() - filemtime($otpFile) > 1200) { + unlink($otpFile); + unlink($emailFile); + r2(U . 'accounts/email-update', 'e', Lang::T('Verification code expired')); + exit(); + } else { + $code = file_get_contents($otpFile); + + // Check if OTP code matches + if ($code != $otp_code) { + r2(U . 'accounts/email-update', 'e', Lang::T('Wrong Verification code')); + exit(); + } + + // Check if the phone number matches the one that requested the OTP + $savedEmail = file_get_contents($emailFile); + if ($savedEmail !== $email) { + r2(U . 'accounts/email-update', 'e', Lang::T('The Email Address does not match the one that requested the OTP')); + exit(); + } + + // OTP verification successful, delete OTP and phone number files + unlink($otpFile); + unlink($emailFile); + } + + $user->email = $email; + $user->save(); + + r2(U . 'accounts/profile', 's', Lang::T('Email Address updated successfully')); + break; + case 'language-update-post': global $root_path; $selected_language = _req('lang', 'english'); @@ -255,7 +328,7 @@ switch ($action) { $_SESSION['Lang'] = $_L; file_put_contents($lan_file, json_encode($_L)); } - + User::setAttribute("Language", $selected_language); r2($_SERVER['HTTP_REFERER'], 's', ucwords($selected_language)); diff --git a/system/controllers/customers.php b/system/controllers/customers.php index f486b2c2..379db52e 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -440,7 +440,7 @@ switch ($action) { // Send welcome message if (isset($_POST['send_welcome_message']) && $_POST['send_welcome_message'] == true) { $welcomeMessage = Lang::getNotifText('welcome_message'); - $welcomeMessage = str_replace('[[company_name]]', $config['CompanyName'], $welcomeMessage); + $welcomeMessage = str_replace('[[company]]', $config['CompanyName'], $welcomeMessage); $welcomeMessage = str_replace('[[name]]', $d['fullname'], $welcomeMessage); $welcomeMessage = str_replace('[[username]]', $d['username'], $welcomeMessage); $welcomeMessage = str_replace('[[password]]', $d['password'], $welcomeMessage); diff --git a/system/controllers/home.php b/system/controllers/home.php index 3e99d443..7c51018a 100644 --- a/system/controllers/home.php +++ b/system/controllers/home.php @@ -325,4 +325,4 @@ $abills = User::getAttributes("Bill"); $ui->assign('abills', $abills); run_hook('view_customer_dashboard'); #HOOK -$ui->display('user-dashboard.tpl'); +$ui->display('user-ui/dashboard.tpl'); diff --git a/system/controllers/login.php b/system/controllers/login.php index e44da6d1..75bf4a35 100644 --- a/system/controllers/login.php +++ b/system/controllers/login.php @@ -291,9 +291,9 @@ switch ($do) { run_hook('customer_view_login'); #HOOK if ($config['disable_registration'] == 'yes') { $ui->assign('code', alphanumeric(_get('code'), "-")); - $ui->display('user-login-noreg.tpl'); + $ui->display('user-ui/login-noreg.tpl'); } else { - $ui->display('user-login.tpl'); + $ui->display('user-ui/login.tpl'); } break; } diff --git a/system/controllers/mail.php b/system/controllers/mail.php index c54318fd..6549adac 100644 --- a/system/controllers/mail.php +++ b/system/controllers/mail.php @@ -29,7 +29,7 @@ switch ($action) { $ui->assign('tipe', 'view'); $ui->assign('_system_menu', 'inbox'); $ui->assign('_title', Lang::T('Inbox')); - $ui->display('user-inbox.tpl'); + $ui->display('user-ui/inbox.tpl'); break; case 'delete': if($routes['2']){ @@ -57,5 +57,5 @@ switch ($action) { $ui->assign('mails', $mails); $ui->assign('_system_menu', 'inbox'); $ui->assign('_title', Lang::T('Inbox')); - $ui->display('user-inbox.tpl'); + $ui->display('user-ui/inbox.tpl'); } \ No newline at end of file diff --git a/system/controllers/order.php b/system/controllers/order.php index ce778e30..19aae154 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -15,7 +15,7 @@ switch ($action) { $ui->assign('_system_menu', 'voucher'); $ui->assign('_title', Lang::T('Order Voucher')); run_hook('customer_view_order'); #HOOK - $ui->display('user-order.tpl'); + $ui->display('user-ui/order.tpl'); break; case 'history': $ui->assign('_system_menu', 'history'); @@ -24,7 +24,7 @@ switch ($action) { $ui->assign('d', $d); $ui->assign('_title', Lang::T('Order History')); run_hook('customer_view_order_history'); #HOOK - $ui->display('user-orderHistory.tpl'); + $ui->display('user-ui/orderHistory.tpl'); break; case 'balance': if (strpos($user['email'], '@') === false) { @@ -34,7 +34,7 @@ switch ($action) { $ui->assign('_system_menu', 'balance'); $plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->where('prepaid', 'yes')->find_many(); $ui->assign('plans_balance', $plans_balance); - $ui->display('user-orderBalance.tpl'); + $ui->display('user-ui/orderBalance.tpl'); break; case 'package': if (strpos($user['email'], '@') === false) { @@ -48,24 +48,71 @@ switch ($action) { } if (!empty($_SESSION['nux-router'])) { if ($_SESSION['nux-router'] == 'radius') { - $radius_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); - $radius_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); + $radius_pppoe = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where('is_radius', 1) + ->where('type', 'PPPOE') + ->where('prepaid', 'yes')->find_many(); + $radius_hotspot = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where('is_radius', 1) + ->where('type', 'Hotspot') + ->where('prepaid', 'yes')->find_many(); } else { $routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many(); $rs = []; foreach ($routers as $r) { $rs[] = $r['name']; } - $plans_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); - $plans_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); + $plans_pppoe = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where_in('routers', $rs) + ->where('is_radius', 0) + ->where('type', 'PPPOE') + ->where('prepaid', 'yes') + ->find_many(); + $plans_hotspot = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where_in('routers', $rs) + ->where('is_radius', 0) + ->where('type', 'Hotspot') + ->where('prepaid', 'yes') + ->find_many(); } } else { - $radius_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); - $radius_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); + $radius_pppoe = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where('is_radius', 1) + ->where('type', 'PPPOE') + ->where('prepaid', 'yes') + ->find_many(); + $radius_hotspot = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where('is_radius', 1) + ->where('type', 'Hotspot') + ->where('prepaid', 'yes') + ->find_many(); $routers = ORM::for_table('tbl_routers')->find_many(); - $plans_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); - $plans_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); + $plans_pppoe = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1') + ->where('is_radius', 0) + ->where('type', 'PPPOE') + ->where('prepaid', 'yes') + ->find_many(); + $plans_hotspot = ORM::for_table('tbl_plans') + ->where('plan_type', $account_type) + ->where('enabled', '1')->where('is_radius', 0) + ->where('type', 'Hotspot') + ->where('prepaid', 'yes') + ->find_many(); } $ui->assign('routers', $routers); $ui->assign('radius_pppoe', $radius_pppoe); @@ -73,7 +120,7 @@ switch ($action) { $ui->assign('plans_pppoe', $plans_pppoe); $ui->assign('plans_hotspot', $plans_hotspot); run_hook('customer_view_order_plan'); #HOOK - $ui->display('user-orderPlan.tpl'); + $ui->display('user-ui/orderPlan.tpl'); break; case 'unpaid': $d = ORM::for_table('tbl_payment_gateway') @@ -138,7 +185,7 @@ switch ($action) { $ui->assign('plan', $plan); $ui->assign('bandw', $bandw); $ui->assign('_title', 'TRX #' . $trxid); - $ui->display('user-orderView.tpl'); + $ui->display('user-ui/orderView.tpl'); break; case 'pay': if ($config['enable_balance'] != 'yes') { @@ -328,7 +375,7 @@ switch ($action) { $ui->assign('router', $router_name); $ui->assign('plan', $plan); $ui->assign('tax', $tax); - $ui->display('user-sendPlan.tpl'); + $ui->display('user-ui/sendPlan.tpl'); break; case 'gateway': $ui->assign('_title', Lang::T('Select Payment Gateway')); @@ -366,7 +413,7 @@ switch ($action) { $ui->assign('add_cost', $add_cost); $ui->assign('bills', $bills); $ui->assign('plan', $plan); - $ui->display('user-selectGateway.tpl'); + $ui->display('user-ui/selectGateway.tpl'); break; } else { sendTelegram("Payment Gateway not set, please set it in Settings"); diff --git a/system/controllers/page.php b/system/controllers/page.php index d1bd9ad9..dcf9663d 100644 --- a/system/controllers/page.php +++ b/system/controllers/page.php @@ -16,6 +16,6 @@ if(file_exists(__DIR__."/../../pages/".str_replace(".","",$action).".html")){ $ui->assign("PageFile",$action); $ui->assign("pageHeader",$action); run_hook('customer_view_page'); #HOOK - $ui->display('user-pages.tpl'); + $ui->display('user-ui/pages.tpl'); }else - $ui->display('404.tpl'); \ No newline at end of file + $ui->display('user-ui/404.tpl'); \ No newline at end of file diff --git a/system/controllers/pages.php b/system/controllers/pages.php index 4e082c4f..0260238d 100644 --- a/system/controllers/pages.php +++ b/system/controllers/pages.php @@ -17,7 +17,7 @@ if (strpos($action, "-reset") !== false) { _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $action = str_replace("-reset", "", $action); - $path = $PAGES_PATH . "/" . str_replace(".", "", $action) . ".html"; + $path = "$PAGES_PATH/" . str_replace(".", "", $action) . ".html"; $temp = "pages_template/" . str_replace(".", "", $action) . ".html"; if (file_exists($temp)) { if (!copy($temp, $path)) { @@ -31,7 +31,7 @@ if (strpos($action, "-reset") !== false) { if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) { _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } - $path = $PAGES_PATH . "/" . str_replace(".", "", $action) . ".html"; + $path = "$PAGES_PATH/" . str_replace(".", "", $action) . ".html"; $ui->assign("action", $action); //echo $path; run_hook('view_edit_pages'); #HOOK @@ -47,13 +47,13 @@ if (strpos($action, "-reset") !== false) { } if (file_exists($path)) { if ($action == 'Voucher') { - if (!file_exists($PAGES_PATH . "/vouchers/")) { - mkdir($PAGES_PATH . "/vouchers/"); + if (!file_exists("$PAGES_PATH/vouchers/")) { + mkdir("$PAGES_PATH/vouchers/"); if (file_exists("pages_template/vouchers/")) { - File::copyFolder("pages_template/vouchers/", $PAGES_PATH . "/vouchers/"); + File::copyFolder("pages_template/vouchers/", "$PAGES_PATH/vouchers/"); } } - $ui->assign("vouchers", scandir($PAGES_PATH . "/vouchers/")); + $ui->assign("vouchers", scandir("$PAGES_PATH/vouchers/")); } $html = file_get_contents($path); $ui->assign("htmls", str_replace([""], "", $html)); @@ -68,14 +68,14 @@ if (strpos($action, "-reset") !== false) { _alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard"); } $action = str_replace("-post", "", $action); - $path = $PAGES_PATH . "/" . str_replace(".", "", $action) . ".html"; + $path = "$PAGES_PATH/" . str_replace(".", "", $action) . ".html"; if (file_exists($path)) { $html = _post("html"); run_hook('save_pages'); #HOOK if (file_put_contents($path, $html)) { if (_post('template_save') == 'yes') { if (!empty(_post('template_name'))) { - file_put_contents($PAGES_PATH . "/vouchers/" . _post('template_name') . '.html', $html); + file_put_contents("$PAGES_PATH/vouchers/" . _post('template_name') . '.html', $html); } } r2(U . 'pages/' . $action, 's', Lang::T("Saving page success")); diff --git a/system/controllers/register.php b/system/controllers/register.php index 9a432edf..b3269748 100644 --- a/system/controllers/register.php +++ b/system/controllers/register.php @@ -22,7 +22,7 @@ switch ($do) { $password = _post('password'); $cpassword = _post('cpassword'); $address = _post('address'); - if (!empty($config['sms_url'])) { + if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { $phonenumber = Lang::phoneFormat($username); $username = $phonenumber; } else if (strlen($username) < 21) { @@ -45,7 +45,7 @@ switch ($do) { $msg .= Lang::T('Passwords does not match') . '
'; } - if (!empty($config['sms_url'])) { + if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { $otpPath .= sha1($username . $db_pass) . ".txt"; run_hook('validate_otp'); #HOOK //expired 10 minutes @@ -62,7 +62,7 @@ switch ($do) { $ui->assign('phonenumber', $phonenumber); $ui->assign('notify', 'Wrong Verification code'); $ui->assign('notify_t', 'd'); - $ui->display('register-otp.tpl'); + $ui->display('user-ui/register-otp.tpl'); exit(); } else { unlink($otpPath); @@ -96,7 +96,7 @@ switch ($do) { $ui->assign('notify', 'Failed to register'); $ui->assign('notify_t', 'd'); run_hook('view_otp_register'); #HOOK - $ui->display('register-rotp.tpl'); + $ui->display('user-ui/register-rotp.tpl'); } } else { $ui->assign('username', $username); @@ -106,12 +106,12 @@ switch ($do) { $ui->assign('phonenumber', $phonenumber); $ui->assign('notify', $msg); $ui->assign('notify_t', 'd'); - $ui->display('register.tpl'); + $ui->display('user-ui/register.tpl'); } break; default: - if (!empty($config['sms_url'])) { + if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { $username = _post('username'); if (!empty($username)) { $d = ORM::for_table('tbl_customers')->where('username', $username)->find_one(); @@ -128,7 +128,7 @@ switch ($do) { $ui->assign('username', $username); $ui->assign('notify', 'Please wait ' . (600 - (time() - filemtime($otpPath))) . ' seconds before sending another SMS'); $ui->assign('notify_t', 'd'); - $ui->display('register-otp.tpl'); + $ui->display('user-ui/register-otp.tpl'); } else { $otp = rand(100000, 999999); file_put_contents($otpPath, $otp); @@ -136,11 +136,11 @@ switch ($do) { $ui->assign('username', $username); $ui->assign('notify', 'Verification code has been sent to your phone'); $ui->assign('notify_t', 's'); - $ui->display('register-otp.tpl'); + $ui->display('user-ui/register-otp.tpl'); } } else { run_hook('view_otp_register'); #HOOK - $ui->display('register-rotp.tpl'); + $ui->display('user-ui/register-rotp.tpl'); } } else { $ui->assign('username', ""); @@ -149,7 +149,7 @@ switch ($do) { $ui->assign('email', ""); $ui->assign('otp', false); run_hook('view_register'); #HOOK - $ui->display('register.tpl'); + $ui->display('user-ui/register.tpl'); } break; } diff --git a/system/controllers/voucher.php b/system/controllers/voucher.php index d4b1ddc7..c04795b8 100644 --- a/system/controllers/voucher.php +++ b/system/controllers/voucher.php @@ -17,7 +17,7 @@ switch ($action) { case 'activation': run_hook('view_activate_voucher'); #HOOK $ui->assign('code', alphanumeric(_get('code'), "-_.,")); - $ui->display('user-activation.tpl'); + $ui->display('user-ui/activation.tpl'); break; case 'activation-post': @@ -46,7 +46,7 @@ switch ($action) { $ui->assign('d', $d); run_hook('customer_view_activation_list'); #HOOK - $ui->display('user-activation-list.tpl'); + $ui->display('user-ui/activation-list.tpl'); break; case 'invoice': @@ -58,7 +58,7 @@ switch ($action) { } if ($in) { Package::createInvoice($in); - $ui->display('invoice-customer.tpl'); + $ui->display('user-ui/invoice-customer.tpl'); } else { r2(U . 'voucher/list-activated', 'e', Lang::T('Not Found')); } diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 146a62b1..018cb787 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -626,7 +626,7 @@

- +

- {Lang::T('OTP is required when user want to change phone number')} + {Lang::T('OTP is required when user want to change phone number and registration')}

@@ -654,6 +654,20 @@

{Lang::T('The method which OTP will be sent to user')}

+
+ +
+ +
+

+ {Lang::T('OTP is required when user want to change Email Address')} +

+
diff --git a/ui/ui/bandwidth.tpl b/ui/ui/bandwidth.tpl index 0647747e..e4dcf0c4 100644 --- a/ui/ui/bandwidth.tpl +++ b/ui/ui/bandwidth.tpl @@ -31,7 +31,7 @@ {Lang::T('Bandwidth Name')} {Lang::T('Rate')} - {Lang::T('Burst')} + Burst {Lang::T('Manage')} @@ -57,7 +57,7 @@
{include file="pagination.tpl"}
-

{Lang::T('Create Bandwitdh Plan for expired Internet Plan')}

+

{Lang::T('Create Bandwidth Plan for expired Internet Plan')}

{Lang::T('When customer expired, you can move it to Expired Internet Plan')}

@@ -66,4 +66,4 @@ -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/dbstatus.tpl b/ui/ui/dbstatus.tpl index 235a8f0e..0ea24212 100644 --- a/ui/ui/dbstatus.tpl +++ b/ui/ui/dbstatus.tpl @@ -3,7 +3,7 @@
-
Backup Database
+
{Lang::T('Backup Database')}
@@ -27,7 +27,7 @@
-
Dont select logs if it failed
+
{Lang::T('Dont select logs if it failed')}
- +
diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl index b1106a82..c596ab2a 100644 --- a/ui/ui/hotspot-add.tpl +++ b/ui/ui/hotspot-add.tpl @@ -13,8 +13,8 @@ data-content="Customer cannot buy disabled Plan, but admin can recharge it, use it if you want only admin recharge it">?
- Enable - Disable + {Lang::T('Enable')} + {Lang::T('Disable')}
@@ -247,4 +247,4 @@ {/literal} {/if} -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/hotspot.tpl b/ui/ui/hotspot.tpl index 3181c6d7..b1d65a9e 100644 --- a/ui/ui/hotspot.tpl +++ b/ui/ui/hotspot.tpl @@ -174,12 +174,12 @@
-{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/page-edit.tpl b/ui/ui/page-edit.tpl index fdd49287..9d0153fb 100644 --- a/ui/ui/page-edit.tpl +++ b/ui/ui/page-edit.tpl @@ -29,7 +29,7 @@ {/if}
-

{Lang::T("Sometimes you need to refresh 3 times until content change")}

+

{Lang::T('Sometimes you need to refresh 3 times until content change')}

@@ -41,11 +41,11 @@ {if $PageFile=='Voucher'} {/if} @@ -80,4 +80,4 @@ {/literal} -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/reports.tpl b/ui/ui/reports.tpl index 234d715e..fbc88bc0 100644 --- a/ui/ui/reports.tpl +++ b/ui/ui/reports.tpl @@ -137,8 +137,8 @@ {include file="pagination.tpl"}
-

Information

-

Export and Print will show all data without pagination.

+

{Lang::T('Information')}

+

{Lang::T('Export and Print will show all data without pagination')}.

@@ -265,4 +265,4 @@ {/literal} -{include file="sections/footer.tpl"} \ No newline at end of file +{include file="sections/footer.tpl"} diff --git a/ui/ui/404.tpl b/ui/ui/user-ui/404.tpl similarity index 77% rename from ui/ui/404.tpl rename to ui/ui/user-ui/404.tpl index 0e8c674e..4d975e4c 100644 --- a/ui/ui/404.tpl +++ b/ui/ui/user-ui/404.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -7,4 +7,4 @@
-{include file="sections/user-footer.tpl"} +{include file="user-ui/footer.tpl"} diff --git a/ui/ui/user-activation-list.tpl b/ui/ui/user-ui/activation-list.tpl similarity index 96% rename from ui/ui/user-activation-list.tpl rename to ui/ui/user-ui/activation-list.tpl index 11513f14..5a0fe1ca 100644 --- a/ui/ui/user-activation-list.tpl +++ b/ui/ui/user-ui/activation-list.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -41,4 +41,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-activation.tpl b/ui/ui/user-ui/activation.tpl similarity index 95% rename from ui/ui/user-activation.tpl rename to ui/ui/user-ui/activation.tpl index 87698b44..238a97c9 100644 --- a/ui/ui/user-activation.tpl +++ b/ui/ui/user-ui/activation.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -38,4 +38,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-change-password.tpl b/ui/ui/user-ui/change-password.tpl similarity index 95% rename from ui/ui/user-change-password.tpl rename to ui/ui/user-ui/change-password.tpl index 6094354e..60a252cc 100644 --- a/ui/ui/user-change-password.tpl +++ b/ui/ui/user-ui/change-password.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -40,4 +40,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-ui/dashboard.tpl similarity index 99% rename from ui/ui/user-dashboard.tpl rename to ui/ui/user-ui/dashboard.tpl index 1fdc44c8..82d5e9f1 100644 --- a/ui/ui/user-dashboard.tpl +++ b/ui/ui/user-ui/dashboard.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -398,4 +398,4 @@ document.write(''); {/if} -{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-ui/email-update.tpl b/ui/ui/user-ui/email-update.tpl new file mode 100644 index 00000000..e79a3e34 --- /dev/null +++ b/ui/ui/user-ui/email-update.tpl @@ -0,0 +1,79 @@ +{include file="user-ui/header.tpl"} + + + +
+
+

{Lang::T('Change Email Address')}

+
+
+
+
+ +
+
+ + + +
+
+
+
+
+ +
+
+ + + + + + +
+
+
+ +
+ +
+ +
+ +
+
+ + + + +
+ + Or {Lang::T('Cancel')} +
+ + + +
+
+
+{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/sections/user-footer.tpl b/ui/ui/user-ui/footer.tpl similarity index 100% rename from ui/ui/sections/user-footer.tpl rename to ui/ui/user-ui/footer.tpl diff --git a/ui/ui/sections/user-header.tpl b/ui/ui/user-ui/header.tpl similarity index 100% rename from ui/ui/sections/user-header.tpl rename to ui/ui/user-ui/header.tpl diff --git a/ui/ui/user-inbox.tpl b/ui/ui/user-ui/inbox.tpl similarity index 98% rename from ui/ui/user-inbox.tpl rename to ui/ui/user-ui/inbox.tpl index a9fd9e95..89210942 100644 --- a/ui/ui/user-inbox.tpl +++ b/ui/ui/user-ui/inbox.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"} {if $tipe == 'view'}
@@ -110,4 +110,4 @@ {/if} -{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-ui/index.html b/ui/ui/user-ui/index.html new file mode 100644 index 00000000..97579708 --- /dev/null +++ b/ui/ui/user-ui/index.html @@ -0,0 +1,8 @@ + + + 403 Forbidden + + +

Directory access is forbidden.

+ + \ No newline at end of file diff --git a/ui/ui/invoice-customer.tpl b/ui/ui/user-ui/invoice-customer.tpl similarity index 91% rename from ui/ui/invoice-customer.tpl rename to ui/ui/user-ui/invoice-customer.tpl index 8b369d06..171f4900 100644 --- a/ui/ui/invoice-customer.tpl +++ b/ui/ui/user-ui/invoice-customer.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -18,4 +18,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-login-noreg.tpl b/ui/ui/user-ui/login-noreg.tpl similarity index 100% rename from ui/ui/user-login-noreg.tpl rename to ui/ui/user-ui/login-noreg.tpl diff --git a/ui/ui/user-login.tpl b/ui/ui/user-ui/login.tpl similarity index 100% rename from ui/ui/user-login.tpl rename to ui/ui/user-ui/login.tpl diff --git a/ui/ui/user-orderBalance.tpl b/ui/ui/user-ui/orderBalance.tpl similarity index 95% rename from ui/ui/user-orderBalance.tpl rename to ui/ui/user-ui/orderBalance.tpl index 91b97aa7..d7f5edc9 100644 --- a/ui/ui/user-orderBalance.tpl +++ b/ui/ui/user-ui/orderBalance.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -34,4 +34,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-orderHistory.tpl b/ui/ui/user-ui/orderHistory.tpl similarity index 97% rename from ui/ui/user-orderHistory.tpl rename to ui/ui/user-ui/orderHistory.tpl index 03aa2379..3f60a74c 100644 --- a/ui/ui/user-orderHistory.tpl +++ b/ui/ui/user-ui/orderHistory.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -53,4 +53,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-orderPlan.tpl b/ui/ui/user-ui/orderPlan.tpl similarity index 99% rename from ui/ui/user-orderPlan.tpl rename to ui/ui/user-ui/orderPlan.tpl index 191c945c..74dda812 100644 --- a/ui/ui/user-orderPlan.tpl +++ b/ui/ui/user-ui/orderPlan.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -421,4 +421,4 @@ {/foreach}
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-orderView.tpl b/ui/ui/user-ui/orderView.tpl similarity index 99% rename from ui/ui/user-orderView.tpl rename to ui/ui/user-ui/orderView.tpl index f1de1117..6f62ad76 100644 --- a/ui/ui/user-orderView.tpl +++ b/ui/ui/user-ui/orderView.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -150,4 +150,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-pages.tpl b/ui/ui/user-ui/pages.tpl similarity index 79% rename from ui/ui/user-pages.tpl rename to ui/ui/user-ui/pages.tpl index f4fdf2bd..5372858b 100644 --- a/ui/ui/user-pages.tpl +++ b/ui/ui/user-ui/pages.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -12,4 +12,4 @@
-{include file="sections/user-footer.tpl"} +{include file="user-ui/footer.tpl"} diff --git a/ui/ui/user-phone-update.tpl b/ui/ui/user-ui/phone-update.tpl similarity index 94% rename from ui/ui/user-phone-update.tpl rename to ui/ui/user-ui/phone-update.tpl index 1553842c..12cfa75e 100644 --- a/ui/ui/user-phone-update.tpl +++ b/ui/ui/user-ui/phone-update.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"} @@ -14,7 +14,7 @@
+ + value="{$_user['phonenumber']}" readonly placeholder="{Lang::T('Phone Number')}">
@@ -77,4 +77,4 @@ -{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-profile.tpl b/ui/ui/user-ui/profile.tpl similarity index 67% rename from ui/ui/user-profile.tpl rename to ui/ui/user-ui/profile.tpl index 78c1477d..e63402b5 100644 --- a/ui/ui/user-profile.tpl +++ b/ui/ui/user-ui/profile.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
@@ -8,14 +8,14 @@
- +
+
@@ -24,14 +24,14 @@
+ value="{$_user['fullname']}">
- +
{if $_c['allow_phone_otp'] != 'yes'} @@ -41,7 +41,7 @@
+
@@ -53,7 +53,7 @@
+
{/if} -
- -
- + + {if $_c['allow_email_otp'] != 'yes'} +
+ +
+ +
-
+ {else} +
+ {/if}
@@ -84,4 +102,4 @@
-{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/register-otp.tpl b/ui/ui/user-ui/register-otp.tpl similarity index 100% rename from ui/ui/register-otp.tpl rename to ui/ui/user-ui/register-otp.tpl diff --git a/ui/ui/register-rotp.tpl b/ui/ui/user-ui/register-rotp.tpl similarity index 100% rename from ui/ui/register-rotp.tpl rename to ui/ui/user-ui/register-rotp.tpl diff --git a/ui/ui/register.tpl b/ui/ui/user-ui/register.tpl similarity index 100% rename from ui/ui/register.tpl rename to ui/ui/user-ui/register.tpl diff --git a/ui/ui/user-selectGateway.tpl b/ui/ui/user-ui/selectGateway.tpl similarity index 97% rename from ui/ui/user-selectGateway.tpl rename to ui/ui/user-ui/selectGateway.tpl index 701bf1a8..621fdb24 100644 --- a/ui/ui/user-selectGateway.tpl +++ b/ui/ui/user-ui/selectGateway.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
{if file_exists("$PAGES_PATH/Payment_Info.html")} @@ -35,7 +35,7 @@ {if $plan['is_radius'] or $plan['routers']}
  • {Lang::T('Location')} {if - $plan['is_radius']}Radius{else}{$plan['routers']} + $plan['is_radius']}Radius{else}{$plan['routers']} {/if}
  • {/if} @@ -121,4 +121,4 @@
    -{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="user-ui/footer.tpl"} \ No newline at end of file diff --git a/ui/ui/user-sendPlan.tpl b/ui/ui/user-ui/sendPlan.tpl similarity index 97% rename from ui/ui/user-sendPlan.tpl rename to ui/ui/user-ui/sendPlan.tpl index fb3ac4e3..c756a0f3 100644 --- a/ui/ui/user-sendPlan.tpl +++ b/ui/ui/user-ui/sendPlan.tpl @@ -1,4 +1,4 @@ -{include file="sections/user-header.tpl"} +{include file="user-ui/header.tpl"}
    @@ -64,4 +64,4 @@
    -{include file="sections/user-footer.tpl"} \ No newline at end of file +{include file="suser-ui/footer.tpl"} \ No newline at end of file diff --git a/version.json b/version.json index 9ffbb96d..9bd82d26 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.8.17" + "version": "2024.8.19" } \ No newline at end of file