Provider login
This commit is contained in:
+9
-1
@@ -6,6 +6,14 @@ use CodeIgniter\Config\BaseConfig;
|
||||
|
||||
class App extends BaseConfig
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === 0 ? 'http://' : 'http://';
|
||||
$this->baseURL = $protocol.$_SERVER['HTTP_HOST'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Base Site URL
|
||||
@@ -16,7 +24,7 @@ class App extends BaseConfig
|
||||
*
|
||||
* E.g., http://example.com/
|
||||
*/
|
||||
public string $baseURL = 'http://localhost:8080/';
|
||||
public string $baseURL = 'http://localhost:63101/';
|
||||
|
||||
/**
|
||||
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
|
||||
|
||||
@@ -9,8 +9,12 @@ $routes->get('/', 'Home::index');
|
||||
|
||||
$routes->post('login', 'Login::StartLogin');
|
||||
$routes->get('login', 'Login::HomeLogin');
|
||||
$routes->get('logout', 'Login::StartLogin');
|
||||
|
||||
$routes->get('register', 'Login::RegisterAccount');
|
||||
$routes->get('register/resetpass', 'Login::RegisterAccount');
|
||||
$routes->post('/register/startacc', 'Login::RegisterAccount');
|
||||
|
||||
|
||||
|
||||
$routes->get('providers', 'Provider::StartProviders');
|
||||
|
||||
@@ -93,4 +93,6 @@ abstract class BaseController extends Controller
|
||||
|
||||
return $loginReturn;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ class CoreController extends Controller
|
||||
parent::initController($request, $response, $logger);
|
||||
|
||||
// you dont have bussines here if you are not in session
|
||||
if (!isset($_SESSION['session_id']) or ! isset($_SESSION['practice_id']) or !isset( $_SESSION['user_id'] )) {
|
||||
redirect('logout');
|
||||
}
|
||||
// if (!isset($_SESSION['session_id']) or ! isset($_SESSION['practice_id']) or !isset( $_SESSION['user_id'] )) {
|
||||
// redirect('logout');
|
||||
// }
|
||||
// Preload any models, libraries, etc, here.
|
||||
|
||||
// E.g.: $this->session = \Config\Services::session();
|
||||
|
||||
@@ -6,6 +6,11 @@ MERM Providers Login
|
||||
*/
|
||||
class Login extends BaseController {
|
||||
|
||||
public function __construct() {
|
||||
// parent::__construct();
|
||||
// $this->load->helper(array('form', 'url'));
|
||||
// $this->load->library('form_validation');
|
||||
}
|
||||
public function HomeLogin(){
|
||||
$data = array();
|
||||
return $this->renderExternalPage('welcome_message', $data);
|
||||
@@ -15,6 +20,13 @@ class Login extends BaseController {
|
||||
$data = array();
|
||||
$data['username'] = $data['pass'] = $data['error_message']='';
|
||||
//$this->request->getPost();
|
||||
// Get input from form
|
||||
$username = $this->request->getVar('username');
|
||||
$password = $this->request->getVar('mermspassword');
|
||||
|
||||
if ($username == 'ameye@chiefsoft.com' && $password=='Awori.Awori'){
|
||||
return redirect()->to('providers');
|
||||
}
|
||||
|
||||
|
||||
$data = array();
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
namespace App\Controllers;
|
||||
//use App\Controllers\BaseController;
|
||||
|
||||
//class Provider extends Provider_Controller {
|
||||
class Provider extends SecureBaseController
|
||||
{
|
||||
//var $patient_model;
|
||||
public function index() {
|
||||
public function StartProviders() {
|
||||
$data = array();
|
||||
$out = array();
|
||||
$this->load->model('patient_model');
|
||||
$out = $this->patient_model->getPatientList();
|
||||
$data["patient_list"] = $out["patient_list"];
|
||||
$_SESSION['patient_count'] = 5;
|
||||
$this->load->model('encounter_model');
|
||||
$out = $this->encounter_model->getEncounterList();
|
||||
$data["encounter_list"] = $out["encounter_list"];
|
||||
$this->renderProviderSecurePage('dash', $data);
|
||||
// $out = array();
|
||||
// $this->load->model('patient_model');
|
||||
// $out = $this->patient_model->getPatientList();
|
||||
// $data["patient_list"] = $out["patient_list"];
|
||||
// $_SESSION['patient_count'] = 5;
|
||||
// $this->load->model('encounter_model');
|
||||
// $out = $this->encounter_model->getEncounterList();
|
||||
// $data["encounter_list"] = $out["encounter_list"];
|
||||
return $this->renderProviderSecurePage('dash', $data);
|
||||
// return view('template/provider_page');
|
||||
// print_r($_SESSION);
|
||||
}
|
||||
|
||||
|
||||
public function alerts() {
|
||||
$data = array();
|
||||
$out = array();
|
||||
|
||||
@@ -34,7 +34,21 @@ abstract class SecureBaseController extends CoreController
|
||||
|
||||
}
|
||||
|
||||
protected function renderProviderSecurePage($page_name, $data):string {
|
||||
|
||||
// you dont have bussines here if you are not in session
|
||||
/* if (!isset($_SESSION['session_id']) or ! isset($_SESSION['username']) or $_SESSION['username'] == '') {
|
||||
// redirect(logout);
|
||||
return redirect()->to('/logout');
|
||||
}
|
||||
*/
|
||||
// echo 'ameye 001';
|
||||
// return view('template/provider_page');
|
||||
|
||||
return view('template/provider_header', $data).
|
||||
view('provider/' . $page_name, $data).
|
||||
view('template/provider_footer', $data);
|
||||
}
|
||||
protected function renderExternalPage($page_name, $data):string {
|
||||
return view('template/header', $data).
|
||||
view('' . $page_name, $data).
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
ameye
|
||||
|
||||
Join Fox News for access to this content
|
||||
You have reached your maximum number of articles. Log in or create an account FREE of charge to continue reading.
|
||||
@@ -64,7 +64,7 @@ if (!isset($facility_text) || $facility_text == '') {
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label">Password*</label>
|
||||
<input type="password" maxlength="15" class="form-control" name='pass' value='' placeholder="Password" />
|
||||
<input type="password" maxlength="15" class="form-control" name='mermspassword' value='' placeholder="Password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
||||
Reference in New Issue
Block a user