fix
This commit is contained in:
@@ -8,8 +8,10 @@ class Dash extends Admin_Controller {
|
||||
|
||||
$this->load->helper('url');
|
||||
$data = array();
|
||||
$this->load->model('Dash_model');
|
||||
$data = $this->Dash_model->dashData();
|
||||
|
||||
$data = $this->dashData();
|
||||
// $data = $this->dashData();
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
@@ -39,34 +41,29 @@ class Dash extends Admin_Controller {
|
||||
$this->table->set_heading(array('data' => 'Process', 'style' => 'width:50px'), 'Resend Email', 'Status', 'Practice Name', 'Username', 'Email', array('data' => 'Date Added', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
|
||||
|
||||
$this->renderAdminPage('view_dash', $data);
|
||||
}
|
||||
|
||||
private function dashData() {
|
||||
$data = [];
|
||||
$data["new_patient"] = $this->db->query("SELECT id FROM members WHERE acc_link IS NULL AND status = 1")->num_rows();
|
||||
$data["establish_pateint"] = $this->db->query(" SELECT id FROM members WHERE acc_link IS NOT NULL AND status = 1")->num_rows();
|
||||
$data['deleted_users'] = $this->db->query(" SELECT id FROM members WHERE status <> 1")->num_rows();
|
||||
$data["new_patient_percent"] = ceil(100 * $data["establish_pateint"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
$data["establish_pateint_percent"] = ceil(100 * $data["new_patient"] / ($data["establish_pateint"] + $data["new_patient"]));
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function pendingpractice() {
|
||||
|
||||
$case_statement = "(CASE WHEN status=1 THEN 'Pending' WHEN status=0 THEN 'Deleted' WHEN status=3 THEN 'Deleted' WHEN status=5 THEN 'Acive' ELSE 'Unknown' END)";
|
||||
$data = array();
|
||||
$data["page_title"] = "Pending Practice";
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
echo $mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"approvePractice('||id||');\">Process</button>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" onclick=\"resendEmail('||id||');\">Email</button>' AS semail,
|
||||
$case_statement AS status,
|
||||
practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 200";
|
||||
$data['pending_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
$this->load->model('Practice_model');
|
||||
$query = $this->Practice_model->getPendingPractice();
|
||||
$this->table->set_heading(array('data' => 'Process', 'style' => 'width:50px'), 'Resend Email', 'Status', 'Practice Name', 'Username', 'Email', array('data' => 'Date Added', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
$this->renderAdminPage('view_pendingpractice', $data);
|
||||
}
|
||||
|
||||
public function practice() {
|
||||
$data = array();
|
||||
$data["page_title"] = "Practice";
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$this->load->model('Practice_model');
|
||||
$query = $this->Practice_model->getPractice();
|
||||
$this->table->set_heading(array('data' => 'Process', 'style' => 'width:50px'), 'Resend Email', 'Status', 'Practice Name', 'Username', 'Email', array('data' => 'Date Added', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
$this->renderAdminPage('view_pendingpractice', $data);
|
||||
|
||||
@@ -4,52 +4,48 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Practice extends Admin_Controller {
|
||||
|
||||
|
||||
|
||||
public function index() {
|
||||
|
||||
$this->load->helper('url');
|
||||
$data = array();
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
$data['recent_members'] = "";
|
||||
$mysql = "SELECT id,username,firstname,lastname,added::date,loc,last_login,acc_link FROM members ORDER by id DESC LIMIT 15";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['recent_members'] = $this->table->generate($query);
|
||||
$data['recent_members'] = "";
|
||||
$mysql = "SELECT id,username,firstname,lastname,added::date,loc,last_login,acc_link FROM members ORDER by id DESC LIMIT 15";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['recent_members'] = $this->table->generate($query);
|
||||
|
||||
|
||||
$mysql="SELECT '<button type=\"button\" class=\"btn btn-primary\">View</button>' AS View,name,username,email,added,last_login from practice ORDER BY id DESC LIMIT 7";
|
||||
$data['recent_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['recent_practice'] = $this->table->generate($query);
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-primary\">View</button>' AS View,name,username,email,added,last_login from practice ORDER BY id DESC LIMIT 7";
|
||||
$data['recent_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['recent_practice'] = $this->table->generate($query);
|
||||
|
||||
$mysql="SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"selectPendingPractice('||id||');\"><i class=\"fa fa-check-circle\"></i></button>' AS process,
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"selectPendingPractice('||id||');\"><i class=\"fa fa-check-circle\"></i></button>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" onclick=\"resendEmail('||id||');\"><i class=\"fa fa-bars\"></i></button>' AS semail,
|
||||
status,
|
||||
practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 7";
|
||||
$data['pending_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
$data['pending_practice'] = "";
|
||||
$query = $this->db->query($mysql);
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['pending_practice'] = $this->table->generate($query);
|
||||
|
||||
|
||||
$this->renderAdminPage('view_dash', $data);
|
||||
|
||||
$this->renderAdminPage('view_dash', $data);
|
||||
}
|
||||
|
||||
|
||||
public function pendingpractice(){
|
||||
public function pendingpractice() {
|
||||
|
||||
$data = array();
|
||||
$data["page_title"] = "Pending Practice";
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql="SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"approvePractice('||id||');\">Approve</button>' AS process,
|
||||
$mysql = "SELECT '<button type=\"button\" class=\"btn btn-warning\" onclick=\"approvePractice('||id||');\">Approve</button>' AS process,
|
||||
'<button type=\"button\" class=\"btn btn-danger\" onclick=\"resendEmail('||id||');\">Email</button>' AS semail,
|
||||
status,
|
||||
practice_name,username,email,added::date from practice_pending ORDER BY id DESC LIMIT 20";
|
||||
@@ -60,7 +56,7 @@ class Practice extends Admin_Controller {
|
||||
$this->renderAdminPage('view_pendingpractice', $data);
|
||||
}
|
||||
|
||||
public function pendingusers(){
|
||||
public function pendingusers() {
|
||||
$data = array();
|
||||
$data["page_title"] = "Pending Members";
|
||||
$this->load->library('table');
|
||||
@@ -71,29 +67,35 @@ class Practice extends Admin_Controller {
|
||||
//$this->table->set_heading( array('data' => 'ID', 'style' => 'width:50px'),'Email', 'Firstname', 'Lastname','Last Login','Location', array('data' => 'ACTION', 'style' => 'width:40px'), array('data' => 'Select', 'style' => 'width:40px'));
|
||||
$data['recent_members'] = $this->table->generate($query);
|
||||
$this->renderAdminPage('view_pendingusers', $data);
|
||||
|
||||
}
|
||||
|
||||
public function resendEmail() {
|
||||
|
||||
$data['pending_practice_id'] = trim($this->input->get('pending_practice_id'));
|
||||
|
||||
echo "Sending ".$data['pending_practice_id'];
|
||||
|
||||
// return false;
|
||||
echo "Sending " . $data['pending_practice_id'];
|
||||
|
||||
// return false;
|
||||
}
|
||||
|
||||
public function viewPendingPractice() {
|
||||
|
||||
$data = array();
|
||||
$data['pending_practice_id'] = $this->uri->segment(3);
|
||||
$data['page_title'] = "Pending Practice - ".$data['pending_practice_id'];
|
||||
|
||||
$mysql = "SELECT * FROM practice_pending WHERE id = ".$data['pending_practice_id'];
|
||||
$data = array();
|
||||
$data['pending_practice_id'] = $this->uri->segment(3);
|
||||
$data['page_title'] = "Pending Practice - " . $data['pending_practice_id'];
|
||||
|
||||
$mysql = "SELECT * FROM practice_pending WHERE id = " . $data['pending_practice_id'];
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$this->renderPracticePage('view_pending_practice', $data);
|
||||
}
|
||||
|
||||
public function selectPendingPractice() {
|
||||
$data = [];
|
||||
$pending_practice_id = $data['pending_practice_id'] = trim($this->input->get('pending_practice_id'));
|
||||
$this->load->model('Practice_model');
|
||||
$data = $this->Practice_model->loadPendingPractice($pending_practice_id);
|
||||
$this->load->view('practice/parts/view_pending.php', $data);
|
||||
}
|
||||
|
||||
protected function renderPracticePage($page_name, $data) {
|
||||
@@ -101,10 +103,11 @@ class Practice extends Admin_Controller {
|
||||
$this->load->view('practice/' . $page_name, $data);
|
||||
$this->load->view('template/secure_footer', $data);
|
||||
}
|
||||
|
||||
protected function renderAdminPage($page_name, $data) {
|
||||
$this->load->view('template/secure_header', $data);
|
||||
$this->load->view('admin/' . $page_name, $data);
|
||||
$this->load->view('template/secure_footer', $data);
|
||||
$this->load->view('template/secure_header', $data);
|
||||
$this->load->view('admin/' . $page_name, $data);
|
||||
$this->load->view('template/secure_footer', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,4 +26,19 @@ class Practice_model extends CI_Model {
|
||||
return $query = $this->db->query($mysql);
|
||||
}
|
||||
|
||||
/*
|
||||
mermsemr_dev=> SELECT * FROM practice_pending WHERE id = 1 AND status = 1;
|
||||
id | firstname | lastname | practice_name | email | username | password | status | added | loc
|
||||
----+-----------+----------+---------------+---------------------+----------+----------+--------+----------------------------+-----------
|
||||
1 | Olu | Amey | Testing | works@chiefsoft.com | ses66181 | | 1 | 2020-12-19 10:40:57.740114 | 10.0.0.15
|
||||
(1 row)
|
||||
*/
|
||||
|
||||
public function loadPendingPractice($pending_practice_id) {
|
||||
$data = [];
|
||||
$mysql = "SELECT * FROM practice_pending WHERE id = $pending_practice_id AND status = 1";
|
||||
$data = $this->db->query($mysql)->result_array();
|
||||
return $data[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
}
|
||||
|
||||
function selectPendingPractice(pending_practice_id) {
|
||||
// alert(pending_practice_id);
|
||||
alert(pending_practice_id);
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
// $('#acc' + pending_practice_id).prop('disabled', true);
|
||||
|
||||
@@ -1,37 +1,43 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xxl-6 m-b-30">
|
||||
<div class="row">
|
||||
<div class="col-xxl-6 m-b-30">
|
||||
|
||||
<div class="card card-statistics h-100 mb-0">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<?=$pending_practice?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-statistics h-100 mb-0">
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<?= $pending_practice ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-6 m-b-30">
|
||||
<div class="card card-statistics h-100 mb-0 jobportal-contant">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">Details</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-6 m-b-30">
|
||||
<div class="card card-statistics h-100 mb-0 jobportal-contant">
|
||||
|
||||
<div id="transp_detail">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">Details</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- end row -->
|
||||
|
||||
<?php include 'dash_scripts.php' ?>
|
||||
@@ -1,7 +1,11 @@
|
||||
<?
|
||||
$read_level = " readonly "
|
||||
?>
|
||||
|
||||
<div class="card card-statistics">
|
||||
<div class="card-header">
|
||||
<div class="card-heading">
|
||||
<h4 class="card-title">Simple Form</h4>
|
||||
<h4 class="card-title">Practice Name : <?=$practice_name?></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -9,50 +13,39 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="fname">First name</label>
|
||||
<div class="mb-2">
|
||||
<input type="text" class="form-control" id="fname" name="fname" placeholder="First name" />
|
||||
<input type="text" class="form-control" id="fname" name="firstname" value="<?=$lastname?>" placeholder="First name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="lname">Last name</label>
|
||||
<div class="mb-2">
|
||||
<input type="text" class="form-control" id="lname" name="lname" placeholder="Last name" />
|
||||
<input type="text" class="form-control" id="lname" name="lastname" value="<?=$lastname?>" placeholder="Last name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="uname">Username</label>
|
||||
<div class="mb-2">
|
||||
<input type="text" class="form-control" id="uname" name="uname" placeholder="Username" />
|
||||
<input type="text" class="form-control" id="uname" name="username" value="<?=$username?>" <?=$read_level?> placeholder="Username" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="uemail">Email</label>
|
||||
<div class="mb-2">
|
||||
<input type="text" class="form-control" id="uemail" name="uemail" placeholder="Email" />
|
||||
<input type="text" class="form-control" id="uemail" name="email" value="<?=$email?>" <?=$read_level?> placeholder="Email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="upassword">Password</label>
|
||||
<label class="control-label" for="upassword">Date Added</label>
|
||||
<div class="mb-2">
|
||||
<input type="password" class="form-control" id="upassword" name="upassword" placeholder="Password" />
|
||||
<input type="text" class="form-control" id="upassword" name="added" value="<?=$added?>" <?=$read_level?> placeholder="added" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="uconfirm_password">Confirm password</label>
|
||||
<div class="mb-2">
|
||||
<input type="password" class="form-control" id="uconfirm_password" name="uconfirm_password" placeholder="Confirm password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="uagree" name="uagree">
|
||||
<label class="form-check-label" for="uagree">
|
||||
Please agree to our policy
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary" name="signup" value="Sign up">Sign
|
||||
up</button>
|
||||
<button type="submit" class="btn btn-secondary" name="signup" value="Sign up">Update</button>
|
||||
<button type="submit" class="btn btn-danger" name="signup" value="Sign up">Reject</button>
|
||||
<button type="submit" class="btn btn-primary" name="signup" value="Sign up">Approve</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user