From 16199b4c18a2f62bb095e6d3f83bf17ef7506834 Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:59:42 +0100 Subject: [PATCH] Patch Update fix moon custom login page logo not showing after upload add registration now allowed in demo mode, add warning when registration is disabled --- system/controllers/login.php | 2 +- system/controllers/register.php | 7 ++- system/controllers/settings.php | 2 +- system/lan/english.json | 78 ++++++++++++++++++++++++++++++++- 4 files changed, 85 insertions(+), 4 deletions(-) diff --git a/system/controllers/login.php b/system/controllers/login.php index 2ffe9772..af3f22e8 100644 --- a/system/controllers/login.php +++ b/system/controllers/login.php @@ -314,7 +314,7 @@ switch ($do) { $ui->display('customer/login-noreg.tpl'); } else { $UPLOAD_URL_PATH = str_replace($root_path, '', $UPLOAD_PATH); - $login_logo = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.default.png'; + $login_logo = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.default.png'; $ui->assign('login_logo', $login_logo); $wallpaper = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.png')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.default.png'; $ui->assign('wallpaper', $wallpaper); diff --git a/system/controllers/register.php b/system/controllers/register.php index 923274a1..5e76451a 100644 --- a/system/controllers/register.php +++ b/system/controllers/register.php @@ -4,7 +4,12 @@ * PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/) * by https://t.me/ibnux **/ - +if ($_app_stage != 'Live') { + _alert(Lang::T('You do not have permission to access this page in demo mode'), 'danger', "login"); +} +if ($_c['disable_registration'] == 'noreg') { + _alert(Lang::T('Registration Disabled'), 'danger', "login"); +} if (isset($routes['1'])) { $do = $routes['1']; } else { diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 90981885..dec46fa7 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -82,7 +82,7 @@ switch ($action) { } $ui->assign('logo', $logo); - $login_logo = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.default.png'; + $login_logo = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'login-logo.default.png'; $ui->assign('login_logo', $login_logo); $wallpaper = (file_exists($UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.png')) ? $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.png' : $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'wallpaper.default.png'; $ui->assign('wallpaper', $wallpaper); diff --git a/system/lan/english.json b/system/lan/english.json index a66fe769..608483a2 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -885,5 +885,81 @@ "Enable_CSRF_Validation": "Enable CSRF Validation", "Cross_site_request_forgery": "Cross-site request forgery", "Validity_Periode": "Validity Periode", - "Insufficient_balance": "Insufficient balance" + "Insufficient_balance": "Insufficient balance", + "Customer_Login_Page_Settings": "Customer Login Page Settings", + "Choose_Template": "Choose Template", + "Select_your_login_template_type": "Select your login template type", + "Select_Login_Page": "Select Login Page", + "Select_your_preferred_login_template": "Select your preferred login template", + "Page_Heading___Company_Name": "Page Heading \/ Company Name", + "This_Name_will_be_shown_on_the_login_wallpaper": "This Name will be shown on the login wallpaper", + "Page_Description": "Page Description", + "This_will_also_display_on_wallpaper__You_can_use_html_tag": "This will also display on wallpaper, You can use html tag", + "Favicon": "Favicon", + "Best_size_30_x_30___uploaded_image_will_be_autosize": "Best size 30 x 30 | uploaded image will be autosize", + "Login_Page_Logo": "Login Page Logo", + "Best_size_300_x_60___uploaded_image_will_be_autosize": "Best size 300 x 60 | uploaded image will be autosize", + "Login_Page_Wallpaper": "Login Page Wallpaper", + "Best_size_1920_x_1080___uploaded_image_will_be_autosize": "Best size 1920 x 1080 | uploaded image will be autosize", + "Single_Admin_Session": "Single Admin Session", + "Expired_Cronjob_Every_5_Minutes__Recommended_": "Expired Cronjob Every 5 Minutes [Recommended]", + "Login_Page_Settings_Saved_Successfully": "Login Page Settings Saved Successfully", + "Sign_in_into_your_account": "Sign in into your account", + "Don_t_have_an_account_": "Don't have an account?", + "You_do_not_have_permission_to_access_this_page_demo_mode": "You do not have permission to access this page demo mode", + "You_do_not_have_permission_to_access_this_page_in_demo_mode": "You do not have permission to access this page in demo mode", + "Registration_Disabled": "Registration Disabled", + "First_Name": "First Name", + "Last_Name": "Last Name", + "Generate_Cards": "Generate Cards", + "Print_All": "Print All", + "Card_PIN": "Card PIN", + "Card_Price": "Card Price", + "Card_Status": "Card Status", + "Card_Serial_No": "Card Serial No", + "Used_By": "Used By", + "Used": "Used", + "Not_Used": "Not Used", + "Delete_Selected": "Delete Selected", + "Print_Selected": "Print Selected", + "Generate_Settings": "Generate Settings", + "Enable_Recharge": "Enable Recharge", + "Recharge_Notification": "Recharge Notification", + "Enable_Message": "Enable Message", + "Both": "Both", + "will_replace_customer_login_code": "will replace customer login code", + "will_replace_customer_package_name": "will replace customer package name", + "will_replace_customer_package_expiry_date": "will replace customer package expiry date", + "will_replace_your_Company_Name": "will replace your Company Name", + "Recharge_Send_Template": "Recharge Send Template", + "will_replace_recharge_code": "will replace recharge code", + "will_replace_recharge_data_limit": "will replace recharge data limit", + "will_replace_recharge_validity_or_duration": "will replace recharge validity or duration", + "Recharge_Cards_Print_Template": "Recharge Cards Print Template", + "will_replace_recharge_currency_code": "will replace recharge currency code", + "will_replace_recharge_plan_price": "will replace recharge plan price", + "will_replace_recharge_with_recharge_login_url": "will replace recharge with recharge login url", + "will_replace_recharge_QRcode": "will replace recharge QRcode", + "Locked_Out_Customers": "Locked Out Customers", + "Failed_Attempts": "Failed Attempts", + "Last_Attempt": "Last Attempt", + "Locked_Until": "Locked Until", + "Unlock": "Unlock", + "No_of_Cards": "No of Cards", + "PIN_Length": "PIN Length", + "Card_Value": "Card Value", + "Print_Now": "Print Now", + "Send_Card_PIN": "Send Card PIN", + "Phone_No": "Phone No", + "Enter_the_receiver_phone_number": "Enter the receiver phone number", + "Send_Now": "Send Now", + "Tax": "Tax", + "Enter_the_Card_PIN": "Enter the Card PIN", + "Redeem_Recharge_Card": "Redeem Recharge Card", + "Hotspot_256111777771_have_successfully_recharged_100_00": "Hotspot 256111777771 have successfully recharged 100.00", + "Recharge_successful__Your_new_balance_is_100": "Recharge successful! Your new balance is 100", + "Recharge_successful__Your_new_balance_is_200": "Recharge successful! Your new balance is 200", + "1_cards_generated_successfully_": "1 cards generated successfully.", + "Hotspot_256111777771_have_successfully_recharged_1000_00": "Hotspot 256111777771 have successfully recharged 1000.00", + "Recharge_successful__Your_new_balance_is_1200": "Recharge successful! Your new balance is 1200" } \ No newline at end of file