fix
This commit is contained in:
@@ -1,38 +1,64 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Auth extends CI_Controller {
|
||||
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"] = "may12002";
|
||||
$this->jubabox_webapi(USER_LOGIN, $data, $out);
|
||||
//print_r( $data );
|
||||
//print_r( $out );
|
||||
if ( count($out) > 0 && isset($out[0]) ){
|
||||
$this->getSessionData($out[0], $session_data); // just for testing
|
||||
|
||||
$this->buildUserSession(PHP_API_OK,$session_data);
|
||||
$valid_login = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error_message ="Invalid Username/Password";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->load->view('home/view_login');
|
||||
}
|
||||
|
||||
public function forgotpass() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
public function register() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
public function login() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
*
|
||||
* Maps to the following URL
|
||||
* http://example.com/index.php/welcome
|
||||
* - or -
|
||||
* http://example.com/index.php/welcome/index
|
||||
* - or -
|
||||
* Since this controller is set as the default controller in
|
||||
* config/routes.php, it's displayed at http://example.com/
|
||||
*
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see https://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('home/view_login');
|
||||
}
|
||||
|
||||
public function forgotpass(){
|
||||
$this->index();
|
||||
}
|
||||
public function register(){
|
||||
$this->index();
|
||||
}
|
||||
public function logout(){
|
||||
$this->index();
|
||||
}
|
||||
public function login(){
|
||||
$this->index();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user