Provider login
This commit is contained in:
+9
-1
@@ -6,6 +6,14 @@ use CodeIgniter\Config\BaseConfig;
|
|||||||
|
|
||||||
class App extends 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
|
* Base Site URL
|
||||||
@@ -16,7 +24,7 @@ class App extends BaseConfig
|
|||||||
*
|
*
|
||||||
* E.g., http://example.com/
|
* 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.
|
* 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->post('login', 'Login::StartLogin');
|
||||||
$routes->get('login', 'Login::HomeLogin');
|
$routes->get('login', 'Login::HomeLogin');
|
||||||
|
$routes->get('logout', 'Login::StartLogin');
|
||||||
|
|
||||||
$routes->get('register', 'Login::RegisterAccount');
|
$routes->get('register', 'Login::RegisterAccount');
|
||||||
$routes->get('register/resetpass', 'Login::RegisterAccount');
|
$routes->get('register/resetpass', 'Login::RegisterAccount');
|
||||||
$routes->post('/register/startacc', 'Login::RegisterAccount');
|
$routes->post('/register/startacc', 'Login::RegisterAccount');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$routes->get('providers', 'Provider::StartProviders');
|
||||||
|
|||||||
@@ -93,4 +93,6 @@ abstract class BaseController extends Controller
|
|||||||
|
|
||||||
return $loginReturn;
|
return $loginReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ class CoreController extends Controller
|
|||||||
parent::initController($request, $response, $logger);
|
parent::initController($request, $response, $logger);
|
||||||
|
|
||||||
// you dont have bussines here if you are not in session
|
// 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'] )) {
|
// if (!isset($_SESSION['session_id']) or ! isset($_SESSION['practice_id']) or !isset( $_SESSION['user_id'] )) {
|
||||||
redirect('logout');
|
// redirect('logout');
|
||||||
}
|
// }
|
||||||
// Preload any models, libraries, etc, here.
|
// Preload any models, libraries, etc, here.
|
||||||
|
|
||||||
// E.g.: $this->session = \Config\Services::session();
|
// E.g.: $this->session = \Config\Services::session();
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ MERM Providers Login
|
|||||||
*/
|
*/
|
||||||
class Login extends BaseController {
|
class Login extends BaseController {
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
// parent::__construct();
|
||||||
|
// $this->load->helper(array('form', 'url'));
|
||||||
|
// $this->load->library('form_validation');
|
||||||
|
}
|
||||||
public function HomeLogin(){
|
public function HomeLogin(){
|
||||||
$data = array();
|
$data = array();
|
||||||
return $this->renderExternalPage('welcome_message', $data);
|
return $this->renderExternalPage('welcome_message', $data);
|
||||||
@@ -15,6 +20,13 @@ class Login extends BaseController {
|
|||||||
$data = array();
|
$data = array();
|
||||||
$data['username'] = $data['pass'] = $data['error_message']='';
|
$data['username'] = $data['pass'] = $data['error_message']='';
|
||||||
//$this->request->getPost();
|
//$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();
|
$data = array();
|
||||||
|
|||||||
@@ -1,25 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
namespace App\Controllers;
|
||||||
use App\Controllers\BaseController;
|
//use App\Controllers\BaseController;
|
||||||
|
|
||||||
//class Provider extends Provider_Controller {
|
//class Provider extends Provider_Controller {
|
||||||
class Provider extends SecureBaseController
|
class Provider extends SecureBaseController
|
||||||
{
|
{
|
||||||
//var $patient_model;
|
//var $patient_model;
|
||||||
public function index() {
|
public function StartProviders() {
|
||||||
$data = array();
|
$data = array();
|
||||||
$out = array();
|
// $out = array();
|
||||||
$this->load->model('patient_model');
|
// $this->load->model('patient_model');
|
||||||
$out = $this->patient_model->getPatientList();
|
// $out = $this->patient_model->getPatientList();
|
||||||
$data["patient_list"] = $out["patient_list"];
|
// $data["patient_list"] = $out["patient_list"];
|
||||||
$_SESSION['patient_count'] = 5;
|
// $_SESSION['patient_count'] = 5;
|
||||||
$this->load->model('encounter_model');
|
// $this->load->model('encounter_model');
|
||||||
$out = $this->encounter_model->getEncounterList();
|
// $out = $this->encounter_model->getEncounterList();
|
||||||
$data["encounter_list"] = $out["encounter_list"];
|
// $data["encounter_list"] = $out["encounter_list"];
|
||||||
$this->renderProviderSecurePage('dash', $data);
|
return $this->renderProviderSecurePage('dash', $data);
|
||||||
|
// return view('template/provider_page');
|
||||||
// print_r($_SESSION);
|
// print_r($_SESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function alerts() {
|
public function alerts() {
|
||||||
$data = array();
|
$data = array();
|
||||||
$out = 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 {
|
protected function renderExternalPage($page_name, $data):string {
|
||||||
return view('template/header', $data).
|
return view('template/header', $data).
|
||||||
view('' . $page_name, $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="col-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">Password*</label>
|
<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>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|||||||
Reference in New Issue
Block a user