Commit 3871cc14 by Tobin

daily commit

parent 81c2cabb
...@@ -22,7 +22,11 @@ class Driver_model extends CI_Model { ...@@ -22,7 +22,11 @@ class Driver_model extends CI_Model {
} }
function getDriver($driver_id = ''){ function getDriver($driver_id = ''){
$cond = (!empty($driver_id))?" AND driver_id = '$driver_id'":""; $user_id = $this->session->userdata('id');
if($this->session->userdata('user_type') != 1){
$cond = " AND CMP.company_id = '$user_id'";
}
$cond .= (!empty($driver_id))?" AND DRV.driver_id = '$driver_id'":"";
$sql = "SELECT DRV.*, CMP.company_name, VH.vehicle_type $sql = "SELECT DRV.*, CMP.company_name, VH.vehicle_type
FROM drivers AS DRV FROM drivers AS DRV
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<body class="hold-transition login-page"> <body class="hold-transition login-page">
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo">
<a href="<?php echo base_url(); ?>"><b>Waaw</b></a> <a href="<?php echo base_url(); ?>"><b>NEMT</b></a>
</div><!-- /.login-logo --> </div><!-- /.login-logo -->
<div class="login-box-body"> <div class="login-box-body">
<p class="login-box-msg">Sign in to start your session</p> <p class="login-box-msg">Sign in to start your session</p>
......
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