From 55ce7ecaa9f291a145f5013358726e5626cb6c51 Mon Sep 17 00:00:00 2001 From: bim-g Date: Sun, 14 Nov 2021 00:24:07 +0200 Subject: [PATCH 1/2] [FIX] resolve host server address --- config/global.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/global.php b/config/global.php index cc5c9d9..9c25da3 100644 --- a/config/global.php +++ b/config/global.php @@ -30,4 +30,4 @@ //define default domain - define("APP_DOMAIN",$_SERVER['http_domain']); \ No newline at end of file + define("APP_DOMAIN",$_SERVER['HTTP_HOST']); \ No newline at end of file From 75571213eb8944f12b4d276f7ff236f45c47305a Mon Sep 17 00:00:00 2001 From: bim-g Date: Sun, 14 Nov 2021 03:24:01 +0200 Subject: [PATCH 2/2] [FIX] remove unused function module --- controller/function.php | 53 ----------------------------------------- controller/homeCtrl.php | 7 ++---- index.php | 1 - src/class/Home.php | 12 ---------- 4 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 controller/function.php delete mode 100644 src/class/Home.php diff --git a/controller/function.php b/controller/function.php deleted file mode 100644 index 9b9e70b..0000000 --- a/controller/function.php +++ /dev/null @@ -1,53 +0,0 @@ -5){ - $time = strtotime($timepost); - $time = date("d/m/Y", $time); - }else{ - if($hr > 23 && $day<5){ - $time=$day."j"; - } - else{ - if($hr>0 && $hr<24){ - $time=$hr."h"; - }else{ - if($min>0 && $min<60){ - $time=$min."min"; - }else{ - $time=$sec."s"; - } - } - } - } - return $time; - } - - function getMonth(string $format, int $month){ - $myMonth=["fr"=>['Janvier','Février','Mars','Avril','Maie','Juin','Juillet','Aôut','Septembre','Octobre','Novembre','Decembre'] - //you can add your format for according to the language - ]; - return $myMonth[$format][$month]; - } - function getDay(string $format,int $day){ - $myDay=[ - "fr"=> ['Dimanche', 'Lundi', 'mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] - //you can add your format for according to the language - ]; - return $myDay[$format][$day]; - } \ No newline at end of file diff --git a/controller/homeCtrl.php b/controller/homeCtrl.php index 0bea293..d738d14 100644 --- a/controller/homeCtrl.php +++ b/controller/homeCtrl.php @@ -1,12 +1,9 @@ h= new Home(); } function home(){ - $v=new View('index'); - $v->assign("result",$this->h->welcom()); - } + new View('index'); + } } \ No newline at end of file diff --git a/index.php b/index.php index 3a6de57..4b1a49f 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ \ No newline at end of file diff --git a/src/class/Home.php b/src/class/Home.php deleted file mode 100644 index c8f8721..0000000 --- a/src/class/Home.php +++ /dev/null @@ -1,12 +0,0 @@ -db= DB::getInstance(); - } - function welcom(){ - $req=$this->db->get("users")->result(); - return $req; - // return "welcom to home class methode"; - } - } \ No newline at end of file