From 013ee3b48075184bb2c0a36af92e37bbc7674d65 Mon Sep 17 00:00:00 2001 From: Olusesan Ameye Date: Sun, 26 Jul 2020 12:39:11 -0400 Subject: [PATCH] fix --- wwwadmin/application/controllers/Welcome.php | 2 +- wwwadmin/application/core/COR_Controller.php | 28 +-- .../admin_template/view_admin_header.php | 160 +----------------- 3 files changed, 20 insertions(+), 170 deletions(-) diff --git a/wwwadmin/application/controllers/Welcome.php b/wwwadmin/application/controllers/Welcome.php index 88753a1..1875bd7 100644 --- a/wwwadmin/application/controllers/Welcome.php +++ b/wwwadmin/application/controllers/Welcome.php @@ -33,7 +33,7 @@ class Welcome extends Bko_Controller { //var_dump($out); if ($ret == PHP_API_OK) { $this->buildUserSession($ret, $out); - redirect('dash'); + redirect('start'); } else { $data['action_message'] = $this->formatedMesage('ERROR', 'Invalid Username/Password'); } diff --git a/wwwadmin/application/core/COR_Controller.php b/wwwadmin/application/core/COR_Controller.php index f6832dd..0bfe4d6 100644 --- a/wwwadmin/application/core/COR_Controller.php +++ b/wwwadmin/application/core/COR_Controller.php @@ -68,12 +68,12 @@ class COR_Controller extends CI_Controller { } protected function savvy_api($in, &$out) { - global $savvyext; + global $coregrade; $ret = -1; $in['pid'] = 115; $in['backoffice'] = 1; error_log(json_encode($in)); - $out = $savvyext->savvyext_api($in); + $out = $coregrade->coregrade_api($in); $ret = $out["retval"]; error_log("ret = $ret"); error_log(json_encode($out)); @@ -81,12 +81,12 @@ class COR_Controller extends CI_Controller { } protected function main_api_post($endpoint,$payload) { - global $savvyext; + global $coregrade; - $httpAuthToken = $savvyext->cfgReadChar('system.oauth2_token'); - $encryptionAlg = $savvyext->cfgReadChar('encryption.algorithm'); - $encryptionKey = $savvyext->cfgReadChar('encryption.key'); - $encryptionIV = $savvyext->cfgReadChar('encryption.iv'); + $httpAuthToken = $coregrade->cfgReadChar('system.oauth2_token'); + $encryptionAlg = $coregrade->cfgReadChar('encryption.algorithm'); + $encryptionKey = $coregrade->cfgReadChar('encryption.key'); + $encryptionIV = $coregrade->cfgReadChar('encryption.iv'); $encrypted_payload = bin2hex( openssl_encrypt( @@ -97,7 +97,7 @@ class COR_Controller extends CI_Controller { $encryptionIV )); $postdata = "{\"encrypted_payload\": \"${encrypted_payload}\"}"; - $url = $savvyext->cfgReadChar('system.api_url').$endpoint; + $url = $coregrade->cfgReadChar('system.api_url').$endpoint; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); @@ -133,14 +133,14 @@ class COR_Controller extends CI_Controller { } protected function main_api_get($endpoint,$payload) { - global $savvyext; + global $coregrade; - $httpAuthToken = $savvyext->cfgReadChar('system.oauth2_token'); - $encryptionAlg = $savvyext->cfgReadChar('encryption.algorithm'); - $encryptionKey = $savvyext->cfgReadChar('encryption.key'); - $encryptionIV = $savvyext->cfgReadChar('encryption.iv'); + $httpAuthToken = $coregrade->cfgReadChar('system.oauth2_token'); + $encryptionAlg = $coregrade->cfgReadChar('encryption.algorithm'); + $encryptionKey = $coregrade->cfgReadChar('encryption.key'); + $encryptionIV = $coregrade->cfgReadChar('encryption.iv'); - $url = $savvyext->cfgReadChar('system.api_url').$endpoint.$payload; + $url = $coregrade->cfgReadChar('system.api_url').$endpoint.$payload; //echo $url; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); diff --git a/wwwadmin/application/views/admin_template/view_admin_header.php b/wwwadmin/application/views/admin_template/view_admin_header.php index 7ad3281..83d8ff0 100644 --- a/wwwadmin/application/views/admin_template/view_admin_header.php +++ b/wwwadmin/application/views/admin_template/view_admin_header.php @@ -135,176 +135,26 @@