From 42d12474560eacb06644d4b6e8effb3e155a0ea9 Mon Sep 17 00:00:00 2001 From: Olusesan Amaeye Date: Tue, 31 Dec 2019 17:45:42 -0500 Subject: [PATCH] fix --- wwwjuba/application/controllers/Auth.php | 138 ++-- wwwjuba/application/controllers/Startwww.php | 3 +- .../application/views/home/view_register.php | 139 ++++ .../views/home/view_reset_password.php | 117 +++ .../application/views/members/view_email.php | 689 +++++++++++++++++- .../application/views/templ/member_footer.php | 5 + .../application/views/templ/member_header.php | 1 + 7 files changed, 1020 insertions(+), 72 deletions(-) create mode 100644 wwwjuba/application/views/home/view_register.php create mode 100644 wwwjuba/application/views/home/view_reset_password.php diff --git a/wwwjuba/application/controllers/Auth.php b/wwwjuba/application/controllers/Auth.php index 6ef74ec..207b8ea 100644 --- a/wwwjuba/application/controllers/Auth.php +++ b/wwwjuba/application/controllers/Auth.php @@ -4,85 +4,81 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Auth extends Start_Controller { - public function index() { - - - $data = array(); - $username=''; - $password=''; - $error_message=''; - $valid_entry=false; - $valid_login=false; - $this->testLoginInput($username, $password, $error_message, $valid_entry); - - if ( true == $valid_entry ) - { - if ($username!='' && $password !=''){ - $data["page_title"] = ""; - $data["username"] = $username; //"auxsupport"; - $data["password"] = $password; - $out = []; - $this->jubabox_webapi(USER_LOGIN, $data, $out); - //print_r( $data ); - //print_r( $out ); - if ( count($out) > 0 && isset($out["session"]) ){ - print_r( $out ); - //$this->getSessionData($out[0], $session_data); // just for testing - - $this->buildUserSession(PHP_API_OK,$out); - $valid_login = true; - $this->session->set_flashdata('in',$out); - redirect("page/index"); - } - else - { - $error_message ="Invalid Username/Password"; - } - } - } - - - + $data = array(); + $username = ''; + $password = ''; + $error_message = ''; + $valid_entry = false; + $valid_login = false; + $this->testLoginInput($username, $password, $error_message, $valid_entry); + + if (true == $valid_entry) { + if ($username != '' && $password != '') { + + $data["page_title"] = ""; + $data["username"] = $username; //"auxsupport"; + $data["password"] = $password; + $out = []; + $this->jubabox_webapi(USER_LOGIN, $data, $out); + //print_r( $data ); + //print_r( $out ); + if (count($out) > 0 && isset($out["session"])) { + print_r($out); + //$this->getSessionData($out[0], $session_data); // just for testing + + $this->buildUserSession(PHP_API_OK, $out); + $valid_login = true; + $this->session->set_flashdata('in', $out); + redirect("page/index"); + } else { + $error_message = "Invalid Username/Password"; + } + } + } + + + $this->load->view('home/view_login'); } - /* -.916 SQL [12418]: Found rows: 0 -- 18:20:16.916 SQL [12418]: Found rows: 0 -- 18:20:16.916 INFO [12418]: RET: added=2019-10-10 10:43:55.26967 -- 18:20:16.916 INFO [12418]: RET: created= -- 18:20:16.916 INFO [12418]: RET: email=ameye@chiefsoft.com -- 18:20:16.916 INFO [12418]: RET: firstname=Olu -- 18:20:16.916 INFO [12418]: RET: id= -- 18:20:16.916 INFO [12418]: RET: last_login=2019-10-10 17:55:23.835444 -- 18:20:16.916 INFO [12418]: RET: lastname=Amey -- 18:20:16.916 INFO [12418]: RET: loc= -- 18:20:16.916 INFO [12418]: RET: member_id=1 -- 18:20:16.916 INFO [12418]: RET: member_profile_id= -- 18:20:16.916 INFO [12418]: RET: mypage=oluamey -- 18:20:16.916 INFO [12418]: RET: password=8ef852e9c900de50c6e9d004f3463686 -- 18:20:16.916 INFO [12418]: RET: phone= -- 18:20:16.916 INFO [12418]: RET: result=ECHO BACKEND -- 18:20:16.916 INFO [12418]: RET: session=2AB29AC8698D9F9F7EBCB28A1FE41568 -- 18:20:16.916 INFO [12418]: RET: sessionid=2AB29AC8698D9F9F7EBCB28A1FE41568 -- 18:20:16.916 INFO [12418]: RET: status=1 -- 18:20:16.916 INFO [12418]: RET: stauts=OK -- 18:20:16.916 INFO [12418]: RET: updated= -- 18:20:16.916 INFO [12418]: RET: username=ameye@chiefsoft.com -- 18:20:16.918 INFO [12418]: JUBABOX is stopping... -- 18:20:16.918 DEBUG [12418]: Closing database connection -- 18:20:16.918 SQL [12418]: pgsql_close() -*/ - + /* + .916 SQL [12418]: Found rows: 0 + - 18:20:16.916 SQL [12418]: Found rows: 0 + - 18:20:16.916 INFO [12418]: RET: added=2019-10-10 10:43:55.26967 + - 18:20:16.916 INFO [12418]: RET: created= + - 18:20:16.916 INFO [12418]: RET: email=ameye@chiefsoft.com + - 18:20:16.916 INFO [12418]: RET: firstname=Olu + - 18:20:16.916 INFO [12418]: RET: id= + - 18:20:16.916 INFO [12418]: RET: last_login=2019-10-10 17:55:23.835444 + - 18:20:16.916 INFO [12418]: RET: lastname=Amey + - 18:20:16.916 INFO [12418]: RET: loc= + - 18:20:16.916 INFO [12418]: RET: member_id=1 + - 18:20:16.916 INFO [12418]: RET: member_profile_id= + - 18:20:16.916 INFO [12418]: RET: mypage=oluamey + - 18:20:16.916 INFO [12418]: RET: password=8ef852e9c900de50c6e9d004f3463686 + - 18:20:16.916 INFO [12418]: RET: phone= + - 18:20:16.916 INFO [12418]: RET: result=ECHO BACKEND + - 18:20:16.916 INFO [12418]: RET: session=2AB29AC8698D9F9F7EBCB28A1FE41568 + - 18:20:16.916 INFO [12418]: RET: sessionid=2AB29AC8698D9F9F7EBCB28A1FE41568 + - 18:20:16.916 INFO [12418]: RET: status=1 + - 18:20:16.916 INFO [12418]: RET: stauts=OK + - 18:20:16.916 INFO [12418]: RET: updated= + - 18:20:16.916 INFO [12418]: RET: username=ameye@chiefsoft.com + - 18:20:16.918 INFO [12418]: JUBABOX is stopping... + - 18:20:16.918 DEBUG [12418]: Closing database connection + - 18:20:16.918 SQL [12418]: pgsql_close() + */ + public function forgotpass() { - $this->index(); + //$this->index(); + $this->load->view('home/view_reset_password'); } public function register() { - $this->index(); + $this->registerAccount(); } public function logout() { @@ -93,4 +89,8 @@ class Auth extends Start_Controller { $this->index(); } + + private function registerAccount(){ + $this->load->view('home/view_register'); + } } diff --git a/wwwjuba/application/controllers/Startwww.php b/wwwjuba/application/controllers/Startwww.php index 5af9ee6..a5a080f 100644 --- a/wwwjuba/application/controllers/Startwww.php +++ b/wwwjuba/application/controllers/Startwww.php @@ -2,7 +2,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - class Startwww extends CI_Controller { /** @@ -21,7 +20,7 @@ class Startwww extends CI_Controller { * @see https://codeigniter.com/user_guide/general/urls.html */ public function index() { - // echo "lslslsls"; + // echo "lslslsls"; $this->load->view('home/view_home'); } diff --git a/wwwjuba/application/views/home/view_register.php b/wwwjuba/application/views/home/view_register.php new file mode 100644 index 0000000..cde4c3d --- /dev/null +++ b/wwwjuba/application/views/home/view_register.php @@ -0,0 +1,139 @@ + + + + + + + + + + + + Register Page - Vuexy - Bootstrap HTML admin template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ branding logo +
+
+
+
+
+

Create Account

+
+
+

Fill the below form to create a new account.

+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + + + + + + I accept the terms & conditions. +
+
+
+
+ Login +
+
+
+
+
+
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wwwjuba/application/views/home/view_reset_password.php b/wwwjuba/application/views/home/view_reset_password.php new file mode 100644 index 0000000..92a73d2 --- /dev/null +++ b/wwwjuba/application/views/home/view_reset_password.php @@ -0,0 +1,117 @@ + + + + + + + + + + + + Forgot Password - Vuexy - Bootstrap HTML admin template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ branding logo +
+
+
+
+
+

Recover your password

+
+
+

Please enter your email address and we'll send you instructions on how to reset your password.

+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wwwjuba/application/views/members/view_email.php b/wwwjuba/application/views/members/view_email.php index 148e3b3..7aa6088 100644 --- a/wwwjuba/application/views/members/view_email.php +++ b/wwwjuba/application/views/members/view_email.php @@ -1 +1,688 @@ -Email \ No newline at end of file + +
+ +
+
+
+
+
+
+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/wwwjuba/application/views/templ/member_footer.php b/wwwjuba/application/views/templ/member_footer.php index 20abb63..2f9aab4 100644 --- a/wwwjuba/application/views/templ/member_footer.php +++ b/wwwjuba/application/views/templ/member_footer.php @@ -50,6 +50,11 @@ + + + + + diff --git a/wwwjuba/application/views/templ/member_header.php b/wwwjuba/application/views/templ/member_header.php index b6d7eae..f862174 100644 --- a/wwwjuba/application/views/templ/member_header.php +++ b/wwwjuba/application/views/templ/member_header.php @@ -48,6 +48,7 @@ +