diff --git a/app/Config/Filters.php b/app/Config/Filters.php index c7264e7..6b2d020 100644 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -61,7 +61,7 @@ class Filters extends BaseFilters 'after' => [ 'pagecache', // Web Page Caching 'performance', // Performance Metrics - //'toolbar', // Debug Toolbar + 'toolbar', // Debug Toolbar ], ]; diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 60ec1ac..67e60bd 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -16,7 +16,7 @@ $routes->get('/', 'Home::index'); $routes->match(['get','post'],'/login', 'Auth::login', ['filter' => 'guest']); $routes->get('/logout', 'Auth::logout'); - +$routes->get('result/(:any)', 'Result::show/$1'); // ------------------------------------------------------Page Based on Role------------------------------------------------------ // $routes->group('admin', ['filter' => 'role:1'], function($routes) { $routes->get('/', 'Admin::index'); diff --git a/app/Controllers/Admin.php b/app/Controllers/Admin.php index d2b7af8..55d0b36 100644 --- a/app/Controllers/Admin.php +++ b/app/Controllers/Admin.php @@ -70,6 +70,7 @@ class Admin extends BaseController 'ishardcopy'=> $row['ODR_NFLAGHARDCOPY'] ?? 0, 'isval' => $row['ISVAL'] ?? 0, 'isdelete' => $isDelete, + 'val' => $row['VAL'] ?? 0, ]; } diff --git a/app/Controllers/Auth.php b/app/Controllers/Auth.php index 1ebd7ed..9ce77c2 100644 --- a/app/Controllers/Auth.php +++ b/app/Controllers/Auth.php @@ -2,17 +2,11 @@ namespace App\Controllers; -class Auth extends BaseController -{ - public function login() - { - +class Auth extends BaseController { + public function login() { if ($this->request->getMethod() === 'GET') { - return view('login'); - } else if ($this->request->getMethod() === 'POST') { - helper(['form', 'url']); $session = session(); $db = \Config\Database::connect(); @@ -49,8 +43,7 @@ class Auth extends BaseController } - public function logout() - { + public function logout() { session()->destroy(); return redirect()->to('/login'); } diff --git a/app/Controllers/Result.php b/app/Controllers/Result.php new file mode 100644 index 0000000..2d6d2f3 --- /dev/null +++ b/app/Controllers/Result.php @@ -0,0 +1,16 @@ +query("SELECT STATS FROM GDC_CMOD.dbo.V_DASHBOARD_DEV WHERE SP_ACCESSNUMBER='$accessnumber'") + ->getResultArray(); + $data['status'] = $result[0]['STATS']; + return view('result/show',$data); + } + +} diff --git a/app/Views/_layouts/main.php b/app/Views/_layouts/main.php index 0af7345..2b0865d 100644 --- a/app/Views/_layouts/main.php +++ b/app/Views/_layouts/main.php @@ -136,7 +136,7 @@ renderSection('content'); ?> diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 63fdb8c..3d965f1 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -10,7 +10,7 @@
Dashboard
- Hi, User + Hi,