Commit 678c40b5 by Jithin

initial scope project delivery

parent 677d5742
......@@ -88,7 +88,7 @@ $query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => '192.168.138.123',
'hostname' => '192.168.140.123',
'username' => 'root',
'password' => '',
'database' => 'reeba_ipok',
......
......@@ -9,6 +9,7 @@ class Home extends CI_Controller {
$this->load->model('Home_model');
$this->load->model('Patient_model');
$this->load->model('Doctor_model');
$this->load->model('Search_doctor_model');
$this->load->library('facebook'); // Load facebook library
}
......@@ -705,9 +706,15 @@ class Home extends CI_Controller {
public function error()
{
$template['page'] = "error_notauthorized";
//$this->load->view('error_notauthorized', $template);
if($this->uri->segment(3) and $this->uri->segment(3)=='url')
{
$template['page'] = "error_invalidurl";
}
$template['page_title'] = "Error";
$this->load->view('template/template', $template);
//$this->load->view('error_notauthorized', $template);
}
......@@ -833,16 +840,18 @@ public function redemptionrequest()
$get_account_balance = $this->Home_model->get_redemption_balance($userdata['id']);
$check_valid_bank = $this->Home_model->get_bank_valid($userdata['id'],$_POST['redemption_bank']);
//print_r($check_valid_bank);die();
$nowin_server = date("Y-m-d TH:i:s");
if($get_account_balance['reedem_earn']>=$_POST['redemption_amount'] and $check_valid_bank['count']==1)
{
$withdrawal_insert = array('bank_id' => $_POST['redemption_bank'], 'amount'=>$_POST['redemption_amount'], 'date'=>time(),'status'=>0,'doctor_id' =>$userdata['id']);
$withdrawal_insert = array('bank_id' => $_POST['redemption_bank'], 'amount'=>$_POST['redemption_amount'], 'date'=>time(),'status'=>0,'doctor_id' =>$userdata['id'],'previous_reedem_earn'=>$get_account_balance['reedem_earn']);
$this->Home_model->add_redemption_request($withdrawal_insert);
$res = array('status' => 'success','message' => 'Redemption Requested' );
}
elseif($get_account_balance['reedem_earn']<=$_POST['redemption_amount'] and $check_valid_bank['count']==1)
{
$withdrawal_insert = array('bank_id' => $_POST['redemption_bank'], 'amount'=>$_POST['redemption_amount'], 'date'=>time(),'status'=>3,'doctor_id' =>$userdata['id']);
$withdrawal_insert = array('bank_id' => $_POST['redemption_bank'], 'amount'=>$_POST['redemption_amount'], 'date'=>time(),'status'=>3,'doctor_id' =>$userdata['id'],'previous_reedem_earn'=>$get_account_balance['reedem_earn']);
$this->Home_model->add_redemption_request($withdrawal_insert);
$res = array('status' => 'error','message' => 'Error, Insufficient Balance' );
}
......@@ -862,6 +871,44 @@ public function redemptionrequest()
print json_encode($res);
}
public function test()
{
$test = push_sent();
print_r($test);
}
/*CRON JOBS FOR IPOK*/
public function cron_jobs()
{
/*FUNCTION FOR SENTING CONSULTATION REMINDER*/
$nowin_server = date("Y-m-d TH:i:s");
//print_r($nowin_server);die();
$todays_booking = $this->Home_model->get_todays_booking();
//echo "<pre>";
//print_r($todays_booking);
if(!empty($todays_booking))
{
foreach ($todays_booking as $key => $booking)
{
//print_r($booking['id']);die();
/*CODE FOR SENTING NOTIFICATION - PATIENT NOTIFICATION*/
/*------------------------------------------------*/
$booking_details = $this->Search_doctor_model->get_booking_details($booking['id']);
$doctor_data = $this->Doctor_model->get_single_doctor($booking_details['doctor_id']);
$text_pat = 'You have a scheduled appointment in the system today, at '.date('H:i a',$booking_details['time_start']).', doctor '.$doctor_data['dr_name'];
$notification_pat = array('patient_id' => $booking_details['patient_id'],'type'=>2,'message'=>$text_pat,'read_status'=>0,'time'=>strtotime($nowin_server),'booking_id' =>$booking['id']);
$this->Home_model->insert_notification_patient($notification_pat);
/*------------------------------------------------*/
}
}
}
}
......
......@@ -152,6 +152,100 @@ function send_mail($msg,$email,$sub)
$query = $CI->db->get();
return $query->result_array();
}
function get_notification($id,$type)
{
$CI = & get_instance();
if($type=="PATIENT")
{
$CI->db->select("id,
type,
CASE
WHEN type = '0' THEN 'New Booking'
WHEN type = '1' THEN 'Waiting List'
WHEN type = '2' THEN 'Consultation Reminder'
WHEN type = '3' THEN 'Consulation Canceled'
END as type_desc,
message,
read_status,
time");
$CI->db->from('tbl_patient_notification');
$CI->db->where('patient_id',$id);
}
elseif($type=="DOCTOR")
{
$CI->db->select("id,
type,
CASE
WHEN type = '0' THEN 'Redemption Made'
WHEN type = '1' THEN 'New Review'
WHEN type = '2' THEN 'New Consultation'
WHEN type = '3' THEN 'Added to new clinic'
END as type_desc,
message,
read_status,
time");
$CI->db->from('tbl_doctor_notifications');
$CI->db->where('doctor_id',$id);
}
$CI->db->limit(10);
$CI->db->order_by('time','DESC');
$query = $CI->db->get();
return $query->result_array();
}
function push_sent($fcm_data,$type)
{
$CI = & get_instance();
//print_r($fcm_data);die();
$data1 = "SELECT * FROM settings WHERE id = '0'";
$query1 = $CI->db->query($data1);
$rs = $query1->row();
$key = $rs->api_key;
//$key = 'AIzaSyCGDtxjM3gDFKNEvooXMQ9uGs8P5r7hYAE';
/* $data = "{ \"notification\": { \"title\": \"".$fcm_data['title']."\", \"text\": \"".$fcm_data['message']."\" , \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"id\" : \"".$fcm_data['id']."\"}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"".$fcm_token."\"}";*/
/* $data = "{ \"notification\": { \"title\": \"hi\", \"text\": \"hellonewmessage\" , \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"id\" : \"12\"}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"c7yemODrWAY:APA91bFqfFVJsydZrtSjwhD_c_2uBcm_N3XZvbOyiaX4O1mlDtAVbEo2XyRsKpoQ3ypvOZkCnJ9qsA9tcGKeHutItKrU2LhBZbpfgCNM0ZFxw5An6biIhuh0HOW_yfsd90YbUzEhnj7Y\"}";*/
//type 1 - Free Booking Confirmed
if($type == '1') //push for patient
{
$data = "{ \"notification\": { \"title\": \"".$fcm_data['type']."\", \"text\": \"".$fcm_data['message']."\" , \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"id\" : \"".$fcm_data['id']."\",\"type\" : \"".$fcm_data['type']."\",\"booking_id\" : \"".$fcm_data['booking_id']."\",\"booking_date\" : \"".$fcm_data['booking_date']."\",\"doctor_id\" : \"".$fcm_data['doctor_id']."\",\"doctor_name\" : \"".$fcm_data['doctor_name']."\",\"doctor_specialization\" : \"".$fcm_data['doctor_specialization']."\",\"message\" : \"".$fcm_data['message']."\",\"time\" : \"".$fcm_data['time']."\"}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"".$fcm_data['to']."\"}";
}
else if($type == '2') //push for doctor
{
$data = "{ \"notification\": { \"title\": \"".$fcm_data['type']."\", \"text\": \"".$fcm_data['message']."\" , \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"id\" : \"".$fcm_data['id']."\",\"type\" : \"".$fcm_data['type']."\",\"message\" : \"".$fcm_data['message']."\",\"read_status\" : \"".$fcm_data['read_status']."\"}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"".$fcm_data['to']."\"}";
}
$ch = curl_init("https://fcm.googleapis.com/fcm/send");
$header = array('Content-Type: application/json', 'Authorization: key='.$key);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS, "{ \"notification\": { \"title\": \"olakka title\", \"text\": \"Olakka message\" }, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"id\" : \"$request[id]\"}}} \"to\" : \"cAAoKqSKvgk:APA91bH-mvqwAp1JYW1oBZl_aheVDb7HOWx0YjXU6Wmmm-G_CB-60T2M6WKwsjPDMUfu47nCf1qi4a9SREiwRifAFBWszVTL8XA1y4_nb7ZiI9EmX7rpKsWogsrzqXSwKt56cd8sH5ox\"}");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// curl_close($ch);
$out = curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
//print(cpf_validator('111.444.777-35'));// return 1 if valid else no return
?>
\ No newline at end of file
......@@ -134,7 +134,7 @@ public function get_doctor_appointments_day($dctr_id,$list_day)
$this->db->where("tbl_booking.doctor_id",$dctr_id);
$this->db->where("tbl_booking.date",$today);
$this->db->where("tbl_booking.payment_status",1);
//$this->db->where("tbl_booking.booking_status",1);
$this->db->where("(tbl_booking.booking_status = '1' or tbl_booking.booking_status = '4')");
$this->db->order_by("tbl_booking.time_start", "asc");
$this->db->join('tbl_registration', 'tbl_registration.id = tbl_booking.patient_id','inner');
//$this->db->where("tbl_consultation.clinic_id",$clinicId);
......@@ -364,6 +364,9 @@ public function get_booking_details($book_id)
tbl_booking.date as book_date,
tbl_booking.time as book_time,
tbl_booking.total_sum as book_price,
tbl_booking.visit_type as visit_type,
tbl_booking.ipok_fee as ipok_fee,
tbl_booking.time_start as time_start,
tbl_registration.id as pat_id,
tbl_registration.name as pat_name,
tbl_booking.doctor_id as doc_id");
......@@ -632,11 +635,17 @@ function get_notifications($doctor_id,$page,$limit = null)
$limit = $page * 5;
}
$this->db->select('id,
$this->db->select("id,
type,
CASE
WHEN type = '0' THEN 'Redemption Made'
WHEN type = '1' THEN 'New Review'
WHEN type = '2' THEN 'New Consultation'
WHEN type = '3' THEN 'Added to new clinic'
END as type_desc,
message,
read_status,
time');
time");
$this->db->from('tbl_doctor_notifications');
$this->db->where('doctor_id',$doctor_id);
$this->db->order_by('time','DESC');
......@@ -647,45 +656,40 @@ function get_notifications($doctor_id,$page,$limit = null)
function get_notifications_total_count($doctor_id)
{
$this->db->select('id as count');
$this->db->select('count(id) as count');
$this->db->from('tbl_doctor_notifications');
$this->db->where('doctor_id',$doctor_id);
$query = $this->db->get();
return $query->row_array();
//echo $this->db->last_query();exit();
return $query->result_array();
}
function get_aniversaries_list($doc_id)
{
/*$this->db->select("tbl_registration.id,
tbl_registration.name,
tbl_registration.dob,
tbl_registration.profile_photo,
DATE_FORMAT(tbl_registration.dob, '%m') as mo");
$this->db->from('tbl_booking');
$this->db->join('tbl_registration', 'tbl_booking.patient_id = tbl_registration.id ','left');
$this->db->where('tbl_booking.doctor_id',$doc_id);
$this->db->where('tbl_booking.booking_status',3);
$this->db->where("month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))".'>='. date('m',time()));*/
//$this->db->where("day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))".'>='. date('d',time()));
//$this->db->where('IF("month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,"+00:00"))"'.'='. date('m',time()).')'., null, "day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))".'>='. date('d',time()));
//$this->db->where('IF(month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,"+00:00"))='.date('m',time()).',day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,"+00:00"))>=26,null)');
//$this->db->where("IF(tbl_registration.id='156',NULL,true)");
//$this->db->where("IF(month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))='".date('m',time())."',day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))".'>='.$day.",true)",true);
//$this->db->where("IF( cond,true,fasle)", null, false);
//$this->db->where('tbl_registration.dob',3);
//$query = $this->db->query("SELECT `tbl_registration`.`id`, `tbl_registration`.`name`, `tbl_registration`.`dob`, `tbl_registration`.`profile_photo`, DATE_FORMAT(tbl_registration.dob, '%m') as mo FROM `tbl_booking` LEFT JOIN `tbl_registration` ON `tbl_booking`.`patient_id` = `tbl_registration`.`id` WHERE `tbl_booking`.`doctor_id` = '30' AND `tbl_booking`.`booking_status` = 3 AND month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00')) >= 03 AND IF(month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))='03',day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))>= '26',true)");
$query = $this->db->query("SELECT `tbl_registration`.`id`, `tbl_registration`.`name`, `tbl_registration`.`dob`, `tbl_registration`.`profile_photo`, DATE_FORMAT(tbl_registration.dob, '%m') as mo FROM `tbl_booking` LEFT JOIN `tbl_registration` ON `tbl_booking`.`patient_id` = `tbl_registration`.`id` WHERE `tbl_booking`.`doctor_id` = '30' AND `tbl_booking`.`booking_status` = 3 AND month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00')) >= ".date('m',time())." AND IF(month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))='".date('m',time())."',day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))>= '".date('d',time())."',true)");
//print_r($doc_id);die();
// Upcomming Birthday list
$O_month = date('m');
$T_month = date('m', strtotime("last day of next month"));
if($T_month == "12") {
$TH_month = "01";
}else if($T_month <= "11") {
$TH_month = $T_month + "01";
}
if(strlen($TH_month) == 1) {
$TH_month="0".$TH_month;
}
// another methods for getting months
/* echo $date = date('m',strtotime('first day of +1 month'));
echo $date = date('m',strtotime('first day of +2 month'));
*/
$upcomming = $this->db->query("SELECT `tbl_registration`.`id`, `tbl_registration`.`name`, `tbl_registration`.`dob`, `tbl_registration`.`profile_photo`, DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e') AS 'date_formatted' ,`tbl_booking`.`booking_status`,`tbl_booking`.`id` as 'book_id' FROM `tbl_booking` LEFT JOIN `tbl_registration` ON `tbl_booking`.`patient_id` = `tbl_registration`.`id` WHERE `tbl_booking`.`doctor_id` = $doc_id AND `tbl_booking`.`booking_status` = '3' AND `tbl_booking`.`payment_status` = '1' AND (DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e') like '%-$O_month-%' or DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e') like '%-$T_month-%' or DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e') like '%-$TH_month-%') ORDER BY DAYOFYEAR(DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e')) < DAYOFYEAR(CURDATE()) , DAYOFYEAR(DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e'))");
/*
$query = $this->db->query("SELECT `tbl_registration`.`id`, `tbl_registration`.`name`, `tbl_registration`.`dob`, `tbl_registration`.`profile_photo`, DATE_FORMAT(FROM_UNIXTIME(`tbl_registration`.`dob`), '%Y-%m-%e') AS 'date_formatted' FROM `tbl_booking` LEFT JOIN `tbl_registration` ON `tbl_booking`.`patient_id` = `tbl_registration`.`id` WHERE `tbl_booking`.`doctor_id` = '30' AND `tbl_booking`.`booking_status` = 3 AND month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00')) >= ".date('m',time())." AND IF(month(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))='".date('m',time())."',day(CONVERT_TZ(FROM_UNIXTIME(tbl_registration.dob),@@session.time_zone,'+00:00'))>= '".date('d',time())."',true)")*/;
//$this->db->get();
//echo $this->db->last_query();die();
return $query->result_array();
return $upcomming->result_array();
}
public function get_doctor_password($id)
......
......@@ -259,10 +259,22 @@
if($this->db->insert('tbl_doctor_notifications',$data))
{
$insert_id = $this->db->insert_id();
return $insert_id;
}
}
public function insert_notification_patient($data)
{
if($this->db->insert('tbl_patient_notification',$data))
{
$insert_id = $this->db->insert_id();
return $insert_id;
}
}
public function check_valid_email_forgot($email,$type)
{
$this->db->select('count(id) as count,
......@@ -505,6 +517,90 @@
return $query->row_array();
}
public function redemptionhistory($id)
{
$this->db->select("tbl_withdrawal_history.id as id,
tbl_withdrawal_history.amount as amount,
tbl_withdrawal_history.date as date,
CASE
WHEN tbl_withdrawal_history.status = '0' THEN 'PENDING'
WHEN tbl_withdrawal_history.status = '1' THEN 'INPROGRESS'
WHEN tbl_withdrawal_history.status = '2' THEN 'COMPLETED'
ELSE 'REJECTED'
END as status,
tbl_bank_accounts.bank_name as bank_name,
tbl_bank_accounts.account_holder as account_holder,
tbl_bank_accounts.account_no as account_no ");
$this->db->from('tbl_withdrawal_history');
$this->db->where('tbl_bank_accounts.type',1);
$this->db->where('tbl_withdrawal_history.doctor_id',$id);
//$this->db->where('tbl_withdrawal_history.status',2);
$this->db->where('tbl_bank_accounts.type_id',$id);
$this->db->join('tbl_bank_accounts', 'tbl_bank_accounts.id = tbl_withdrawal_history.bank_id', 'inner');
$this->db->order_by('tbl_withdrawal_history.date','DESC');
$query = $this->db->get();
return $query->result_array();
}
public function futurereleases($id)
{
$current_time_in_UTC = strtotime(local_time_in_server(time()));
//print_r($current_time_in_UTC);die();
$this->db->select("tbl_booking.doctor_id,
tbl_booking.date as date,
tbl_booking.time_start as time_start,
CASE
WHEN tbl_booking.promo_name = '' THEN 'NORMAL'
WHEN tbl_booking.promo_name != '' THEN 'SPECIAL'
END as consultation_type,
tbl_booking.promo_name as promocode,
tbl_booking.total_sum as total_sum,
tbl_booking.ipok_fee as ipok_fee,
tbl_doctors.name as doctor_name,
(tbl_booking.total_sum - ((tbl_booking.total_sum * tbl_booking.ipok_fee)/100)) as release_amount
");
$this->db->from('tbl_booking');
$this->db->join('tbl_doctors', 'tbl_doctors.id = tbl_booking.doctor_id', 'inner');
$this->db->where('tbl_booking.time_start'.'>'.$current_time_in_UTC);
$this->db->where('tbl_booking.booking_status',1);
$this->db->where('tbl_booking.doctor_id',$id);
$this->db->order_by('tbl_booking.time_start','ASC');
//$this->db->limit(1);
$query = $this->db->get();
return $query->result_array();
}
public function get_todays_booking()
{
$todayat12 = strtotime(date('Y-m-d'));
//print_r($todayat12);
//die();
$this->db->select("*");
$this->db->from('tbl_booking');
$this->db->where('date',$todayat12);
$this->db->where('booking_status',1);
$this->db->where('payment_status',1);
$query = $this->db->get();
return $query->result_array();
}
public function get_patient_fcm($pat_id)
{
$this->db->select('fcm_token');
$this->db->from('tbl_authtoken');
$this->db->where('userid',$pat_id);
$query = $this->db->get();
return $query->row_array();
}
public function get_doctor_fcm($doc_id)
{
$this->db->select('fcm_token');
$this->db->from('tbl_authtoken_doctors');
$this->db->where('doctor_id',$doc_id);
$query = $this->db->get();
return $query->row_array();
}
......
......@@ -396,6 +396,41 @@ public function set_confirmation_code($user,$code)
$this->db->update('tbl_registration',$data);
}
public function get_notifications($id,$page,$limit = null)
{
$start = 0;
if(!isset($limit) or empty($limit))
{
$limit = $page * 5;
}
$this->db->select("id,
type,
CASE
WHEN type = '0' THEN 'New Booking'
WHEN type = '1' THEN 'Waiting List'
WHEN type = '2' THEN 'Consultation Reminder'
WHEN type = '3' THEN 'Consulation Canceled'
END as type_desc,
message,
read_status,
time");
$this->db->from('tbl_patient_notification');
$this->db->where('patient_id',$id);
$this->db->order_by('time','DESC');
$this->db->limit($limit, $start);
$query = $this->db->get();
return $query->result_array();
}
function get_notifications_total_count($patient_id)
{
$this->db->select('count(id) as count');
$this->db->from('tbl_patient_notification');
$this->db->where('patient_id',$patient_id);
$query = $this->db->get();
return $query->result_array();
}
}
......
......@@ -272,7 +272,7 @@
{
?>
<li>
<h5><?php echo $value['type_name'];?>
<h5><?php echo $value['type_desc'];?>
<div class="ip_notification_time"><?php echo change_time_to_local($value['time'])?></div>
</h5>
<p><?php echo $value['message'];?></p>
......@@ -280,16 +280,16 @@
<?php
}
}
else
{
?>
<!-- <li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li> -->
<li>
<p>No Notifications!</p>
</li>
<?php
}
?>
</ul>
</div>
</div>
......
......@@ -202,7 +202,7 @@
<?php if(!empty($record_data['letters']))
{
?>
<p><?php echo $record_data['letters'];?></p>
<p><?php echo $record_data['letters']->certificate;?></p>
<?php
}
?>
......
......@@ -191,7 +191,7 @@
<?php if(!empty($record_data['letters']))
{
?>
<p><?php echo $record_data['letters'];?></p>
<p><?php echo $record_data['letters']->certificate;?></p>
<?php
}
?>
......
......@@ -10,7 +10,7 @@
<li>
<h5><?php echo $value['type_name'];?>
<h5><?php echo $value['type_desc'];?>
<div class="ip_notification_time" ><?php echo change_time_to_local($value['time'])?></div>
<!-- <div class="ip_notification_time"><?php echo date('H:i s',$value['time']);?></div> -->
......
<div class="ip_set_two_wrapper">
<div class="">
<div class="modal-dialog" style=" box-shadow: 0px 0px 5px 0px #888888;border-top-right-radius: 8px;border-top-left-radius: 8px;">
<div class="ip_patient_delete_pop_wrapper">
<div class="ip_paitent_delete_header">
ERROR
</div>
<div class="ip_patient_delete_content">
<div class="textCenter">
<img src="<?php echo base_url();?>assets/images/ip_error.png">
</div>
<h5>URL ERROR !</h5>
<hr>
<p>Invalid Url Provided!</p>
<div class="ip_patient_delete_form">
<div class="ip_patient_delete_row textCenter">
<!-- <button class="ip_paitent_dark_btn">OKAY</button> -->
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -256,54 +256,30 @@
<div class="ip_bio_detail">
<div class="ip_bio_notification_list">
<ul>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
<?php
if(!empty($notifications))
{
foreach ($notifications as $key => $value)
{
?>
<li>
<h5><?php echo $value['type_desc'];?>
<div class="ip_notification_time"><?php echo change_time_to_local($value['time'])?></div>
</h5>
<p><?php echo $value['message'];?></p>
</li>
<?php
}
}
else
{
?>
<li>
<p>No Notifications!</p>
</li>
<?php
}
?>
</ul>
</div>
</div>
......
......@@ -201,7 +201,7 @@
<?php if(!empty($record_data['letters']))
{
?>
<p><?php echo $record_data['letters'];?></p>
<p><?php echo $record_data['letters']->certificate;?></p>
<?php
}
?>
......
<div class="ip_bio_notification_list">
<ul>
<?php
if(!empty($notifications))
{
foreach ($notifications as $key => $value)
{
?>
<li>
<h5><?php echo $value['type_desc'];?>
<div class="ip_notification_time"><?php echo change_time_to_local($value['time'])?></div>
<!-- <div class="ip_notification_time"><?php echo date('H:i s',$value['time']);?></div> -->
</h5>
<p><?php echo $value['message'];?></p>
</li>
<?php
}
?>
<input type="hidden" id="pat-noti-pageno" value="<?php echo $notifications_page_no?>">
<?php
}
?>
</ul>
</div>
<div class="ip_notification_btm_btn_bay textCenter" style="padding:30px;">
<?php
if($notifications_total_count['count']>sizeof($notifications))
{
?>
<a href="javascript:void(0)">
<button class="ip_notification_btn" type="button" id="pat-noti-loadmore" style="width: 40%;">View more</button>
</a>
<?php
}
?>
</div>
\ No newline at end of file
<div class="ip_set_two_wrapper">
<div class="container ip_custom_container">
<!-- <div class="ip_top_dash_bay">
<div class="row">
<div class="col-md-3">
<div class="ip_top_dash_list">
<div class="ip_top_dash_circle">
<img src="<?php echo base_url();?>assets/images/ip_appointments.png">
</div>
<div class="ip_top_dash_detail">
<strong class="ip_counter" data-count="<?php echo $dash_view['no_of_attendance']?>">0</strong>
<p>Attendance</p>
</div>
<div class="clear"></div>
</div>
</div>
<div class="col-md-3">
<div class="ip_top_dash_list">
<div class="ip_top_dash_circle">
<img src="<?php echo base_url();?>assets/images/ip_feature.png">
</div>
<div class="ip_top_dash_detail" >
<strong class="ip_counter" data-count="<?php echo $dash_view['no_of_billed']?>">0</strong>
<p>Billed</p>
</div>
<div class="clear"></div>
</div>
</div>
<div class="col-md-3">
<div class="ip_top_dash_list">
<div class="ip_top_dash_circle">
<img src="<?php echo base_url();?>assets/images/ip_paintences.png">
</div>
<div class="ip_top_dash_detail">
<strong class="ip_counter" data-count="<?php echo $dash_view['no_of_patients']?>">0</strong>
<p>Patients</p>
</div>
<div class="clear"></div>
</div>
</div>
<div class="col-md-3">
<div class="ip_top_dash_list bordernone">
<div class="ip_top_dash_circle">
<img src="<?php echo base_url();?>assets/images/ip_vistors.png">
</div>
<div class="ip_top_dash_detail">
<strong class="ip_counter" data-count="<?php echo $dash_view['no_of_profileview']?>">0</strong>
<p>Profile Views</p>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div> -->
<div class="ip_grid_cols">
<div class="row">
<div class="col-md-8">
<div class="ip_bio_tab_div">
<div class="ip_bio_head">
Notification center
</div>
<div class="ip_bio_detail" id="pat-noti-view">
<?php
$this->load->view('patient_notifications_list')
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -190,9 +190,10 @@
<div class="ip_bio_detail">
<?php
if($userdata['type']=='DOCTOR' and (!empty($this->session->userdata('notifications'))))
$notifications = get_notification($userdata['id'],$userdata['type']);
if(!empty($notifications))
{
$notifications = $this->session->userdata('notifications');
//$notifications = $this->session->userdata('notifications');
?>
<div class="ip_bio_notification_list">
<ul>
......@@ -201,60 +202,54 @@
{
?>
<li>
<h5><?php echo $value['type_name'];?>
<h5><?php echo $value['type_desc'];?>
<div class="ip_notification_time"><?php echo change_time_to_local($value['time'])?></div>
</h5>
<p><?php echo $value['message'];?></p>
</li>
<?php
}
?>
<!-- <li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li> -->
</ul>
<div class="clear"></div>
<div class="ip_notification_btm_btn_bay">
<a class="p0" href="<?php echo base_url();?>Doctor/notification">
<?php
if($userdata['type']=='PATIENT')
{
?>
<a class="p0" href="<?php echo base_url();?>Patient/notification">
<button class="ip_notification_btn">See All</button>
</a>
<?php
}
elseif($userdata['type']=='DOCTOR')
{
?>
<a class="p0" href="<?php echo base_url();?>Doctor/notification">
<button class="ip_notification_btn">See All</button>
</a>
</a>
<?php
}
?>
</div>
</div>
<?php
}
?>
<?php
if($userdata['type']=='PATIENT')
else
{
?>
<div class="ip_bio_notification_list">
<ul>
<li>
<h5>Nyla Augusta
<div class="ip_notification_time">12:56</div>
</h5>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been</p>
</li>
</ul>
<div class="clear"></div>
<div class="ip_notification_btm_btn_bay">
<a class="p0" href="<?php echo base_url();?>Patient/notification">
<button class="ip_notification_btn">See All</button>
</a>
</div>
</div>
<?php
<div class="ip_bio_notification_list">
<ul>
<li>
</p>No Notifications!</li>
</li>
</ul>
</div>
<?php
}
?>
</div>
......@@ -288,7 +283,10 @@
<li>
<p>Clinics</p>
</li>
<div class="ip_listing_scroll">
<?php
foreach ($clinic_list as $key => $elm)
{
?>
......@@ -302,6 +300,10 @@
<?php
}
?>
</div>
<?php
}
?>
......@@ -312,9 +314,10 @@
<li>
<p>Your Collaborator(s)</p>
</li>
<?php
<div class="ip_listing_scroll">
<?php
foreach ($collaboratordata as $key => $value)
{
{
?>
<a href="<?php echo base_url();?>Doctor/editColaborator/<?php echo $value['id']?>">
<li>
......@@ -326,7 +329,10 @@
</li>
</a>
<?php
}
}
?>
</div>
<?php
}
?>
......
......@@ -39,7 +39,9 @@
<p>Last Redemption</p>
</div>
<div class="ip_circle_right">
<button class="ip_circle_btn bal_btn">HISTORY</button>
<a href="<?php echo base_url();?>Doctor/wallet/redemptionhistory">
<button class="ip_circle_btn bal_btn" type="button">HISTORY</button>
</a>
</div>
<div class="clear"></div>
</div>
......@@ -71,7 +73,9 @@
<p>Next Release</p>
</div>
<div class="ip_circle_right">
<button class="ip_circle_btn future_btn">VIEW MORE</button>
<a href="<?php echo base_url();?>Doctor/wallet/futurereleases">
<button class="ip_circle_btn future_btn" type="button">VIEW MORE</button>
</a>
</div>
<div class="clear"></div>
</div>
......@@ -127,7 +131,7 @@
<div class="ip_bank_form">
<div class="ip_bank_row">
<div class="ip_bank_detail_frame">
<input class="ip_bank_input reset-bank-form" data-parsley-required="" placeholder="Bank" name="bank">
<input class="ip_bank_input reset-bank-form" data-parsley-required="" placeholder="Bank" onKeyPress="if(this.value.length > 40) return false;" data-parsley-maxlength="40" name="bank">
</div>
</div>
<div class="ip_bank_row">
......@@ -137,7 +141,7 @@
<!-- <input class="ip_bank_input" placeholder="Agency" style="border-right:2px solid #f5f5f5;"> -->
<p class="p12" style="border-right:2px solid #f5f5f5;">Agency</p>
</div>
<div class="col-md-8 p0 height100"><input class="ip_bank_input bordernone reset-bank-form" placeholder="xxxx-xx" data-parsley-required="" name="agency"></div>
<div class="col-md-8 p0 height100"><input class="ip_bank_input bordernone reset-bank-form" placeholder="xxxx-xx" data-parsley-required="" name="agency" onKeyPress="if(this.value.length > 40) return false;" data-parsley-maxlength="40"></div>
</div>
</div>
</div>
......@@ -149,15 +153,14 @@
<option>Account</option>
</select> -->
<p class="p12" style="border-right:2px solid #f5f5f5;">Account</p>
</div>
<div class="col-md-8 p0 height100"><input class="ip_bank_input bordernone reset-bank-form" placeholder="xxxx-xx" data-parsley-required="" type="number" name="account"></div>
<div class="col-md-8 p0 height100"><input class="ip_bank_input bordernone reset-bank-form" placeholder="xxxx-xx" data-parsley-required="" type="number" name="account" onKeyPress="if(this.value.length > 30) return false;" data-parsley-maxlength="30"></div>
</div>
</div>
</div>
<div class="ip_bank_row">
<div class="ip_bank_detail_frame">
<input class="ip_bank_input reset-bank-form" placeholder="Name" data-parsley-required="" name="name">
<input class="ip_bank_input reset-bank-form" placeholder="Name" data-parsley-required="" onKeyPress="if(this.value.length > 40) return false;" data-parsley-maxlength="40" name="name">
</div>
</div>
<div class="row m0 height100">
......@@ -225,7 +228,7 @@
<!-- <input class="ip_bank_input"style="border-right:2px solid #f5f5f5;" placeholder="Redemption Value"> -->
<p class="p12" style="border-right:2px solid #f5f5f5;">Redemption Value</p>
</div>
<div class="col-md-6 p0 height100"><input class="ip_bank_input bordernone reset-redemption-form" placeholder="R$ " type="number" data-parsley-required="" name="redemption_amount"> </div>
<div class="col-md-6 p0 height100"><input class="ip_bank_input bordernone reset-redemption-form" placeholder="R$ " type="number" data-parsley-required="" name="redemption_amount" onKeyPress="if(this.value.length > 6) return false;" data-parsley-maxlength="6" > </div>
</div>
</div>
</div>
......
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="ip_edit_record_cover">
<div class="ip_edit_record_head">
Future Releases
</div>
<div>
<hr>
<div class="ip_edit_record_detail">
<div class="ip_edit_row">
<div class="ip_budject_list">
<?php if(!empty($futurereleases))
{
foreach ($futurereleases as $key => $value)
{
?>
<li>
<h6 class="m0"><?php echo date('d-m-Y',$value['date']);?></h6>
<div class="child1"><h5><strong><?php echo $value['consultation_type'];?> CONSULTATION</strong></h5>
<p class="select"><?php echo $value['doctor_name'];?> | <?php echo date('h:i a',$value['time_start']);?></p>
</div>
<div class="child2"><strong><b>R$ <?php echo $value['release_amount'];?></b></strong></div>
<div class="clear"></div>
</li>
<hr>
<?php
}
}
else
{
?>
<li>
<div class="child1"><h5>No Future Realeases</h5>
</div>
<div class="clear"></div>
</li>
<hr>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="ip_edit_record_cover">
<div class="ip_edit_record_head">
Redemption History
</div>
<div>
<hr>
<div class="ip_edit_record_detail">
<div class="ip_edit_row">
<div class="ip_budject_list">
<?php if(!empty($redemptiondata))
{
foreach ($redemptiondata as $key => $value)
{
?>
<li>
<h6 class="m0"><?php echo date('d-m-Y',$value['date']);?></h6>
<div class="child1"><h5><strong><?php echo $value['account_holder'];?> - <?php echo $value['bank_name'];?> <?php echo $value['account_no'];?></strong></h5>
<p class="select"><?php echo $value['status'];?></p>
</div>
<div class="child2"><strong><b>R$ <?php echo $value['amount'];?></b></strong></div>
<div class="clear"></div>
</li>
<hr>
<?php
}
}
else
{
?>
<li>
<div class="child1"><h5>No Redemption Request</h5>
</div>
<div class="clear"></div>
</li>
<hr>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
</div>
</div>
</div>
......@@ -885,7 +885,7 @@ unicode-bidi: bidi-override;display: inline-block;position: relative;bottom: 5px
.ip_nav_notification_listing{width: 300px;margin: 0px;padding: 0px;box-shadow: none;border:none;position: absolute;top: 51px;}
.ip_nav_notification_listing li{width:100%;}
.ip_nav_notification_listing li a{padding: 0px;}
.ip_nav_notification_listing .ip_bio_tab_div{margin:0px;box-shadow: none;min-height: 380px; border: 1px solid #f4f4f4;}
.ip_nav_notification_listing .ip_bio_tab_div{margin:0px;box-shadow: none;min-height: 380px;border: 1px solid #f4f4f4;}
.ip_nav_notification_listing .ip_bio_tab_div .ip_bio_head{padding: 10px;height:45px;position: relative;}
.ip_nav_notification_listing .ip_bio_notification_list ul li{padding: 15px;padding-left: 70px;}
.ip_nav_notification_listing .ip_bio_notification_list{height: 340px;}
......@@ -941,7 +941,7 @@ unicode-bidi: bidi-override;display: inline-block;position: relative;bottom: 5px
/* SET-FOUR-SCREEN-FOUR */
.ip_listing_scroll{width:100%;max-height:200px;overflow:scroll;background-color: #fff;}
.ip_listing_scroll{width:100%;max-height:170px;overflow:scroll;background-color: #fff;}
.ip_listing_scroll::-webkit-scrollbar { display: none; }
.ip_listing_scroll::-moz-scrollbar { display: none; }
.ip_nav_profile_listing{width:210px;margin: 0px;border: 1px solid #f5f5f5;padding: 0px;padding-top:10px;box-shadow: none;top: 51px;}
......
......@@ -288,6 +288,14 @@ function certificate_images_loadthumbnail(file)
$(function(){
/*PATIENT NOTIFICATION PAGE BEGINS*/
$(document).on("click","#pat-noti-loadmore",function()
{
var pageno = $('#pat-noti-pageno').val();
var result = post_ajax(base_url+'Patient/notification_ajax',{'page':pageno});
$('#pat-noti-view').html(result);
})
$('#request-redemption-btn').click(function()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment