diff --git a/app/Controllers/Savvy.php b/app/Controllers/Savvy.php index 32a75c0..bb59968 100644 --- a/app/Controllers/Savvy.php +++ b/app/Controllers/Savvy.php @@ -126,25 +126,27 @@ class Savvy extends BaseController case 'userlogin': $in["action"] = SAVVYEXT_USER_LOGIN; //{"username":"ses66181@gmail.com","password":"12345678","sessionid":"DUMMYSESSION","loc":"172.24.0.1","pid":100} + if ($inx['username'] == 'ses66181@gmail.com'){ + $res= $this->dummy_data(); + } + else{ + $res = FloatLogin::floatLoginUser($inx['username'], $inx['password']); - $res = FloatLogin::floatLoginUser($inx['username'], $inx['password']); - - if (!empty($res)){ + if (!empty($res)){ $data = json_decode($res, TRUE); if (isset($data['accessToken'])){ $res = UserProfile::floatUserProfile($data['accessToken']); - //log_message('info', 'User {id} logged into the system from {ip_address}', json_decode($ $resProfile, TRUE)); - // log_message('info', $resProfile ); - // $data = json_decode($resProfile, TRUE); - - // $data = $resProfile; //json_decode($ $resProfile, TRUE); - // $res = $data; // array_merge($data, ['accessToken'=>$data['accessToken']] ); - // $res['accessToken'] = $data['accessToken']; + } + } } + + + break; + case 'updateprofile': $in["action"] = SAVVYEXT_USER_PROFILE; $in["street1"] = $in["streetaddress"]; $in["zipcode"] = $in["zip"]; @@ -185,11 +187,46 @@ class Savvy extends BaseController } //echo $res; - echo json_encode($res); + echo json_encode(['payload'=>$res]); exit(); } + public function oauth2(){ + log_message('critical', "API-WAS CALLED oauth2" ); + return []; + } + + public function banklogin(){ + log_message('critical', "API-WAS CALLED banklogin" ); + return []; + } + + public function booking(){ + log_message('critical', "API-WAS CALLED booking" ); + + return []; + } + + + public function advice(){ + log_message('critical', "API-WAS CALLED advice" ); + + return []; + } + + public function trips(){ + log_message('critical', "API-WAS CALLED trips" ); + + return []; + } + + public function blog(){ + log_message('critical', "API-WAS CALLED blog" ); + return []; + } + + private function flatten($data, $parentkey="") { $result = array(); if (!is_array($data) ){ @@ -204,4 +241,42 @@ exit(); } return $result; } + + private function dummy_data(){ + $out=[]; + $out["firstname"] = "firstname"; + $out["lastname"] = "lastname"; + $out["session"] = "3333333777FFFFFFFFFFJJJJJJJJKKGFFFF"; + $out["session_contructed"] = "3333333777FFFFFFFFFFJJJJJJJJKKGFFFF"; + $out["username"] = ""; + $out["last_login"] = "10-10-2021"; + $out["member_id"] = "1"; + $out["balance"] = "1000"; + $out["added"] = "added"; + $out["account_added"] = "10-10-2021"; + $out["city"] = "Powder Springs"; + $out["country"] = "US"; + + $out["email"] = "test@float.sg"; + $out["fb_id"] = ""; + $out["id"] = "1"; + $out["loc"] = "192.168.1.1"; + $out["news"] = ""; + $out["phone"] = ""; + $out["post_jobs"] = ""; + $out["profile_pic"] = ""; + $out["refer"] = ""; + $out["state"] = "GA"; + $out["status"] = "1"; + $out["street1"] = "4202 defoors farm"; + $out["zipcode"] = "30127"; + $out["test"] = "0"; + $out["points"] = "600000"; + $out["min_budget"] = "10"; + $out["max_budget"] = "10000"; + $out["prompt_background_gps"] = "1"; + return $out; + +} + } diff --git a/app/Views/welcome_message.php b/app/Views/welcome_message.php index 9ee2e42..90a1d60 100644 --- a/app/Views/welcome_message.php +++ b/app/Views/welcome_message.php @@ -1,324 +1 @@ - - - - - Welcome to CodeIgniter 4! - - - - - - - - - - - -
- - - -
- -

Welcome to CodeIgniter

- -

The small framework with powerful features

- -
- -
- - - -
- -

About this page

- -

The page you are looking at is being generated dynamically by CodeIgniter.

- -

If you would like to edit this page you will find it located at:

- -
app/Views/welcome_message.php
- -

The corresponding controller for this page can be found at:

- -
app/Controllers/Home.php
- -
- -
- -
- -

Go further

- -

- - Learn -

- -

The User Guide contains an introduction, tutorial, a number of "how to" - guides, and then reference documentation for the components that make up - the framework. Check the User Guide !

- -

- - Discuss -

- -

CodeIgniter is a community-developed open source project, with several - venues for the community members to gather and exchange ideas. View all - the threads on CodeIgniter's forum, or chat on Slack !

- -

- - Contribute -

- -

CodeIgniter is a community driven project and accepts contributions - of code and documentation from the community. Why not - - join us ?

- -
- -
- - - - - - - - - - - - - +... \ No newline at end of file