Commit 9ac53d8a by Tobin

missing files changes

parent 951586c1
...@@ -17,7 +17,6 @@ class Dashboard extends CI_Controller { ...@@ -17,7 +17,6 @@ class Dashboard extends CI_Controller {
} }
redirect(base_url('Event/listEvents')); redirect(base_url('Event/listEvents'));
$this->load->model('Dashboard_model');
} }
public function index() { public function index() {
......
...@@ -188,7 +188,7 @@ class Event extends CI_Controller { ...@@ -188,7 +188,7 @@ class Event extends CI_Controller {
$subject = "TimeOut, New Event Created"; $subject = "TimeOut, New Event Created";
$emailId = $settings['admin_mail_id']; $emailId = $settings['admin_mail_id'];
$message = "<html><body> $message = "<html><body>
New Event Created, event name: <strong>".$_POST['event_name_en']."</strong>. Event URL : ".base_url()."eventdetail?event_id=$event_id New Event Created, event name: <strong>".$_POST['event_name_en']."</strong>. Event URL : ".base_url()."Event/listEvents
</body></html>"; </body></html>";
$this->Api_model->send_mail($subject,$emailId,$message); $this->Api_model->send_mail($subject,$emailId,$message);
} }
......
...@@ -132,7 +132,7 @@ class Webservice extends CI_Controller { ...@@ -132,7 +132,7 @@ class Webservice extends CI_Controller {
print json_encode($result); print json_encode($result);
} }
public function successResponse($data) { public function successResponse($data='') {
$result = array( $result = array(
'status' => 'success', 'status' => 'success',
); );
......
...@@ -175,6 +175,10 @@ ...@@ -175,6 +175,10 @@
'Organizer'=>array(1,2,3,4),'Booking'=>array(1,2,3,4), 'Organizer'=>array(1,2,3,4),'Booking'=>array(1,2,3,4),
'Notification'=>array(1,2,3,4),'HotelCity'=>array(1,2,3,4)); 'Notification'=>array(1,2,3,4),'HotelCity'=>array(1,2,3,4));
break; break;
case 5:
$menus = array('Customer'=>array(),'Customer_Booking'=>array());
break;
} }
return $menus; return $menus;
} }
......
...@@ -53,7 +53,8 @@ class Api_model extends CI_Model { ...@@ -53,7 +53,8 @@ class Api_model extends CI_Model {
$res_count = $this->db->query($sql)->row(); $res_count = $this->db->query($sql)->row();
if(count($res_count) > 0) { if(count($res_count) > 0) {
if($res_count->email == $data['email_id'] && $res_count->phone == $data['phone']){ if($res_count->email == $data['email_id'] &&
($res_count->phone == $data['phone'] || strpos($res_count->phone,$data['phone'])!==false)){
return array('status'=>0,'message'=>'Already have an account with email id and phone no. Please login','code'=>'ER12'); return array('status'=>0,'message'=>'Already have an account with email id and phone no. Please login','code'=>'ER12');
} else if($res_count->email == $data['email_id']){ } else if($res_count->email == $data['email_id']){
return array('status'=>0,'message'=>'Email id already exists','code'=>'ER09'); return array('status'=>0,'message'=>'Email id already exists','code'=>'ER09');
......
...@@ -5,10 +5,12 @@ class Booking_model extends CI_Model { ...@@ -5,10 +5,12 @@ class Booking_model extends CI_Model {
parent::_construct(); parent::_construct();
} }
public function getBookingData($booking_id='',$provider_id='',$view='0,1,2,3,5,6'){ public function getBookingData($booking_id='',$provider_id='',$view='0,1,2,3,5,6',$customer_id='',$bookId=''){
$cond = (!empty($view))?" BOK.status IN ($view) ":" BOK.status != '4' "; $cond = (!empty($view))?" BOK.status IN ($view) ":" BOK.status != '4' ";
$cond .= (!empty($bookId))?" AND BOK.bookId='$bookId' ":"";
$cond .= (!empty($booking_id))?" AND BOK.id='$booking_id' ":""; $cond .= (!empty($booking_id))?" AND BOK.id='$booking_id' ":"";
$cond .= (!empty($provider_id))?" AND EVT.provider_id='$provider_id' ":""; $cond .= (!empty($provider_id))?" AND EVT.provider_id='$provider_id' ":"";
$cond .= (!empty($customer_id))?" AND BOK.customer_id='$customer_id' ":"";
$sql = "SELECT BOK.id AS booking_id,CUST.customer_id,CUST.name AS customer_name,EVT.provider_id, $sql = "SELECT BOK.id AS booking_id,CUST.customer_id,CUST.name AS customer_name,EVT.provider_id,
CUST.phone AS customer_phone,CUST.email AS customer_email,CUST.gender,EVT.venue_id, CUST.phone AS customer_phone,CUST.email AS customer_email,CUST.gender,EVT.venue_id,
...@@ -31,7 +33,7 @@ class Booking_model extends CI_Model { ...@@ -31,7 +33,7 @@ class Booking_model extends CI_Model {
WHERE $cond"; WHERE $cond";
$bookingData = $this->db->query($sql); $bookingData = $this->db->query($sql);
if(empty($bookingData)){ if($bookingData->num_rows() <= 0){
return 0; return 0;
} }
......
...@@ -9,7 +9,7 @@ class Login_model extends CI_Model { ...@@ -9,7 +9,7 @@ class Login_model extends CI_Model {
public function login($username, $password) { public function login($username, $password) {
$query = $this->db->query("SELECT * FROM users $query = $this->db->query("SELECT * FROM users
WHERE username='$username' AND password='$password' AND WHERE username='$username' AND password='$password' AND
user_type IN (1,2,4) AND status='1'"); user_type IN (1,2,4,5) AND status='1'");
if($query->num_rows() > 0 && !empty($query)){ if($query->num_rows() > 0 && !empty($query)){
$result = $query->row(); $result = $query->row();
...@@ -34,4 +34,4 @@ class Login_model extends CI_Model { ...@@ -34,4 +34,4 @@ class Login_model extends CI_Model {
return $result; return $result;
} }
} }
?> ?>
\ No newline at end of file
...@@ -8,7 +8,7 @@ class Staff_model extends CI_Model { ...@@ -8,7 +8,7 @@ class Staff_model extends CI_Model {
$cond = (!empty($view))?" AND status IN ($view) ":" status != '2' "; $cond = (!empty($view))?" AND status IN ($view) ":" status != '2' ";
$cond .= (!empty($staff_id))?" AND id='$staff_id' ":""; $cond .= (!empty($staff_id))?" AND id='$staff_id' ":"";
$staffData = $this->db->query("SELECT * FROM users WHERE user_type='4' ".$cond); $staffData = $this->db->query("SELECT * FROM users WHERE user_type IN (4,5) ".$cond);
if(!empty($staffData)){ if(!empty($staffData)){
return (!empty($staff_id))?$staffData->row():$staffData->result(); return (!empty($staff_id))?$staffData->row():$staffData->result();
...@@ -22,7 +22,7 @@ class Staff_model extends CI_Model { ...@@ -22,7 +22,7 @@ class Staff_model extends CI_Model {
$userNameChk = $this->db->query("SELECT * FROM users $userNameChk = $this->db->query("SELECT * FROM users
WHERE status!='2' AND username='".$staff_data['username']."' AND WHERE status!='2' AND username='".$staff_data['username']."' AND
user_type='4'"); user_type IN (4,5)");
if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 2; if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 2;
$status = $this->db->insert('users', $status = $this->db->insert('users',
...@@ -30,7 +30,7 @@ class Staff_model extends CI_Model { ...@@ -30,7 +30,7 @@ class Staff_model extends CI_Model {
'password'=>$staff_data['password'], 'password'=>$staff_data['password'],
'display_name'=>$staff_data['display_name'], 'display_name'=>$staff_data['display_name'],
'profile_image'=>$staff_data['profile_image'], 'profile_image'=>$staff_data['profile_image'],
'user_type'=>'4','status'=>'1')); 'user_type'=>$staff_data['user_type'],'status'=>'1'));
return $status; return $status;
} }
...@@ -39,7 +39,7 @@ class Staff_model extends CI_Model { ...@@ -39,7 +39,7 @@ class Staff_model extends CI_Model {
return 0; return 0;
$userNameChk = $this->db->query("SELECT * FROM users $userNameChk = $this->db->query("SELECT * FROM users
WHERE status!='2' AND username='".$staff_data['username']."' AND WHERE status!='2' AND username='".$staff_data['username']."' AND
user_type='4' AND id!='".$staff_id."'"); user_type IN (4,5) AND id!='".$staff_id."'");
if(!empty($userNameChk) && $userNameChk->num_rows() > 0) { return 2; } if(!empty($userNameChk) && $userNameChk->num_rows() > 0) { return 2; }
if(!isset($staff_data['profile_image']) || empty($staff_data['profile_image'])){ if(!isset($staff_data['profile_image']) || empty($staff_data['profile_image'])){
......
...@@ -50,8 +50,27 @@ ...@@ -50,8 +50,27 @@
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<?php if(!isset($staff_id) || empty($staff_id)){ ?>
<div class="form-group"> <div class="form-group">
<label>User Role</label>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<input type="radio" class="required padLeft10" data-parsley-trigger="change"
required value="4" name="user_type" checked>
<label class="padLeft10">Staff User</label>
</div>
<div class="col-md-5">
<input type="radio" class="required padLeft10" data-parsley-trigger="change"
required value="5" name="user_type">
<label class="padLeft10">Customer User</label>
</div>
</div>
</div>
</div>
<?php } ?>
<div class="form-group padTop10">
<label>Profile Picture</label> <label>Profile Picture</label>
<div class="col-md-12" style="padding-bottom:10px;"> <div class="col-md-12" style="padding-bottom:10px;">
<div class="col-md-3"> <div class="col-md-3">
......
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
<thead> <thead>
<tr> <tr>
<th class="hidden">ID</th> <th class="hidden">ID</th>
<th width="50px;">Photo</th> <th width="50px;">Photo</th>
<th width="150px;">Name</th> <th width="130px;">Name</th>
<th width="150px;">Username</th> <th width="130px;">Username</th>
<th width="120px;">Role</th>
<th width="50px;">Status</th> <th width="50px;">Status</th>
<th width="200px;">Action</th> <th width="200px;">Action</th>
</tr> </tr>
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
</th> </th>
<th class="center"><?= $staff->display_name ?></th> <th class="center"><?= $staff->display_name ?></th>
<th class="center"><?= $staff->username ?></th> <th class="center"><?= $staff->username ?></th>
<th class="center"><?= ($staff->user_type == 4)?'Staff User':'Customer Care' ?></th>
<th class="center" id="statusFlag_<?= $staff->id ?>"> <th class="center" id="statusFlag_<?= $staff->id ?>">
<?= ($staff->status == 1)?'Active':'De-active' ?> <?= ($staff->status == 1)?'Active':'De-active' ?>
</th> </th>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<script src="<?= base_url('assets/js/bootbox.min.js') ?>"></script> <script src="<?= base_url('assets/js/bootbox.min.js') ?>"></script>
<script src="<?= base_url('assets/js/app.min.js') ?>"></script> <script src="<?= base_url('assets/js/app.min.js') ?>"></script>
<script src="<?= base_url('assets/js/locationpicker.js') ?>" type="text/javascript"></script> <script src="<?= base_url('assets/js/locationpicker.js') ?>" type="text/javascript"></script>
<script src="<?= base_url('assets/js/jquery-ui.min.js') ?>" type="text/javascript"></script>
<script src="<?= base_url('assets/js/custom-script.js?ts='.time()) ?>"></script> <script src="<?= base_url('assets/js/custom-script.js?ts='.time()) ?>"></script>
<script src="<?= base_url('assets/js/parsley.min.js') ?>"></script> <script src="<?= base_url('assets/js/parsley.min.js') ?>"></script>
<script src="<?= base_url('assets/js/bootstrap-datepicker.js') ?>"></script> <script src="<?= base_url('assets/js/bootstrap-datepicker.js') ?>"></script>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<link rel="stylesheet" href="<?= base_url('assets/css/theme.css') ?>"> <link rel="stylesheet" href="<?= base_url('assets/css/theme.css') ?>">
<link rel="stylesheet" href="<?= base_url('assets/css/custom.css') ?>"> <link rel="stylesheet" href="<?= base_url('assets/css/custom.css') ?>">
<link rel="stylesheet" href="<?= base_url('assets/css/slick.min.css') ?>" type="text/css" > <link rel="stylesheet" href="<?= base_url('assets/css/slick.min.css') ?>" type="text/css" >
<link rel="stylesheet" href="<?= base_url('assets/css/jquery-ui.min.css') ?>" type="text/css" />
<script src="<?= base_url('assets/js/jQuery-2.1.4.min.js') ?>"></script> <script src="<?= base_url('assets/js/jQuery-2.1.4.min.js') ?>"></script>
<script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script> <script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script>
......
...@@ -357,7 +357,7 @@ ...@@ -357,7 +357,7 @@
padding-bottom:20px !important; padding-bottom:20px !important;
} }
/* .padBottom10 { .padBottom10 {
padding-bottom:10px !important; padding-bottom:10px !important;
} }
...@@ -397,6 +397,10 @@ ...@@ -397,6 +397,10 @@
padding-top:20px !important; padding-top:20px !important;
} }
.padTop50 {
padding-top:50px !important;
}
.padTop300{ .padTop300{
padding-top: 300px; padding-top: 300px;
} }
...@@ -447,7 +451,7 @@ ...@@ -447,7 +451,7 @@
.padAll-20 { .padAll-20 {
padding: 20px; padding: 20px;
} */ }
.vechile-body { .vechile-body {
background-color:#f7f7f7; background-color:#f7f7f7;
......
...@@ -1025,4 +1025,15 @@ jQuery('[id^="addMultiLang"]').on('click',function() { ...@@ -1025,4 +1025,15 @@ jQuery('[id^="addMultiLang"]').on('click',function() {
jQuery('[id="showMultiLangBlock_'+block+'"]').removeClass('hide'); jQuery('[id="showMultiLangBlock_'+block+'"]').removeClass('hide');
} }
}); });
\ No newline at end of file
jQuery('[id="custSearch"]').autocomplete({
source: base_url+'Customer_Booking/userSearch',
minLength: 1,
select : (e,data) => {
if(!data || data=='' || data==undefined || data=='undefined' || data==null || data=='null'){
return false;
}
jQuery('[name="user_id"]').val(data['item']['data']);
}
});
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