From d71eb37f48864665ea7cdd50af4ad56018ef215c Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 1 Sep 2023 09:16:40 +0700 Subject: [PATCH] add Cancel Button in user dashboard --- system/autoload/Lang.php | 6 +++++- ui/ui/user-dashboard.tpl | 23 +++++++++++++++++------ ui/ui/user-login.tpl | 4 ++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/system/autoload/Lang.php b/system/autoload/Lang.php index 5d9b707a..de8dca4c 100644 --- a/system/autoload/Lang.php +++ b/system/autoload/Lang.php @@ -39,7 +39,11 @@ class Lang public static function dateTimeFormat($date){ global $config; - return date($config['date_format']. ' H:i', strtotime($date)); + if(strtotime($date) < strtotime("2000-01-01 00:00:00")){ + return ""; + }else{ + return date($config['date_format']. ' H:i', strtotime($date)); + } } public static function dateAndTimeFormat($date, $time){ diff --git a/ui/ui/user-dashboard.tpl b/ui/ui/user-dashboard.tpl index 4a7f413d..b78db300 100644 --- a/ui/ui/user-dashboard.tpl +++ b/ui/ui/user-dashboard.tpl @@ -12,8 +12,7 @@ {Lang::T('expired')} - {date({$_c['date_format']}, strtotime($unpaid['expired_date']))} - {date('H:i', strtotime($unpaid['expired_date']))} + {Lang::dateTimeFormat($unpaid['expired_date'])} {$_L['Plan_Name']} @@ -30,10 +29,22 @@ {/if} diff --git a/ui/ui/user-login.tpl b/ui/ui/user-login.tpl index 3a5a4d29..5d5ea4de 100644 --- a/ui/ui/user-login.tpl +++ b/ui/ui/user-login.tpl @@ -70,10 +70,10 @@
- + {$_L['Register']}
- {$_L['Register']} +