Commit 793d77b5 by Tobin

dc

parent 4404870f
...@@ -151,13 +151,7 @@ class Booking extends CI_Controller { ...@@ -151,13 +151,7 @@ class Booking extends CI_Controller {
if(empty($dataRow) || empty($fileName)){ if(empty($dataRow) || empty($fileName)){
return; return;
} }
if($this->session->userdata['user_type'] != 1){
$company_id = $this->session->userdata['id'];
$this->db->query("UPDATE `company_payment_details`
SET `report_count`=report_count+1,
`outstanding_amount`=outstanding_amount+report_charge
WHERE `company_id`=".$company_id);
}
//Download CSV\\ //Download CSV\\
$temp_memory = fopen('php://memory', 'w'); $temp_memory = fopen('php://memory', 'w');
foreach ($dataRow as $line) { foreach ($dataRow as $line) {
......
...@@ -12,6 +12,11 @@ class Category extends CI_Controller { ...@@ -12,6 +12,11 @@ class Category extends CI_Controller {
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login')); redirect(base_url('Login'));
} }
$role = roleManagement();
if(!array_key_exists('Category',$role)){
redirect(base_url('Dashboard'));
}
} }
function listCategory(){ function listCategory(){
......
...@@ -11,6 +11,11 @@ class Customer extends CI_Controller { ...@@ -11,6 +11,11 @@ class Customer extends CI_Controller {
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url()); redirect(base_url());
} }
$role = roleManagement();
if(!array_key_exists('Customer',$role)){
redirect(base_url('Dashboard'));
}
} }
public function addCustomer(){ public function addCustomer(){
...@@ -31,7 +36,11 @@ class Customer extends CI_Controller { ...@@ -31,7 +36,11 @@ class Customer extends CI_Controller {
$template['pDescription'] = "View and Manage Customers"; $template['pDescription'] = "View and Manage Customers";
$template['page_head'] = "Customer Management"; $template['page_head'] = "Customer Management";
$template['customer_data'] = $this->Customer_model->getCustomerData('','0,1'); $provider_id = '';
if($this->session->userdata['user_type'] == 2){
$provider_id = $this->session->userdata['id'];
}
$template['customer_data'] = $this->Customer_model->getCustomerData('','0,1',$provider_id);
$this->load->view('template',$template); $this->load->view('template',$template);
} }
...@@ -144,15 +153,15 @@ class Customer extends CI_Controller { ...@@ -144,15 +153,15 @@ class Customer extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/viewCustomers')); redirect(base_url('Customer/viewCustomers'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/addCustomer')); redirect(base_url('Customer/addCustomer'));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/addCustomer')); redirect(base_url('Customer/addCustomer'));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/addCustomer')); redirect(base_url('Customer/addCustomer'));
} else { } else {
...@@ -232,15 +241,15 @@ class Customer extends CI_Controller { ...@@ -232,15 +241,15 @@ class Customer extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/viewCustomers')); redirect(base_url('Customer/viewCustomers'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/editCustomers/'.$customer_id)); redirect(base_url('Customer/editCustomers/'.$customer_id));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/editCustomers/'.$customer_id)); redirect(base_url('Customer/editCustomers/'.$customer_id));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/editCustomers/'.$customer_id)); redirect(base_url('Customer/editCustomers/'.$customer_id));
} else { } else {
......
...@@ -12,6 +12,11 @@ class Host extends CI_Controller { ...@@ -12,6 +12,11 @@ class Host extends CI_Controller {
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login')); redirect(base_url('Login'));
} }
$role = roleManagement();
if(!array_key_exists('Host',$role)){
redirect(base_url('Dashboard'));
}
} }
function listHostCategory(){ function listHostCategory(){
......
...@@ -168,15 +168,15 @@ class Provider extends CI_Controller { ...@@ -168,15 +168,15 @@ class Provider extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/viewProviders')); redirect(base_url('Provider/viewProviders'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/addProvider')); redirect(base_url('Provider/addProvider'));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/addProvider')); redirect(base_url('Provider/addProvider'));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/addProvider')); redirect(base_url('Provider/addProvider'));
} else { } else {
...@@ -251,15 +251,15 @@ class Provider extends CI_Controller { ...@@ -251,15 +251,15 @@ class Provider extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/viewProviders')); redirect(base_url('Provider/viewProviders'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/editProviders/'.$provider_id)); redirect(base_url('Provider/editProviders/'.$provider_id));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/editProviders/'.$provider_id)); redirect(base_url('Provider/editProviders/'.$provider_id));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Provider/editProviders/'.$provider_id)); redirect(base_url('Provider/editProviders/'.$provider_id));
} else { } else {
......
...@@ -12,6 +12,11 @@ class Region extends CI_Controller { ...@@ -12,6 +12,11 @@ class Region extends CI_Controller {
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login')); redirect(base_url('Login'));
} }
$role = roleManagement();
if(!array_key_exists('City',$role)){
redirect(base_url('Dashboard'));
}
} }
function listRegion(){ function listRegion(){
......
...@@ -118,7 +118,7 @@ class Staff extends CI_Controller { ...@@ -118,7 +118,7 @@ class Staff extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Staff/viewStaffs')); redirect(base_url('Staff/viewStaffs'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Username (Email-ID) alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Username (Email-ID) already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Staff/addStaff')); redirect(base_url('Staff/addStaff'));
} else { } else {
...@@ -185,7 +185,7 @@ class Staff extends CI_Controller { ...@@ -185,7 +185,7 @@ class Staff extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Staff/viewStaffs')); redirect(base_url('Staff/viewStaffs'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Username (Email-ID) alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Username (Email-ID) already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Staff/editStaffs/'.$staff_id)); redirect(base_url('Staff/editStaffs/'.$staff_id));
} else { } else {
......
...@@ -12,6 +12,11 @@ class Tag extends CI_Controller { ...@@ -12,6 +12,11 @@ class Tag extends CI_Controller {
if(!$this->session->userdata('logged_in')) { if(!$this->session->userdata('logged_in')) {
redirect(base_url('Login')); redirect(base_url('Login'));
} }
$role = roleManagement();
if(!array_key_exists('Tag',$role)){
redirect(base_url('Dashboard'));
}
} }
function listTags(){ function listTags(){
......
...@@ -151,15 +151,15 @@ class User extends CI_Controller { ...@@ -151,15 +151,15 @@ class User extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('User/viewProfile')); redirect(base_url('User/viewProfile'));
} else if($status == 5){ } else if($status == 5){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('User/editProfile')); redirect(base_url('User/editProfile'));
} else if($status == 6){ } else if($status == 6){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('User/editProfile')); redirect(base_url('User/editProfile'));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name already exist..!','class'=>'error');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('User/editProfile')); redirect(base_url('User/editProfile'));
} else { } else {
......
...@@ -21,7 +21,11 @@ class Venue extends CI_Controller { ...@@ -21,7 +21,11 @@ class Venue extends CI_Controller {
$template['pTitle'] = "Venue Management"; $template['pTitle'] = "Venue Management";
$template['pDescription'] = "View Venue List"; $template['pDescription'] = "View Venue List";
$template['venue_data'] = $this->Venue_model->getVenueData(); $provider_id = '';
if($this->session->userdata['user_type'] == 2){
$provider_id = $this->session->userdata['id'];
}
$template['venue_data'] = $this->Venue_model->getVenueData('','',$provider_id);
$this->load->view('template',$template); $this->load->view('template',$template);
} }
...@@ -127,6 +131,9 @@ class Venue extends CI_Controller { ...@@ -127,6 +131,9 @@ class Venue extends CI_Controller {
unset($_POST['locality'],$_POST['locality_type'],$_POST['has_layout'],$_POST['seat_color'], unset($_POST['locality'],$_POST['locality_type'],$_POST['has_layout'],$_POST['seat_color'],
$_POST['seat_price'],$_POST['seat_capacity'],$_POST['locality_ar']); $_POST['seat_price'],$_POST['seat_capacity'],$_POST['locality_ar']);
if($this->session->userdata['user_type'] == 2){
$_POST['provider_id'] = $this->session->userdata['id'];
}
$status = $this->Venue_model->createVenue($_POST,$locality); $status = $this->Venue_model->createVenue($_POST,$locality);
if($status == 1){ if($status == 1){
$flashMsg['class'] = 'success'; $flashMsg['class'] = 'success';
......
...@@ -131,24 +131,35 @@ ...@@ -131,24 +131,35 @@
return (!empty($settings))?$settings->row_array():''; return (!empty($settings))?$settings->row_array():'';
} }
// function resizeImage($file=array()){ function roleManagement(){
// if(empty($file) || ($size = $file['size']/1024) < 100 || $CI = & get_instance();
// empty($info = getimagesize($file['tmp_name'])) || $info['mime'] == 'image/gif'){ $menus = array();
// return false; $userType = $CI->session->userdata['user_type'];
// } switch($userType){
// $resize = 100 - ((100/$size)*100); /* ADD => 1 EDIT => 2 DELETE => 3 CHANGE_STATUS => 4 */
// pre($resize); case 1:
$menus = array('Dashboard'=>array(1,2,3,4),'Tag'=>array(1,2,3,4),'Host'=>array(1,2,3,4),
// if ($info['mime'] == 'image/jpeg') { 'CMS'=>array(1,2,3,4),'Event'=>array(1,2,3,4),'Organizer'=>array(1,2,3,4),
// $fname = 'assets/uploads/services/img_upload_'.time().'.jpg'; 'Checker'=>array(1,2,3,4),'Category'=>array(1,2,3,4),
// $image = imagecreatefromjpeg($file['tmp_name']); 'Venue'=>array(1,2,3,4),'Staff'=>array(1,2,3,4),'City'=>array(1,2,3,4),
// imagejpeg($image,$fname,$resize); 'Customer'=>array(1,2,3,4),'Booking'=>array(1,2,3,4),
// } 'Commission'=>array(1,2,3,4),'Notification'=>array(1,2,3,4),
// else if ($info['mime'] == 'image/png') { 'Settings'=>array(1,2,3,4));
// $fname = 'assets/uploads/services/img_upload_'.time().'.png'; break;
// $image = imagecreatefromjpeg($file['tmp_name']); case 2:
// imagepng($image,$fname,$resize); $menus = array('Dashboard'=>array(1,2,3,4),'Tag'=>array(),'Host'=>array(1),
// } 'City'=>array(),'Category'=>array(),'Venue'=>array(1,2,3,4),
// return $fname; 'Event'=>array(1,2,3,4),'Checker'=>array(1,2,3,4),
// } 'Customer'=>array(),'Booking'=>array(1,2,3,4));
break;
case 4:
$menus = array('Dashboard'=>array(1,2,3,4),'Tag'=>array(1,2,3,4),'Host'=>array(1,2,3,4),
'City'=>array(1,2,3,4),'Category'=>array(1,2,3,4),'Venue'=>array(1,2,3,4),
'Event'=>array(1,2,3,4),'Checker'=>array(1,2,3,4),
'Organizer'=>array(1,2,3,4),'Customer'=>array(1,2,3,4),
'Booking'=>array(1,2,3,4),'Notification'=>array(1,2,3,4));
break;
}
return $menus;
}
?> ?>
\ No newline at end of file
...@@ -4,7 +4,7 @@ class Customer_model extends CI_Model { ...@@ -4,7 +4,7 @@ class Customer_model extends CI_Model {
parent::_construct(); parent::_construct();
} }
public function getCustomerData($customer_id='',$view=''){ public function getCustomerData($customer_id='',$view='',$provider_id=''){
$cond = (!empty($view))?" USR.status IN ($view) ":" USR.status != '2' "; $cond = (!empty($view))?" USR.status IN ($view) ":" USR.status != '2' ";
$cond .= (!empty($customer_id))?" AND CUST.customer_id='$customer_id' ":""; $cond .= (!empty($customer_id))?" AND CUST.customer_id='$customer_id' ":"";
...@@ -14,6 +14,16 @@ class Customer_model extends CI_Model { ...@@ -14,6 +14,16 @@ class Customer_model extends CI_Model {
INNER JOIN users AS USR ON (USR.id=CUST.customer_id) INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE $cond"; WHERE $cond";
if(!empty($provider_id)){
$sql = "SELECT CUST.customer_id,CUST.name,CUST.email,CUST.phone,CUST.email,CUST.gender,
CUST.dob,CUST.profile_city,CUST.reset_key,CUST.social_id,
CUST.profile_image,USR.status
FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN booking AS BOK ON (BOK.customer_id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
WHERE $cond AND EVT.provider_id='$provider_id' AND BOK.status!='4'";
}
$customerData = $this->db->query($sql); $customerData = $this->db->query($sql);
if(!empty($customerData)){ if(!empty($customerData)){
...@@ -37,20 +47,17 @@ class Customer_model extends CI_Model { ...@@ -37,20 +47,17 @@ class Customer_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='".$customer_data['email']."' AND WHERE status!='2' AND username='".$customer_data['email']."' AND user_type='3'");
user_type='3'");
if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 4; if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 4;
$emailChk = $this->db->query("SELECT * FROM customer AS CUST $emailChk = $this->db->query("SELECT * FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id) INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE USR.status!='2' AND CUST.email='".$customer_data['email']."' AND WHERE USR.status!='2' AND CUST.email='".$customer_data['email']."' AND USR.user_type='3'");
USR.user_type='3'");
if(!empty($emailChk) && $emailChk->num_rows() > 0) return 2; if(!empty($emailChk) && $emailChk->num_rows() > 0) return 2;
$phoneChk = $this->db->query("SELECT * FROM customer AS CUST $phoneChk = $this->db->query("SELECT * FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id) INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE USR.status!='2' AND CUST.phone='".$customer_data['phone']."' AND WHERE USR.status!='2' AND CUST.phone='".$customer_data['phone']."' AND USR.user_type='3'");
USR.user_type='3'");
if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3; if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3;
$status = $this->db->insert('users', $status = $this->db->insert('users',
......
...@@ -4,9 +4,10 @@ class Venue_model extends CI_Model { ...@@ -4,9 +4,10 @@ class Venue_model extends CI_Model {
parent::_construct(); parent::_construct();
} }
public function getVenueData($venue_id='',$view=''){ public function getVenueData($venue_id='',$view='',$provider_id=''){
$cond = (!empty($view))?" VNE.status IN ($view) ":" VNE.status != '2' "; $cond = (!empty($view))?" VNE.status IN ($view) ":" VNE.status != '2' ";
$cond .= (!empty($venue_id))?" AND VNE.id='$venue_id' ":""; $cond .= (!empty($venue_id))?" AND VNE.id='$venue_id' ":"";
$cond .= (!empty($provider_id))?" AND VNE.provider_id='$provider_id' ":"";
$sql = "SELECT VNE.id AS venue_id,VNE.*,REG.name AS region_name,HST.host_category,HST.show_layout $sql = "SELECT VNE.id AS venue_id,VNE.*,REG.name AS region_name,HST.host_category,HST.show_layout
FROM venue AS VNE FROM venue AS VNE
......
...@@ -976,6 +976,7 @@ class Webservice_model extends CI_Model { ...@@ -976,6 +976,7 @@ class Webservice_model extends CI_Model {
$squence = str_pad($squence,4,0,STR_PAD_LEFT); $squence = str_pad($squence,4,0,STR_PAD_LEFT);
$post_data['bookId'] = $code.$ymd.$squence; $post_data['bookId'] = $code.$ymd.$squence;
$post_data['qrcode'] = genQRcode($post_data['bookId']); $post_data['qrcode'] = genQRcode($post_data['bookId']);
$post_data['booking_date'] = date('Y-m-d H:i:s');
$rs = $this->db->insert('booking', $post_data); $rs = $this->db->insert('booking', $post_data);
$id = $this->db->insert_id(); $id = $this->db->insert_id();
if($id){ if($id){
......
<?php
$role = roleManagement();
$pAccess = $role['Category'];
?>
<div class="content-wrapper" > <div class="content-wrapper" >
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
...@@ -28,9 +33,11 @@ ...@@ -28,9 +33,11 @@
<div class="box-header with-border"> <div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Category List</h3></div> <div class="col-md-6"><h3 class="box-title">Category List</h3></div>
<div class="col-md-6" align="right"> <div class="col-md-6" align="right">
<?php if(in_array('1',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Category/addCategory') ?>"> <a class="btn btn-sm btn-primary" href="<?= base_url('Category/addCategory') ?>">
Add New Category Add New Category
</a> </a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a> <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div> </div>
</div> </div>
...@@ -44,7 +51,9 @@ ...@@ -44,7 +51,9 @@
<th width="110px;">Category (Ar)</th> <th width="110px;">Category (Ar)</th>
<th width="200px;">Category Description</th> <th width="200px;">Category Description</th>
<th width="60px;">Status</th> <th width="60px;">Status</th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<th width="200px;">Action</th> <th width="200px;">Action</th>
<?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -64,24 +73,33 @@ ...@@ -64,24 +73,33 @@
<th class="center" id="statusFlag_<?= $category->cat_id ?>"> <th class="center" id="statusFlag_<?= $category->cat_id ?>">
<?= ($category->status == 1)?'Active':'De-activate' ?> <?= ($category->status == 1)?'Active':'De-activate' ?>
</th> </th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<td class="center"> <td class="center">
<?php if(in_array('2',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="<?= base_url('Category/editCategory/'.encode_param($category->cat_id))?>"> href="<?= base_url('Category/editCategory/'.encode_param($category->cat_id))?>">
<i class="fa fa-fw fa-edit"></i>Edit <i class="fa fa-fw fa-edit"></i>Edit
</a> </a>
<?php } ?>
<?php if(in_array('3',$pAccess)){ ?>
<a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Category/changeStatus',{'category_id':'<?=encode_param($category->cat_id)?>'})" <a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Category/changeStatus',{'category_id':'<?=encode_param($category->cat_id)?>'})"
status="2"><i class="fa fa-fw fa-trash"></i>Delete status="2"><i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<?php } ?>
<?php <?php
$status=0; $btnClass='btn-warning'; $btnName='De-activate'; $status=0; $btnClass='btn-warning'; $btnName='De-activate';
if($category->status != 1){ if($category->status != 1){
$status=1; $btnClass='btn-success'; $btnName='Activate'; $status=1; $btnClass='btn-success'; $btnName='Activate';
} }
?> ?>
<?php if(in_array('4',$pAccess)){ ?>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Category/changeStatus',{'category_id':'<?= encode_param($category->cat_id) ?>'})" status="<?= $status ?>" status_id="<?= $category->cat_id ?>"> <a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Category/changeStatus',{'category_id':'<?= encode_param($category->cat_id) ?>'})" status="<?= $status ?>" status_id="<?= $category->cat_id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
<?php } ?>
</tr> </tr>
<?php } } ?> <?php } } ?>
</tbody> </tbody>
......
<?php
$role = roleManagement();
$pAccess = $role['Customer'];
?>
<div class="content-wrapper" > <div class="content-wrapper" >
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
...@@ -28,9 +33,11 @@ ...@@ -28,9 +33,11 @@
<div class="box-header with-border"> <div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Customer List</h3></div> <div class="col-md-6"><h3 class="box-title">Customer List</h3></div>
<div class="col-md-6" align="right"> <div class="col-md-6" align="right">
<?php if(in_array('1',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Customer/addCustomer')?>"> <a class="btn btn-sm btn-primary" href="<?= base_url('Customer/addCustomer')?>">
Add New Customer Add New Customer
</a> </a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a> <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div> </div>
</div> </div>
...@@ -39,7 +46,7 @@ ...@@ -39,7 +46,7 @@
<thead> <thead>
<tr> <tr>
<th class="hidden">ID</th> <th class="hidden">ID</th>
<th width="100px;">Customer Name</th> <th width="140px;">Customer Name</th>
<th width="110px;">Email</th> <th width="110px;">Email</th>
<th width="70px;">Phone</th> <th width="70px;">Phone</th>
<th width="100px;">City</th> <th width="100px;">City</th>
...@@ -64,22 +71,24 @@ ...@@ -64,22 +71,24 @@
<a class="btn btn-sm btn-info" id="viewCustomer" customer_id="<?= encode_param($customer->customer_id) ?>"> <a class="btn btn-sm btn-info" id="viewCustomer" customer_id="<?= encode_param($customer->customer_id) ?>">
<i class="fa fa-fw fa-eye"></i>View <i class="fa fa-fw fa-eye"></i>View
</a> </a>
<?php if(in_array('2',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="<?= base_url('Customer/editCustomers/'.encode_param($customer->customer_id)) ?>"> href="<?= base_url('Customer/editCustomers/'.encode_param($customer->customer_id)) ?>">
<i class="fa fa-fw fa-edit"></i>Edit <i class="fa fa-fw fa-edit"></i>Edit
</a> </a>
<?php <?php } if(in_array('3',$pAccess)){ ?>
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($customer->status != 1){
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
}
?>
<a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Customer/changeStatus',{'customer_id':'<?=encode_param($customer->customer_id)?>'})" <a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Customer/changeStatus',{'customer_id':'<?=encode_param($customer->customer_id)?>'})"
status="2"><i class="fa fa-fw fa-trash"></i>Delete status="2"><i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<?php }
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($customer->status != 1){
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
} if(in_array('4',$pAccess)){ ?>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Customer/changeStatus',{'customer_id':'<?= encode_param($customer->customer_id) ?>'})" status="<?= $status ?>" status_id="<?= $customer->customer_id ?>"> <a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Customer/changeStatus',{'customer_id':'<?= encode_param($customer->customer_id) ?>'})" status="<?= $status ?>" status_id="<?= $customer->customer_id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
</tr> </tr>
<?php } } ?> <?php } } ?>
......
...@@ -97,10 +97,12 @@ ...@@ -97,10 +97,12 @@
$status = 1; $btnName = 'Approve'; $btnClass = 'btn-info'; $status = 1; $btnName = 'Approve'; $btnClass = 'btn-info';
break; break;
} }
?> if($this->session->userdata['user_type'] == 1 ||
($this->session->userdata['user_type'] == 2 && $event->event_status != 3)){ ?>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Event/changeStatus',{'event_id':'<?= encode_param($event->event_id) ?>'})" status="<?= $status ?>" status_id="<?= $event->event_id ?>"> <a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Event/changeStatus',{'event_id':'<?= encode_param($event->event_id) ?>'})" status="<?= $status ?>" status_id="<?= $event->event_id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
</tr> </tr>
<?php } } ?> <?php } } ?>
......
<?php
$role = roleManagement();
$pAccess = $role['Host'];
?>
<div class="content-wrapper" > <div class="content-wrapper" >
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
...@@ -28,9 +33,11 @@ ...@@ -28,9 +33,11 @@
<div class="box-header with-border"> <div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Host Category List</h3></div> <div class="col-md-6"><h3 class="box-title">Host Category List</h3></div>
<div class="col-md-6" align="right"> <div class="col-md-6" align="right">
<?php if(in_array('1',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Host/addHostCategory') ?>"> <a class="btn btn-sm btn-primary" href="<?= base_url('Host/addHostCategory') ?>">
Add Host Category Add Host Category
</a> </a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a> <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div> </div>
</div> </div>
...@@ -39,10 +46,12 @@ ...@@ -39,10 +46,12 @@
<thead> <thead>
<tr> <tr>
<th width="80px;">Host ID</th> <th width="80px;">Host ID</th>
<th width="250px;">Host Category</th> <th width="200px;">Host Category</th>
<th width="80px;">Show Layout</th> <th width="130px;">Show Layout</th>
<th width="100px;">Status</th> <th width="100px;">Status</th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){ ?>
<th width="250px;">Action</th> <th width="250px;">Action</th>
<?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -58,24 +67,33 @@ ...@@ -58,24 +67,33 @@
<th class="center" id="statusFlag_<?= $host->host_cat_id ?>"> <th class="center" id="statusFlag_<?= $host->host_cat_id ?>">
<?= ($host->status == 1)?'Active':'De-activate' ?> <?= ($host->status == 1)?'Active':'De-activate' ?>
</th> </th>
<td class="center"> <?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?> <td class="center">
<?php if(in_array('2',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="<?= base_url('Host/editHostCategory/'.encode_param($host->host_cat_id))?>"> href="<?= base_url('Host/editHostCategory/'.encode_param($host->host_cat_id))?>">
<i class="fa fa-fw fa-edit"></i>Edit <i class="fa fa-fw fa-edit"></i>Edit
</a> </a>
<?php <?php } ?>
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($host->status != 1){ <?php if(in_array('3',$pAccess)){ ?>
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
}
?>
<a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Host/changeStatus',{'host_id':'<?=encode_param($host->host_cat_id)?>'})" <a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Host/changeStatus',{'host_id':'<?=encode_param($host->host_cat_id)?>'})"
status="2"><i class="fa fa-fw fa-trash"></i>Delete status="2"><i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Host/changeStatus',{'host_id':'<?= encode_param($host->host_cat_id) ?>'})" status="<?= $status ?>" status_id="<?= $host->host_cat_id ?>"> <?php } ?>
<?php if(in_array('4',$pAccess)){
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($host->status != 1){
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
} ?>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Host/changeStatus',{'host_id':'<?= encode_param($host->host_cat_id) ?>'})"
status="<?= $status ?>" status_id="<?= $host->host_cat_id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
<?php } ?>
</tr> </tr>
<?php } } ?> <?php } } ?>
</tbody> </tbody>
......
<?php
$role = roleManagement();
$pAccess = $role['City'];
?>
<div class="content-wrapper" > <div class="content-wrapper" >
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
...@@ -28,9 +33,11 @@ ...@@ -28,9 +33,11 @@
<div class="box-header with-border"> <div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Region List</h3></div> <div class="col-md-6"><h3 class="box-title">Region List</h3></div>
<div class="col-md-6" align="right"> <div class="col-md-6" align="right">
<?php if(in_array('1',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Region/addRegion') ?>"> <a class="btn btn-sm btn-primary" href="<?= base_url('Region/addRegion') ?>">
Add New Region Add New Region
</a> </a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a> <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div> </div>
</div> </div>
...@@ -43,7 +50,9 @@ ...@@ -43,7 +50,9 @@
<th width="125px;">Region (English)</th> <th width="125px;">Region (English)</th>
<th width="125px;">Region (Arabic)</th> <th width="125px;">Region (Arabic)</th>
<th width="100px;">Status</th> <th width="100px;">Status</th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<th width="200px;">Action</th> <th width="200px;">Action</th>
<?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -62,24 +71,33 @@ ...@@ -62,24 +71,33 @@
<th class="center" id="statusFlag_<?= $region->id ?>"> <th class="center" id="statusFlag_<?= $region->id ?>">
<?= ($region->status == 1)?'Active':'De-activate' ?> <?= ($region->status == 1)?'Active':'De-activate' ?>
</th> </th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<td class="center"> <td class="center">
<?php if(in_array('2',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="<?= base_url('Region/editRegion/'.encode_param($region->id))?>"> href="<?= base_url('Region/editRegion/'.encode_param($region->id))?>">
<i class="fa fa-fw fa-edit"></i>Edit <i class="fa fa-fw fa-edit"></i>Edit
</a> </a>
<?php <?php } ?>
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($region->status != 1){ <?php if(in_array('3',$pAccess)){ ?>
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
}
?>
<a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Region/changeStatus',{'region_id':'<?=encode_param($region->id)?>'})" <a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Region/changeStatus',{'region_id':'<?=encode_param($region->id)?>'})"
status="2"><i class="fa fa-fw fa-trash"></i>Delete status="2"><i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Region/changeStatus',{'region_id':'<?= encode_param($region->id) ?>'})" status="<?= $status ?>" status_id="<?= $region->id ?>"> <?php } ?>
<?php if(in_array('4',$pAccess)){
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($region->status != 1){
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
} ?>
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Region/changeStatus',{'region_id':'<?= encode_param($region->id) ?>'})"
status="<?= $status ?>" status_id="<?= $region->id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
<?php } ?>
</tr> </tr>
<?php } } ?> <?php } } ?>
</tbody> </tbody>
......
<?php
$role = roleManagement();
$pAccess = $role['Tag'];
?>
<div class="content-wrapper" > <div class="content-wrapper" >
<!-- Content Header (Page header) --> <!-- Content Header (Page header) -->
<section class="content-header"> <section class="content-header">
...@@ -28,9 +33,11 @@ ...@@ -28,9 +33,11 @@
<div class="box-header with-border"> <div class="box-header with-border">
<div class="col-md-6"><h3 class="box-title">Tag List</h3></div> <div class="col-md-6"><h3 class="box-title">Tag List</h3></div>
<div class="col-md-6" align="right"> <div class="col-md-6" align="right">
<?php if(in_array('1',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" href="<?= base_url('Tag/addTags') ?>"> <a class="btn btn-sm btn-primary" href="<?= base_url('Tag/addTags') ?>">
Add New Tag Add New Tag
</a> </a>
<?php } ?>
<a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a> <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
</div> </div>
</div> </div>
...@@ -42,7 +49,9 @@ ...@@ -42,7 +49,9 @@
<th width="150px;">Tag (English)</th> <th width="150px;">Tag (English)</th>
<th width="150px;">Tag (Arabic)</th> <th width="150px;">Tag (Arabic)</th>
<th width="100px;">Status</th> <th width="100px;">Status</th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<th width="200px;">Action</th> <th width="200px;">Action</th>
<?php } ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -56,24 +65,32 @@ ...@@ -56,24 +65,32 @@
<th class="center" id="statusFlag_<?= $tag->tag_id ?>"> <th class="center" id="statusFlag_<?= $tag->tag_id ?>">
<?= ($tag->status == 1)?'Active':'De-activate' ?> <?= ($tag->status == 1)?'Active':'De-activate' ?>
</th> </th>
<?php if(in_array('2',$pAccess)||in_array('3',$pAccess)||in_array('4',$pAccess)){?>
<td class="center"> <td class="center">
<?php if(in_array('2',$pAccess)){ ?>
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="<?= base_url('Tag/editTags/'.encode_param($tag->tag_id))?>"> href="<?= base_url('Tag/editTags/'.encode_param($tag->tag_id))?>">
<i class="fa fa-fw fa-edit"></i>Edit <i class="fa fa-fw fa-edit"></i>Edit
</a> </a>
<?php } ?>
<?php if(in_array('3',$pAccess)){ ?>
<a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Tag/changeStatus',{'tag_id':'<?= encode_param($tag->tag_id) ?>'})" status="2"> <a class="btn btn-sm btn-danger" onclick="confirmDelete(jQuery(this),'Tag/changeStatus',{'tag_id':'<?= encode_param($tag->tag_id) ?>'})" status="2">
<i class="fa fa-fw fa-trash"></i>Delete <i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<?php <?php } ?>
<?php if(in_array('4',$pAccess)){
$status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning'; $status = 0; $btnName = 'De-activate'; $btnClass = 'btn-warning';
if($tag->status != 1){ if($tag->status != 1){
$status = 1; $btnName = 'Activate'; $btnClass = 'btn-success'; $status = 1; $btnName = 'Activate'; $btnClass = 'btn-success';
} } ?>
?> <a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Tag/changeStatus',{'tag_id':'<?= encode_param($tag->tag_id) ?>'})"
<a class="btn btn-sm <?= $btnClass ?>" onclick="updateStatus(jQuery(this),'Tag/changeStatus',{'tag_id':'<?= encode_param($tag->tag_id) ?>'})" status="<?= $status ?>" status_id="<?= $tag->tag_id ?>"> status="<?= $status ?>" status_id="<?= $tag->tag_id ?>">
<i class="fa fa-cog"><?= $btnName ?></i> <i class="fa fa-cog"><?= $btnName ?></i>
</a> </a>
<?php } ?>
</td> </td>
<?php } ?>
</tr> </tr>
<?php } } ?> <?php } } ?>
</tbody> </tbody>
......
<?php <?php
// ROLE MANAGEMENT \\ $menus = roleManagement();
$menus = array();
$userType = $this->session->userdata['user_type'];
switch($userType){
case 1:
$menus = array('Dashboard','Tag','Host','City','Category','Venue','Event','Organizer',
'Checker','Customer','Booking','Commission','Staff','CMS',
'Notification','Settings');
break;
case 2:
$menus = array('Dashboard','Tag','Host','City','Category','Venue','Event','Checker',
'Customer','Booking');
break;
case 4:
$menus = array('Dashboard','Tag','Host','City','Category','Venue','Event','Checker',
'Organizer','Customer','Booking','Notification');
break;
}
?> ?>
<aside class="main-sidebar"> <aside class="main-sidebar">
...@@ -32,21 +14,21 @@ ...@@ -32,21 +14,21 @@
</div> </div>
</div> </div>
<ul class="sidebar-menu"> <ul class="sidebar-menu">
<?php if(in_array('Dashboard',$menus)){ ?> <?php if(array_key_exists('Dashboard',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Dashboard') ?>"> <a href="<?= base_url('Dashboard') ?>">
<img src="<?=base_url("assets/images/m1.png") ?>"> <img src="<?=base_url("assets/images/m1.png") ?>">
<span>Dashboard</span> <span>Dashboard</span>
</a> </a>
</li> </li>
<?php } if(in_array('Tag',$menus)){ ?> <?php } if(array_key_exists('Tag',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Tag/listTags') ?>"> <a href="<?= base_url('Tag/listTags') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>"> <img src="<?=base_url("assets/images/m2.png") ?>">
<span>Tag Management</span> <span>Tag Management</span>
</a> </a>
</li> </li>
<?php } if(in_array('Host',$menus)){ ?> <?php } if(array_key_exists('Host',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m3.png") ?>"> <img src="<?=base_url("assets/images/m3.png") ?>">
...@@ -68,21 +50,21 @@ ...@@ -68,21 +50,21 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('City',$menus)){ ?> <?php } if(array_key_exists('City',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Region/listRegion') ?>"> <a href="<?= base_url('Region/listRegion') ?>">
<img src="<?=base_url("assets/images/m4.png") ?>"> <img src="<?=base_url("assets/images/m4.png") ?>">
<span>City Management</span> <span>City Management</span>
</a> </a>
</li> </li>
<?php } if(in_array('Category',$menus)){ ?> <?php } if(array_key_exists('Category',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Category/listCategory') ?>"> <a href="<?= base_url('Category/listCategory') ?>">
<img src="<?=base_url("assets/images/m5.png") ?>"> <img src="<?=base_url("assets/images/m5.png") ?>">
<span>Category Management</span> <span>Category Management</span>
</a> </a>
</li> </li>
<?php } if(in_array('Venue',$menus)){ ?> <?php } if(array_key_exists('Venue',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m6.png") ?>"> <img src="<?=base_url("assets/images/m6.png") ?>">
...@@ -104,7 +86,7 @@ ...@@ -104,7 +86,7 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('Event',$menus)){ ?> <?php } if(array_key_exists('Event',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m7.png") ?>"> <img src="<?=base_url("assets/images/m7.png") ?>">
...@@ -126,7 +108,7 @@ ...@@ -126,7 +108,7 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('Organizer',$menus)){ ?> <?php } if(array_key_exists('Organizer',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m3.png") ?>"> <img src="<?=base_url("assets/images/m3.png") ?>">
...@@ -148,14 +130,14 @@ ...@@ -148,14 +130,14 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('Checker',$menus)){ ?> <?php } if(array_key_exists('Checker',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Checker/viewCheckers') ?>"> <a href="<?= base_url('Checker/viewCheckers') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>"> <img src="<?=base_url("assets/images/m2.png") ?>">
<span>Checker Management</span> <span>Checker Management</span>
</a> </a>
</li> </li>
<?php } if(in_array('Customer',$menus)){ ?> <?php } if(array_key_exists('Customer',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m9.png") ?>"> <img src="<?=base_url("assets/images/m9.png") ?>">
...@@ -163,12 +145,14 @@ ...@@ -163,12 +145,14 @@
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<?php if(in_array('1',$menus['Customer'])){ ?>
<li> <li>
<a href="<?= base_url('Customer/addCustomer') ?>"> <a href="<?= base_url('Customer/addCustomer') ?>">
<i class="fa fa-circle-o text-aqua"></i> <i class="fa fa-circle-o text-aqua"></i>
Add Customer Add Customer
</a> </a>
</li> </li>
<?php } ?>
<li> <li>
<a href="<?= base_url('Customer/viewCustomers') ?>"> <a href="<?= base_url('Customer/viewCustomers') ?>">
<i class="fa fa-circle-o text-aqua"></i> <i class="fa fa-circle-o text-aqua"></i>
...@@ -177,18 +161,18 @@ ...@@ -177,18 +161,18 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('Booking',$menus)){ ?> <?php } if(array_key_exists('Booking',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Booking/viewBookings') ?>"> <a href="<?= base_url('Booking/viewBookings') ?>">
<img src="<?=base_url("assets/images/m8.png") ?>"> <img src="<?=base_url("assets/images/m8.png") ?>">
<span>Booking Details</span></a> <span>Booking Details</span></a>
</li> </li>
<?php } if(in_array('',$menus)){ ?> <?php } if(array_key_exists('',$menus)){ ?>
<li><a href="<?= base_url('Provider/getProviderPayDetails') ?>"> <li><a href="<?= base_url('Provider/getProviderPayDetails') ?>">
<img src="<?=base_url("assets/images/m2.png") ?>"> <img src="<?=base_url("assets/images/m2.png") ?>">
<span>Commission Management</span></a> <span>Commission Management</span></a>
</li> </li>
<?php } if(in_array('Staff',$menus)){ ?> <?php } if(array_key_exists('Staff',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m9.png") ?>"> <img src="<?=base_url("assets/images/m9.png") ?>">
...@@ -210,7 +194,7 @@ ...@@ -210,7 +194,7 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('Notification',$menus)){ ?> <?php } if(array_key_exists('Notification',$menus)){ ?>
<li class="treeview"> <li class="treeview">
<a href="#"> <a href="#">
<img src="<?=base_url("assets/images/m2.png") ?>"> <img src="<?=base_url("assets/images/m2.png") ?>">
...@@ -232,14 +216,14 @@ ...@@ -232,14 +216,14 @@
</li> </li>
</ul> </ul>
</li> </li>
<?php } if(in_array('CMS',$menus)){ ?> <?php } if(array_key_exists('CMS',$menus)){ ?>
<li> <li>
<a href="<?= base_url('CMS') ?>"> <a href="<?= base_url('CMS') ?>">
<img src="<?=base_url("assets/images/m5.png") ?>"> <img src="<?=base_url("assets/images/m5.png") ?>">
<span>CMS Management</span> <span>CMS Management</span>
</a> </a>
</li> </li>
<?php } if(in_array('Settings',$menus)){ ?> <?php } if(array_key_exists('Settings',$menus)){ ?>
<li> <li>
<a href="<?= base_url('Settings') ?>"> <a href="<?= base_url('Settings') ?>">
<i class="fa fa-wrench" aria-hidden="true"> <i class="fa fa-wrench" aria-hidden="true">
......
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