Commit 7cfbd845 by Tobin

Merge branch 'master' into 'production'

Master See merge request !10
parents 2826ac21 d65f28cd
......@@ -49,7 +49,7 @@ class Driver extends CI_Controller {
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error');
if(!isset($_POST) || empty($_POST)){
$this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Driver/add-driver'));
redirect(base_url('Driver/addDriver'));
}
if($err == 0 && (!isset($_POST['first_name']) || empty($_POST['first_name']))){
$err = 1;
......@@ -150,8 +150,6 @@ class Driver extends CI_Controller {
redirect(base_url('Driver/add_driver'));
}
$_POST['password'] = md5($_POST['password']);
$_POST['online_end_time'] = strtotime($_POST['online_end_time']);
$_POST['online_start_time'] = strtotime($_POST['online_start_time']);
$status = $this->Driver_model->addDriver($_POST);
if($status == 1){
......@@ -330,8 +328,6 @@ class Driver extends CI_Controller {
redirect(base_url('Driver/edit/'.encode_param($driver_id)));
}
$_POST['online_end_time'] = strtotime($_POST['online_end_time']);
$_POST['online_start_time'] = strtotime($_POST['online_start_time']);
$status = $this->Driver_model->updateDriver($driver_id,$_POST);
if($status == 1){
$flashMsg['class'] = 'success';
......
......@@ -170,11 +170,9 @@ class Ride_model extends CI_Model {
FROM transport_details AS TD
INNER JOIN drivers AS DRV ON (DRV.driver_id = TD.assigned_driver)
WHERE TD.driver_assign_status='0' AND TD.assigned_driver<>'0' AND TD.is_scheduled='1' AND
TD.appointment_time>$startDateTime AND
TD.appointment_time<$endDateTime AND
TD.appointment_time>DRV.online_start_time AND
TD.appointment_time<DRV.online_end_time AND
TD.appointment_time>$startDateTime AND TD.appointment_time<$endDateTime AND
TD.status IN (4,5,8) AND TD.assigned_driver IN (".implode(",",$drivers).")";
$prvDrivers = $this->db->query($sql);
$driverCond = '';
......
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