Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
793d77b5
Commit
793d77b5
authored
May 14, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
4404870f
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
325 additions
and
208 deletions
+325
-208
Booking.php
application/controllers/Booking.php
+1
-7
Category.php
application/controllers/Category.php
+5
-0
Customer.php
application/controllers/Customer.php
+16
-7
Host.php
application/controllers/Host.php
+6
-1
Provider.php
application/controllers/Provider.php
+6
-6
Region.php
application/controllers/Region.php
+5
-0
Staff.php
application/controllers/Staff.php
+2
-2
Tag.php
application/controllers/Tag.php
+5
-0
User.php
application/controllers/User.php
+3
-3
Venue.php
application/controllers/Venue.php
+8
-1
generals_helper.php
application/helpers/generals_helper.php
+32
-20
Customer_model.php
application/models/Customer_model.php
+14
-7
Venue_model.php
application/models/Venue_model.php
+2
-1
Webservice_model.php
application/models/Webservice_model.php
+1
-0
viewCategoryList.php
application/views/Category/viewCategoryList.php
+40
-22
viewCustomer.php
application/views/Customer/viewCustomer.php
+27
-18
viewEventList.php
application/views/Event/viewEventList.php
+6
-4
viewHostCategories.php
application/views/Host/viewHostCategories.php
+42
-24
viewRegionList.php
application/views/Region/viewRegionList.php
+40
-22
viewTagList.php
application/views/Tag/viewTagList.php
+39
-22
left-menu.php
application/views/Templates/left-menu.php
+25
-41
No files found.
application/controllers/Booking.php
View file @
793d77b5
...
...
@@ -151,13 +151,7 @@ class Booking extends CI_Controller {
if
(
empty
(
$dataRow
)
||
empty
(
$fileName
)){
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\\
$temp_memory
=
fopen
(
'php://memory'
,
'w'
);
foreach
(
$dataRow
as
$line
)
{
...
...
application/controllers/Category.php
View file @
793d77b5
...
...
@@ -12,6 +12,11 @@ class Category extends CI_Controller {
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
$role
=
roleManagement
();
if
(
!
array_key_exists
(
'Category'
,
$role
)){
redirect
(
base_url
(
'Dashboard'
));
}
}
function
listCategory
(){
...
...
application/controllers/Customer.php
View file @
793d77b5
...
...
@@ -11,6 +11,11 @@ class Customer extends CI_Controller {
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
());
}
$role
=
roleManagement
();
if
(
!
array_key_exists
(
'Customer'
,
$role
)){
redirect
(
base_url
(
'Dashboard'
));
}
}
public
function
addCustomer
(){
...
...
@@ -31,7 +36,11 @@ class Customer extends CI_Controller {
$template
[
'pDescription'
]
=
"View and Manage Customers"
;
$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
);
}
...
...
@@ -144,15 +153,15 @@ class Customer extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/viewCustomers'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Email ID alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Email ID alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/addCustomer'
));
}
else
if
(
$status
==
3
){
$flashMsg
=
array
(
'message'
=>
'Phone Number alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Phone Number alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/addCustomer'
));
}
else
if
(
$status
==
4
){
$flashMsg
=
array
(
'message'
=>
'User Name alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'User Name alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/addCustomer'
));
}
else
{
...
...
@@ -232,15 +241,15 @@ class Customer extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/viewCustomers'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Email ID alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Email ID alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/editCustomers/'
.
$customer_id
));
}
else
if
(
$status
==
3
){
$flashMsg
=
array
(
'message'
=>
'Phone Number alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Phone Number alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/editCustomers/'
.
$customer_id
));
}
else
if
(
$status
==
4
){
$flashMsg
=
array
(
'message'
=>
'User Name alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'User Name alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/editCustomers/'
.
$customer_id
));
}
else
{
...
...
application/controllers/Host.php
View file @
793d77b5
...
...
@@ -2,7 +2,7 @@
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
class
Host
extends
CI_Controller
{
public
function
__construct
()
{
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Riyadh"
);
...
...
@@ -12,6 +12,11 @@ class Host extends CI_Controller {
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
$role
=
roleManagement
();
if
(
!
array_key_exists
(
'Host'
,
$role
)){
redirect
(
base_url
(
'Dashboard'
));
}
}
function
listHostCategory
(){
...
...
application/controllers/Provider.php
View file @
793d77b5
...
...
@@ -168,15 +168,15 @@ class Provider extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/viewProviders'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Email ID alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Email ID alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/addProvider'
));
}
else
if
(
$status
==
3
){
$flashMsg
=
array
(
'message'
=>
'Phone Number alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Phone Number alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/addProvider'
));
}
else
if
(
$status
==
4
){
$flashMsg
=
array
(
'message'
=>
'User Name alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'User Name alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/addProvider'
));
}
else
{
...
...
@@ -251,15 +251,15 @@ class Provider extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/viewProviders'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Email ID alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Email ID alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/editProviders/'
.
$provider_id
));
}
else
if
(
$status
==
3
){
$flashMsg
=
array
(
'message'
=>
'Phone Number alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Phone Number alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/editProviders/'
.
$provider_id
));
}
else
if
(
$status
==
4
){
$flashMsg
=
array
(
'message'
=>
'User Name alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'User Name alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/editProviders/'
.
$provider_id
));
}
else
{
...
...
application/controllers/Region.php
View file @
793d77b5
...
...
@@ -12,6 +12,11 @@ class Region extends CI_Controller {
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
$role
=
roleManagement
();
if
(
!
array_key_exists
(
'City'
,
$role
)){
redirect
(
base_url
(
'Dashboard'
));
}
}
function
listRegion
(){
...
...
application/controllers/Staff.php
View file @
793d77b5
...
...
@@ -118,7 +118,7 @@ class Staff extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Staff/viewStaffs'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Username (Email-ID) alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Username (Email-ID) alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Staff/addStaff'
));
}
else
{
...
...
@@ -185,7 +185,7 @@ class Staff extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Staff/viewStaffs'
));
}
else
if
(
$status
==
2
){
$flashMsg
=
array
(
'message'
=>
'Username (Email-ID) alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Username (Email-ID) alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Staff/editStaffs/'
.
$staff_id
));
}
else
{
...
...
application/controllers/Tag.php
View file @
793d77b5
...
...
@@ -12,6 +12,11 @@ class Tag extends CI_Controller {
if
(
!
$this
->
session
->
userdata
(
'logged_in'
))
{
redirect
(
base_url
(
'Login'
));
}
$role
=
roleManagement
();
if
(
!
array_key_exists
(
'Tag'
,
$role
)){
redirect
(
base_url
(
'Dashboard'
));
}
}
function
listTags
(){
...
...
application/controllers/User.php
View file @
793d77b5
...
...
@@ -151,15 +151,15 @@ class User extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'User/viewProfile'
));
}
else
if
(
$status
==
5
){
$flashMsg
=
array
(
'message'
=>
'Email ID alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Email ID alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'User/editProfile'
));
}
else
if
(
$status
==
6
){
$flashMsg
=
array
(
'message'
=>
'Phone Number alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'Phone Number alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'User/editProfile'
));
}
else
if
(
$status
==
4
){
$flashMsg
=
array
(
'message'
=>
'User Name alrady exist..!'
,
'class'
=>
'error'
);
$flashMsg
=
array
(
'message'
=>
'User Name alr
e
ady exist..!'
,
'class'
=>
'error'
);
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'User/editProfile'
));
}
else
{
...
...
application/controllers/Venue.php
View file @
793d77b5
...
...
@@ -21,7 +21,11 @@ class Venue extends CI_Controller {
$template
[
'pTitle'
]
=
"Venue Management"
;
$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
);
}
...
...
@@ -127,6 +131,9 @@ class Venue extends CI_Controller {
unset
(
$_POST
[
'locality'
],
$_POST
[
'locality_type'
],
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_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
);
if
(
$status
==
1
){
$flashMsg
[
'class'
]
=
'success'
;
...
...
application/helpers/generals_helper.php
View file @
793d77b5
...
...
@@ -131,24 +131,35 @@
return
(
!
empty
(
$settings
))
?
$settings
->
row_array
()
:
''
;
}
// function resizeImage($file=array()){
// if(empty($file) || ($size = $file['size']/1024) < 100 ||
// empty($info = getimagesize($file['tmp_name'])) || $info['mime'] == 'image/gif'){
// return false;
// }
// $resize = 100 - ((100/$size)*100);
// pre($resize);
// if ($info['mime'] == 'image/jpeg') {
// $fname = 'assets/uploads/services/img_upload_'.time().'.jpg';
// $image = imagecreatefromjpeg($file['tmp_name']);
// imagejpeg($image,$fname,$resize);
// }
// else if ($info['mime'] == 'image/png') {
// $fname = 'assets/uploads/services/img_upload_'.time().'.png';
// $image = imagecreatefromjpeg($file['tmp_name']);
// imagepng($image,$fname,$resize);
// }
// return $fname;
// }
function
roleManagement
(){
$CI
=
&
get_instance
();
$menus
=
array
();
$userType
=
$CI
->
session
->
userdata
[
'user_type'
];
switch
(
$userType
){
/* ADD => 1 EDIT => 2 DELETE => 3 CHANGE_STATUS => 4 */
case
1
:
$menus
=
array
(
'Dashboard'
=>
array
(
1
,
2
,
3
,
4
),
'Tag'
=>
array
(
1
,
2
,
3
,
4
),
'Host'
=>
array
(
1
,
2
,
3
,
4
),
'CMS'
=>
array
(
1
,
2
,
3
,
4
),
'Event'
=>
array
(
1
,
2
,
3
,
4
),
'Organizer'
=>
array
(
1
,
2
,
3
,
4
),
'Checker'
=>
array
(
1
,
2
,
3
,
4
),
'Category'
=>
array
(
1
,
2
,
3
,
4
),
'Venue'
=>
array
(
1
,
2
,
3
,
4
),
'Staff'
=>
array
(
1
,
2
,
3
,
4
),
'City'
=>
array
(
1
,
2
,
3
,
4
),
'Customer'
=>
array
(
1
,
2
,
3
,
4
),
'Booking'
=>
array
(
1
,
2
,
3
,
4
),
'Commission'
=>
array
(
1
,
2
,
3
,
4
),
'Notification'
=>
array
(
1
,
2
,
3
,
4
),
'Settings'
=>
array
(
1
,
2
,
3
,
4
));
break
;
case
2
:
$menus
=
array
(
'Dashboard'
=>
array
(
1
,
2
,
3
,
4
),
'Tag'
=>
array
(),
'Host'
=>
array
(
1
),
'City'
=>
array
(),
'Category'
=>
array
(),
'Venue'
=>
array
(
1
,
2
,
3
,
4
),
'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
application/models/Customer_model.php
View file @
793d77b5
...
...
@@ -4,7 +4,7 @@ class Customer_model extends CI_Model {
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
(
$customer_id
))
?
" AND CUST.customer_id='
$customer_id
' "
:
""
;
...
...
@@ -14,6 +14,16 @@ class Customer_model extends CI_Model {
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
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
);
if
(
!
empty
(
$customerData
)){
...
...
@@ -37,20 +47,17 @@ class Customer_model extends CI_Model {
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$customer_data
[
'email'
]
.
"' AND
user_type='3'"
);
WHERE status!='2' AND username='"
.
$customer_data
[
'email'
]
.
"' AND user_type='3'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
4
;
$emailChk
=
$this
->
db
->
query
(
"SELECT * FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE USR.status!='2' AND CUST.email='"
.
$customer_data
[
'email'
]
.
"' AND
USR.user_type='3'"
);
WHERE USR.status!='2' AND CUST.email='"
.
$customer_data
[
'email'
]
.
"' AND USR.user_type='3'"
);
if
(
!
empty
(
$emailChk
)
&&
$emailChk
->
num_rows
()
>
0
)
return
2
;
$phoneChk
=
$this
->
db
->
query
(
"SELECT * FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE USR.status!='2' AND CUST.phone='"
.
$customer_data
[
'phone'
]
.
"' AND
USR.user_type='3'"
);
WHERE USR.status!='2' AND CUST.phone='"
.
$customer_data
[
'phone'
]
.
"' AND USR.user_type='3'"
);
if
(
!
empty
(
$phoneChk
)
&&
$phoneChk
->
num_rows
()
>
0
)
return
3
;
$status
=
$this
->
db
->
insert
(
'users'
,
...
...
application/models/Venue_model.php
View file @
793d77b5
...
...
@@ -4,9 +4,10 @@ class Venue_model extends CI_Model {
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
(
$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
FROM venue AS VNE
...
...
application/models/Webservice_model.php
View file @
793d77b5
...
...
@@ -976,6 +976,7 @@ class Webservice_model extends CI_Model {
$squence
=
str_pad
(
$squence
,
4
,
0
,
STR_PAD_LEFT
);
$post_data
[
'bookId'
]
=
$code
.
$ymd
.
$squence
;
$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
);
$id
=
$this
->
db
->
insert_id
();
if
(
$id
){
...
...
application/views/Category/viewCategoryList.php
View file @
793d77b5
<?php
$role
=
roleManagement
();
$pAccess
=
$role
[
'Category'
];
?>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
...
...
@@ -28,9 +33,11 @@
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
><h3
class=
"box-title"
>
Category List
</h3></div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Category/addCategory'
)
?>
"
>
Add New Category
</a>
<?php
if
(
in_array
(
'1'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Category/addCategory'
)
?>
"
>
Add New Category
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
...
...
@@ -44,7 +51,9 @@
<th
width=
"110px;"
>
Category (Ar)
</th>
<th
width=
"200px;"
>
Category Description
</th>
<th
width=
"60px;"
>
Status
</th>
<th
width=
"200px;"
>
Action
</th>
<?php
if
(
in_array
(
'2'
,
$pAccess
)
||
in_array
(
'3'
,
$pAccess
)
||
in_array
(
'4'
,
$pAccess
)){
?>
<th
width=
"200px;"
>
Action
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
...
...
@@ -64,24 +73,33 @@
<th
class=
"center"
id=
"statusFlag_
<?=
$category
->
cat_id
?>
"
>
<?=
(
$category
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Category/editCategory/'
.
encode_param
(
$category
->
cat_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<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
</a>
<?php
$status
=
0
;
$btnClass
=
'btn-warning'
;
$btnName
=
'De-activate'
;
if
(
$category
->
status
!=
1
){
$status
=
1
;
$btnClass
=
'btn-success'
;
$btnName
=
'Activate'
;
}
?>
<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>
</a>
</td>
<?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"
href=
"
<?=
base_url
(
'Category/editCategory/'
.
encode_param
(
$category
->
cat_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</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
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
}
?>
<?php
$status
=
0
;
$btnClass
=
'btn-warning'
;
$btnName
=
'De-activate'
;
if
(
$category
->
status
!=
1
){
$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
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
<?php
}
?>
</td>
<?php
}
?>
</tr>
<?php
}
}
?>
</tbody>
...
...
application/views/Customer/viewCustomer.php
View file @
793d77b5
<?php
$role
=
roleManagement
();
$pAccess
=
$role
[
'Customer'
];
?>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
...
...
@@ -28,9 +33,11 @@
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
><h3
class=
"box-title"
>
Customer List
</h3></div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Customer/addCustomer'
)
?>
"
>
Add New Customer
</a>
<?php
if
(
in_array
(
'1'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Customer/addCustomer'
)
?>
"
>
Add New Customer
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
...
...
@@ -39,7 +46,7 @@
<thead>
<tr>
<th
class=
"hidden"
>
ID
</th>
<th
width=
"1
0
0px;"
>
Customer Name
</th>
<th
width=
"1
4
0px;"
>
Customer Name
</th>
<th
width=
"110px;"
>
Email
</th>
<th
width=
"70px;"
>
Phone
</th>
<th
width=
"100px;"
>
City
</th>
...
...
@@ -60,26 +67,28 @@
<th
class=
"center"
id=
"statusFlag_
<?=
$customer
->
customer_id
?>
"
>
<?=
(
$customer
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<td
class=
"center"
>
<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
</a>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Customer/editCustomers/'
.
encode_param
(
$customer
->
customer_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
<?php
if
(
in_array
(
'2'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Customer/editCustomers/'
.
encode_param
(
$customer
->
customer_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
}
if
(
in_array
(
'3'
,
$pAccess
)){
?>
<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
</a>
<?php
}
$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
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<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>
</a>
}
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
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
<?php
}
?>
</td>
</tr>
<?php
}
}
?>
...
...
application/views/Event/viewEventList.php
View file @
793d77b5
...
...
@@ -97,10 +97,12 @@
$status
=
1
;
$btnName
=
'Approve'
;
$btnClass
=
'btn-info'
;
break
;
}
?>
<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>
</a>
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
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
<?php
}
?>
</td>
</tr>
<?php
}
}
?>
...
...
application/views/Host/viewHostCategories.php
View file @
793d77b5
<?php
$role
=
roleManagement
();
$pAccess
=
$role
[
'Host'
];
?>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
...
...
@@ -28,9 +33,11 @@
<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"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Host/addHostCategory'
)
?>
"
>
Add Host Category
</a>
<?php
if
(
in_array
(
'1'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Host/addHostCategory'
)
?>
"
>
Add Host Category
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
...
...
@@ -39,10 +46,12 @@
<thead>
<tr>
<th
width=
"80px;"
>
Host ID
</th>
<th
width=
"2
5
0px;"
>
Host Category
</th>
<th
width=
"
8
0px;"
>
Show Layout
</th>
<th
width=
"2
0
0px;"
>
Host Category
</th>
<th
width=
"
13
0px;"
>
Show Layout
</th>
<th
width=
"100px;"
>
Status
</th>
<th
width=
"250px;"
>
Action
</th>
<?php
if
(
in_array
(
'2'
,
$pAccess
)
||
in_array
(
'3'
,
$pAccess
)
||
in_array
(
'4'
,
$pAccess
)){
?>
<th
width=
"250px;"
>
Action
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
...
...
@@ -58,24 +67,33 @@
<th
class=
"center"
id=
"statusFlag_
<?=
$host
->
host_cat_id
?>
"
>
<?=
(
$host
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Host/editHostCategory/'
.
encode_param
(
$host
->
host_cat_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$host
->
status
!=
1
){
$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
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</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
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
<?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"
href=
"
<?=
base_url
(
'Host/editHostCategory/'
.
encode_param
(
$host
->
host_cat_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
}
?>
<?php
if
(
in_array
(
'3'
,
$pAccess
)){
?>
<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
</a>
<?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>
</a>
<?php
}
?>
</td>
<?php
}
?>
</tr>
<?php
}
}
?>
</tbody>
...
...
application/views/Region/viewRegionList.php
View file @
793d77b5
<?php
$role
=
roleManagement
();
$pAccess
=
$role
[
'City'
];
?>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
...
...
@@ -28,9 +33,11 @@
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
><h3
class=
"box-title"
>
Region List
</h3></div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Region/addRegion'
)
?>
"
>
Add New Region
</a>
<?php
if
(
in_array
(
'1'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Region/addRegion'
)
?>
"
>
Add New Region
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
...
...
@@ -43,7 +50,9 @@
<th
width=
"125px;"
>
Region (English)
</th>
<th
width=
"125px;"
>
Region (Arabic)
</th>
<th
width=
"100px;"
>
Status
</th>
<th
width=
"200px;"
>
Action
</th>
<?php
if
(
in_array
(
'2'
,
$pAccess
)
||
in_array
(
'3'
,
$pAccess
)
||
in_array
(
'4'
,
$pAccess
)){
?>
<th
width=
"200px;"
>
Action
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
...
...
@@ -62,24 +71,33 @@
<th
class=
"center"
id=
"statusFlag_
<?=
$region
->
id
?>
"
>
<?=
(
$region
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Region/editRegion/'
.
encode_param
(
$region
->
id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$region
->
status
!=
1
){
$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
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</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
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
<?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"
href=
"
<?=
base_url
(
'Region/editRegion/'
.
encode_param
(
$region
->
id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<?php
}
?>
<?php
if
(
in_array
(
'3'
,
$pAccess
)){
?>
<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
</a>
<?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>
</a>
<?php
}
?>
</td>
<?php
}
?>
</tr>
<?php
}
}
?>
</tbody>
...
...
application/views/Tag/viewTagList.php
View file @
793d77b5
<?php
$role
=
roleManagement
();
$pAccess
=
$role
[
'Tag'
];
?>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
...
...
@@ -28,9 +33,11 @@
<div
class=
"box-header with-border"
>
<div
class=
"col-md-6"
><h3
class=
"box-title"
>
Tag List
</h3></div>
<div
class=
"col-md-6"
align=
"right"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Tag/addTags'
)
?>
"
>
Add New Tag
</a>
<?php
if
(
in_array
(
'1'
,
$pAccess
)){
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Tag/addTags'
)
?>
"
>
Add New Tag
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
()
?>
"
>
Back
</a>
</div>
</div>
...
...
@@ -42,7 +49,9 @@
<th
width=
"150px;"
>
Tag (English)
</th>
<th
width=
"150px;"
>
Tag (Arabic)
</th>
<th
width=
"100px;"
>
Status
</th>
<th
width=
"200px;"
>
Action
</th>
<?php
if
(
in_array
(
'2'
,
$pAccess
)
||
in_array
(
'3'
,
$pAccess
)
||
in_array
(
'4'
,
$pAccess
)){
?>
<th
width=
"200px;"
>
Action
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
...
...
@@ -56,24 +65,32 @@
<th
class=
"center"
id=
"statusFlag_
<?=
$tag
->
tag_id
?>
"
>
<?=
(
$tag
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Tag/editTags/'
.
encode_param
(
$tag
->
tag_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<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
</a>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$tag
->
status
!=
1
){
$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
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$tag
->
tag_id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
<?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"
href=
"
<?=
base_url
(
'Tag/editTags/'
.
encode_param
(
$tag
->
tag_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</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"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
}
?>
<?php
if
(
in_array
(
'4'
,
$pAccess
)){
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$tag
->
status
!=
1
){
$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
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$tag
->
tag_id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
<?php
}
?>
</td>
<?php
}
?>
</tr>
<?php
}
}
?>
</tbody>
...
...
application/views/Templates/left-menu.php
View file @
793d77b5
<?php
// ROLE MANAGEMENT \\
$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
;
}
$menus
=
roleManagement
();
?>
<aside
class=
"main-sidebar"
>
...
...
@@ -32,21 +14,21 @@
</div>
</div>
<ul
class=
"sidebar-menu"
>
<?php
if
(
in_array
(
'Dashboard'
,
$menus
)){
?>
<?php
if
(
array_key_exists
(
'Dashboard'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Dashboard'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m1.png"
)
?>
"
>
<span>
Dashboard
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Tag'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Tag'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Tag/listTags'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
<span>
Tag Management
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Host'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Host'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m3.png"
)
?>
"
>
...
...
@@ -68,21 +50,21 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'City'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'City'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Region/listRegion'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m4.png"
)
?>
"
>
<span>
City Management
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Category'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Category'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Category/listCategory'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m5.png"
)
?>
"
>
<span>
Category Management
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Venue'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Venue'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m6.png"
)
?>
"
>
...
...
@@ -104,7 +86,7 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'Event'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Event'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m7.png"
)
?>
"
>
...
...
@@ -126,7 +108,7 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'Organizer'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Organizer'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m3.png"
)
?>
"
>
...
...
@@ -148,14 +130,14 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'Checker'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Checker'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Checker/viewCheckers'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
<span>
Checker Management
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Customer'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Customer'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m9.png"
)
?>
"
>
...
...
@@ -163,12 +145,14 @@
<i
class=
"fa fa-angle-left pull-right"
></i>
</a>
<ul
class=
"treeview-menu"
>
<li>
<a
href=
"
<?=
base_url
(
'Customer/addCustomer'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Add Customer
</a>
</li>
<?php
if
(
in_array
(
'1'
,
$menus
[
'Customer'
])){
?>
<li>
<a
href=
"
<?=
base_url
(
'Customer/addCustomer'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
Add Customer
</a>
</li>
<?php
}
?>
<li>
<a
href=
"
<?=
base_url
(
'Customer/viewCustomers'
)
?>
"
>
<i
class=
"fa fa-circle-o text-aqua"
></i>
...
...
@@ -177,18 +161,18 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'Booking'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Booking'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Booking/viewBookings'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m8.png"
)
?>
"
>
<span>
Booking Details
</span></a>
</li>
<?php
}
if
(
in_array
(
''
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
''
,
$menus
)){
?>
<li><a
href=
"
<?=
base_url
(
'Provider/getProviderPayDetails'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
<span>
Commission Management
</span></a>
</li>
<?php
}
if
(
in_array
(
'Staff'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Staff'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m9.png"
)
?>
"
>
...
...
@@ -210,7 +194,7 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'Notification'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Notification'
,
$menus
)){
?>
<li
class=
"treeview"
>
<a
href=
"#"
>
<img
src=
"
<?=
base_url
(
"assets/images/m2.png"
)
?>
"
>
...
...
@@ -232,14 +216,14 @@
</li>
</ul>
</li>
<?php
}
if
(
in_array
(
'CMS'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'CMS'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'CMS'
)
?>
"
>
<img
src=
"
<?=
base_url
(
"assets/images/m5.png"
)
?>
"
>
<span>
CMS Management
</span>
</a>
</li>
<?php
}
if
(
in_array
(
'Settings'
,
$menus
)){
?>
<?php
}
if
(
array_key_exists
(
'Settings'
,
$menus
)){
?>
<li>
<a
href=
"
<?=
base_url
(
'Settings'
)
?>
"
>
<i
class=
"fa fa-wrench"
aria-hidden=
"true"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment