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
fb65dae3
Commit
fb65dae3
authored
6 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
dc See merge request
!37
parents
be3cd0f4
90058168
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
421 additions
and
350 deletions
+421
-350
Booking.php
application/controllers/Booking.php
+11
-12
Category.php
application/controllers/Category.php
+11
-10
Checker.php
application/controllers/Checker.php
+27
-33
Customer.php
application/controllers/Customer.php
+16
-15
Event.php
application/controllers/Event.php
+10
-10
Host.php
application/controllers/Host.php
+11
-10
Provider.php
application/controllers/Provider.php
+26
-27
Region.php
application/controllers/Region.php
+11
-11
Staff.php
application/controllers/Staff.php
+14
-13
Tag.php
application/controllers/Tag.php
+10
-10
Venue.php
application/controllers/Venue.php
+10
-10
Webservice.php
application/controllers/Webservice.php
+11
-10
Customer_model.php
application/models/Customer_model.php
+3
-3
viewBooking.php
application/views/Booking/viewBooking.php
+3
-5
viewCategoryList.php
application/views/Category/viewCategoryList.php
+15
-15
viewChecker.php
application/views/Checker/viewChecker.php
+15
-15
customerForm.php
application/views/Customer/customerForm.php
+1
-1
viewCustomer.php
application/views/Customer/viewCustomer.php
+17
-17
viewEventList.php
application/views/Event/viewEventList.php
+31
-30
viewHostCategories.php
application/views/Host/viewHostCategories.php
+16
-16
viewProvider.php
application/views/Provider/viewProvider.php
+16
-16
viewRegionList.php
application/views/Region/viewRegionList.php
+15
-15
viewStaff.php
application/views/Staff/viewStaff.php
+17
-16
viewTagList.php
application/views/Tag/viewTagList.php
+15
-15
viewVenueList.php
application/views/Venue/viewVenueList.php
+15
-15
custom-script.js
assets/js/custom-script.js
+74
-0
No files found.
application/controllers/Booking.php
View file @
fb65dae3
...
...
@@ -42,18 +42,17 @@ class Booking extends CI_Controller {
echo
$viewPage
;
exit
;
}
function
changeStatus
(
$booking_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$booking_id
)
||
!
is_numeric
(
$booking_id
=
decode_param
(
$booking_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Booking/viewBookings'
));
}
$status
=
$this
->
Booking_model
->
changeStatus
(
$booking_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
}
redirect
(
base_url
(
'Booking/viewBookings'
));
}
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'booking_id'
])
||
empty
(
$_POST
[
'booking_id'
])){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$booking_id
=
decode_param
(
$_POST
[
'booking_id'
]);
$resp
=
$this
->
Booking_model
->
changeStatus
(
$booking_id
,
'4'
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
function
generateReport
(){
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Category.php
View file @
fb65dae3
...
...
@@ -189,18 +189,18 @@ class Category extends CI_Controller {
redirect
(
base_url
(
'Category/editCategory/'
.
$category_id
));
}
function
changeStatus
(
$category_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$category_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Category/listCategory'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'category_id'
])
||
empty
(
$_POST
[
'category_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$category_id
=
decode_param
(
$category_id
);
$status
=
$this
->
Category_model
->
changeStatus
(
$category_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$status
=
$_POST
[
'status'
];
$category_id
=
decode_param
(
$_POST
[
'category_id'
]);
$resp
=
$this
->
Category_model
->
changeStatus
(
$category_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Category/listCategory'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/controllers/Checker.php
View file @
fb65dae3
...
...
@@ -107,44 +107,37 @@ class Checker extends CI_Controller {
redirect
(
base_url
(
'Checker/addChecker'
));
}
function
changeStatus
(
$checker_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$checker_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Checker/viewCheckers'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'checker_id'
])
||
empty
(
$_POST
[
'checker_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$checker_id
=
decode_param
(
$checker_id
);
$status
=
$_POST
[
'status'
];
$checker_id
=
decode_param
(
$_POST
[
'checker_id'
]);
$resp
=
$this
->
Checker_model
->
changeStatus
(
$checker_id
,
$status
);
if
(
!
$resp
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
}
else
{
if
(
$status
==
1
){
$this
->
load
->
model
(
'Api_model'
);
$checkerData
=
$this
->
db
->
get_where
(
'checker'
,
array
(
'id'
=>
$checker_id
))
->
row
();
if
(
!
empty
(
$checkerData
)){
$subject
=
"Your Checker Account is now activated"
;
$email_id
=
$checkerData
->
username
;
$message
=
"<html>
<body>
Your Checker Account for the username
<strong>"
.
$email_id
.
"</strong> is now activated.
</body>
</html>"
;
$template
=
getNotifTemplate
();
if
(
isset
(
$template
[
'checker_activation_mail'
])
&&
!
empty
(
$template
[
'checker_activation_mail'
])){
$message
=
str_replace
(
array
(
'{:user_name}'
),
array
(
$email_id
),
$template
[
'checker_activation_mail'
]);
}
$this
->
Api_model
->
send_mail
(
$subject
,
$email_id
,
$message
);
if
(
$resp
){
$this
->
load
->
model
(
'Api_model'
);
$checkerData
=
$this
->
db
->
get_where
(
'checker'
,
array
(
'id'
=>
$checker_id
))
->
row
();
if
(
!
empty
(
$checkerData
)){
$subject
=
"Your Checker Account is now activated"
;
$email_id
=
$checkerData
->
username
;
$message
=
"<html><body>Your Checker Account for the username
<strong>"
.
$email_id
.
"</strong> is now activated.</body></html>"
;
$template
=
getNotifTemplate
();
if
(
isset
(
$template
[
'checker_activation_mail'
])
&&
!
empty
(
$template
[
'checker_activation_mail'
])){
$message
=
str_replace
(
array
(
'{:user_name}'
),
array
(
$email_id
),
$template
[
'checker_activation_mail'
]);
}
$this
->
Api_model
->
send_mail
(
$subject
,
$email_id
,
$message
);
}
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Checker/viewCheckers'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/controllers/Customer.php
View file @
fb65dae3
...
...
@@ -53,19 +53,20 @@ class Customer extends CI_Controller {
$resArr
[
'data'
]
=
$mechData
;
echo
json_encode
(
$resArr
);
exit
;
}
function
changeStatus
(
$customer_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$customer_id
)
||
!
is_numeric
(
$customer_id
=
decode_param
(
$customer_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Customer/viewCustomers'
));
}
$status
=
$this
->
Customer_model
->
changeStatus
(
$customer_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
}
redirect
(
base_url
(
'Customer/viewCustomers'
));
}
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'customer_id'
])
||
empty
(
$_POST
[
'customer_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$status
=
$_POST
[
'status'
];
$customer_id
=
decode_param
(
$_POST
[
'customer_id'
]);
$resp
=
$this
->
Customer_model
->
changeStatus
(
$customer_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
public
function
createCustomer
(){
$err
=
0
;
...
...
@@ -84,7 +85,7 @@ class Customer extends CI_Controller {
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'phone'
])
||
empty
(
$_POST
[
'phone'
]))){
$err
=
1
;
$errMsg
=
'Provide Customer Phone'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'
city'
])
||
empty
(
$_POST
[
'
city'
]))){
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'
profile_city'
])
||
empty
(
$_POST
[
'profile_
city'
]))){
$err
=
1
;
$errMsg
=
'Provide a City Name'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'gender'
])
||
empty
(
$_POST
[
'gender'
]))){
...
...
@@ -196,7 +197,7 @@ class Customer extends CI_Controller {
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'phone'
])
||
empty
(
$_POST
[
'phone'
]))){
$err
=
1
;
$errMsg
=
'Provide Customer Phone'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'
city'
])
||
empty
(
$_POST
[
'
city'
]))){
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'
profile_city'
])
||
empty
(
$_POST
[
'profile_
city'
]))){
$err
=
1
;
$errMsg
=
'Provide a City Name'
;
}
else
if
(
$err
==
0
&&
(
!
isset
(
$_POST
[
'gender'
])
||
empty
(
$_POST
[
'gender'
]))){
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Event.php
View file @
fb65dae3
...
...
@@ -379,18 +379,18 @@ class Event extends CI_Controller {
redirect
(
base_url
(
'Event/listEvents'
));
}
function
changeStatus
(
$event_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$event_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Event/listEvents'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'event_id'
])
||
empty
(
$_POST
[
'event_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$event_id
=
decode_param
(
$event_id
);
$status
=
$this
->
Event_model
->
changeStatus
(
$event_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$status
=
$_POST
[
'status'
];
$event_id
=
decode_param
(
$_POST
[
'event_id'
]);
$resp
=
$this
->
Event_model
->
changeStatus
(
$event_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Event/listEvents'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
function
getEventData
(){
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Host.php
View file @
fb65dae3
...
...
@@ -126,18 +126,18 @@ class Host extends CI_Controller {
redirect
(
base_url
(
'Host/editHostCategory/'
.
$host_id
));
}
function
changeStatus
(
$host_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$host_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Host/listHostCategory'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'host_id'
])
||
empty
(
$_POST
[
'host_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$host_id
=
decode_param
(
$host_id
);
$status
=
$this
->
Host_model
->
changeStatus
(
$host_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$status
=
$_POST
[
'status'
];
$host_id
=
decode_param
(
$_POST
[
'host_id'
]);
$resp
=
$this
->
Host_model
->
changeStatus
(
$host_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Host/listHostCategory'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/controllers/Provider.php
View file @
fb65dae3
...
...
@@ -54,31 +54,30 @@ class Provider extends CI_Controller {
echo
json_encode
(
$resArr
);
exit
;
}
function
changeStatus
(
$provider_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$provider_id
)
||
!
is_numeric
(
$provider_id
=
decode_param
(
$provider_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Provider/viewProviders'
));
}
$resp
=
$this
->
Provider_model
->
changeStatus
(
$provider_id
,
$status
);
if
(
!
$resp
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
}
else
{
if
(
$status
==
1
){
$this
->
load
->
model
(
'Api_model'
);
$providerData
=
$this
->
Provider_model
->
getProviderData
(
$provider_id
,
'0,1'
);
$subject
=
"Your Organizer Account is now activated"
;
$email_id
=
$providerData
->
email
;
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'provider_id'
])
||
empty
(
$_POST
[
'provider_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$status
=
$_POST
[
'status'
];
$provider_id
=
decode_param
(
$_POST
[
'provider_id'
]);
$resp
=
$this
->
Provider_model
->
changeStatus
(
$provider_id
,
$status
);
if
(
$resp
){
$this
->
load
->
model
(
'Api_model'
);
$providerData
=
$this
->
Provider_model
->
getProviderData
(
$provider_id
,
'0,1'
);
if
(
!
empty
(
$providerData
)){
$subject
=
"Your Organizer Account is now activated"
;
$email_id
=
$providerData
->
email
;
$template
=
getNotifTemplate
();
$message
=
"<html>
<body>
$message
=
"<html>
<body>
Your Organizer Account for the username
<strong>"
.
$providerData
->
username
.
"</strong> is now activated. Please use this link for access your account
<a href='"
.
base_url
()
.
"'>"
.
base_url
()
.
"</a><br>
</body>
</html>"
;
<strong>"
.
$providerData
->
username
.
"</strong> is now activated.
Please use this link for access your account
<a href='"
.
base_url
()
.
"'>"
.
base_url
()
.
"</a><br>
</body>
</html>"
;
if
(
isset
(
$template
[
'provider_activation_mail'
])
&&
!
empty
(
$template
[
'provider_activation_mail'
])){
...
...
@@ -86,12 +85,12 @@ class Provider extends CI_Controller {
array
(
$providerData
->
username
,
base_url
()),
$template
[
'provider_activation_mail'
]);
}
$this
->
Api_model
->
send_mail
(
$subject
,
$email_id
,
$message
);
$this
->
Api_model
->
send_mail
(
$subject
,
$email_id
,
$message
);
}
}
redirect
(
base_url
(
'Provider/viewProviders'
));
}
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
public
function
createProvider
(){
$err
=
0
;
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Region.php
View file @
fb65dae3
...
...
@@ -185,19 +185,19 @@ class Region extends CI_Controller {
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Region/editRegion/'
.
$region_id
));
}
function
changeStatus
(
$region_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$region_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Region/listRegion'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'region_id'
])
||
empty
(
$_POST
[
'region_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$region_id
=
decode_param
(
$region_id
);
$status
=
$this
->
Region_model
->
changeStatus
(
$region_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$status
=
$_POST
[
'status'
];
$region_id
=
decode_param
(
$_POST
[
'region_id'
]);
$resp
=
$this
->
Region_model
->
changeStatus
(
$region_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Region/listRegion'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
}
?>
This diff is collapsed.
Click to expand it.
application/controllers/Staff.php
View file @
fb65dae3
...
...
@@ -35,19 +35,20 @@ class Staff extends CI_Controller {
$this
->
load
->
view
(
'template'
,
$template
);
}
function
changeStatus
(
$staff_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$staff_id
)
||
!
is_numeric
(
$staff_id
=
decode_param
(
$staff_id
))){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Staff/viewStaffs'
));
}
$status
=
$this
->
Staff_model
->
changeStatus
(
$staff_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
}
redirect
(
base_url
(
'Staff/viewStaffs'
));
}
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'staff_id'
])
||
empty
(
$_POST
[
'staff_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$status
=
$_POST
[
'status'
];
$staff_id
=
decode_param
(
$_POST
[
'staff_id'
]);
$resp
=
$this
->
Staff_model
->
changeStatus
(
$staff_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
public
function
createStaff
(){
$err
=
0
;
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Tag.php
View file @
fb65dae3
...
...
@@ -107,18 +107,18 @@ class Tag extends CI_Controller {
redirect
(
base_url
(
'Tag/editTags/'
.
$tag_id
));
}
function
changeStatus
(
$tag_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$tag_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Tag/listTags'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'tag_id'
])
||
empty
(
$_POST
[
'tag_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$tag_id
=
decode_param
(
$tag_id
);
$status
=
$this
->
Tag_model
->
changeStatus
(
$tag_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$tag_id
=
decode_param
(
$_POST
[
'tag_id'
]);
$status
=
$_POST
[
'status'
];
$resp
=
$this
->
Tag_model
->
changeStatus
(
$tag_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Tag/listTags'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
function
getTagData
(){
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Venue.php
View file @
fb65dae3
...
...
@@ -242,18 +242,18 @@ class Venue extends CI_Controller {
redirect
(
base_url
(
'Venue/editVenues/'
.
$venue_id
));
}
function
changeStatus
(
$venue_id
=
''
,
$status
=
'1'
){
$flashMsg
=
array
(
'message'
=>
'Something went wrong, please try again..!'
,
'class'
=>
'error'
);
if
(
empty
(
$venue_id
)){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
redirect
(
base_url
(
'Venue/listVenues'
));
function
changeStatus
(){
if
(
!
isset
(
$_POST
)
||
!
isset
(
$_POST
[
'venue_id'
])
||
empty
(
$_POST
[
'venue_id'
])
||
!
isset
(
$_POST
[
'status'
])
||
$_POST
[
'status'
]
==
''
){
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
$venue_id
=
decode_param
(
$venue_id
);
$status
=
$this
->
Venue_model
->
changeStatus
(
$venue_id
,
$status
);
if
(
!
$status
){
$this
->
session
->
set_flashdata
(
'message'
,
$flashMsg
);
$status
=
$_POST
[
'status'
];
$venue_id
=
decode_param
(
$_POST
[
'venue_id'
]);
$resp
=
$this
->
Venue_model
->
changeStatus
(
$venue_id
,
$status
);
if
(
$resp
){
echo
json_encode
(
array
(
'status'
=>
'1'
));
exit
;
}
redirect
(
base_url
(
'Venue/listVenues'
))
;
echo
json_encode
(
array
(
'status'
=>
'0'
));
exit
;
}
function
getVenueData
(){
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Webservice.php
View file @
fb65dae3
...
...
@@ -39,7 +39,7 @@ class Webservice extends CI_Controller {
}
}
public
function
update_fcm_token
(){
public
function
update_fcm_token
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
update_fcm_token
(
$data
);
...
...
@@ -50,7 +50,7 @@ class Webservice extends CI_Controller {
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
login
()
{
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$res
=
$this
->
Webservice_model
->
login
(
$data
);
...
...
@@ -85,7 +85,7 @@ class Webservice extends CI_Controller {
}
}
public
function
get_events_list
()
{
public
function
get_events_list
()
{
$data
=
$_GET
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
...
...
@@ -196,7 +196,7 @@ class Webservice extends CI_Controller {
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
update_city
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
$this
->
response
(
$res
[
'data'
]);
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
...
...
@@ -360,7 +360,7 @@ class Webservice extends CI_Controller {
}
}
public
function
responseEventList
(
$data
)
{
public
function
responseEventList
(
$data
)
{
//print_r($data);exit();
$result
=
array
(
'status'
=>
'success'
,
...
...
@@ -373,7 +373,7 @@ class Webservice extends CI_Controller {
print
json_encode
(
$result
);
}
public
function
get_last_booking
()
{
$data
[
'auth_token'
]
=
$this
->
auth_token
;
...
...
@@ -386,7 +386,7 @@ class Webservice extends CI_Controller {
}
}
public
function
responseBookList
(
$data
)
{
$result
=
array
(
'status'
=>
'success'
,
...
...
@@ -407,7 +407,7 @@ class Webservice extends CI_Controller {
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
user_language
(){
public
function
user_language
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$this
->
Webservice_model
->
user_language
(
$data
);
...
...
@@ -418,7 +418,7 @@ class Webservice extends CI_Controller {
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
application/models/Customer_model.php
View file @
fb65dae3
...
...
@@ -9,7 +9,7 @@ class Customer_model extends CI_Model {
$cond
.=
(
!
empty
(
$customer_id
))
?
" AND CUST.customer_id='
$customer_id
' "
:
""
;
$sql
=
"SELECT CUST.customer_id,CUST.name,CUST.email,CUST.phone,CUST.email,CUST.gender,
CUST.dob,CUST.city,CUST.reset_key,CUST.social_id,CUST.profile_image,USR.status
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)
WHERE
$cond
"
;
...
...
@@ -66,7 +66,7 @@ class Customer_model extends CI_Model {
$status
=
$this
->
db
->
insert
(
'customer'
,
array
(
'customer_id'
=>
$customer_id
,
'dob'
=>
$customer_data
[
'dob'
],
'
city'
=>
$customer_data
[
'
city'
],
'
profile_city'
=>
$customer_data
[
'profile_
city'
],
'name'
=>
$customer_data
[
'name'
],
'email'
=>
$customer_data
[
'email'
],
'phone'
=>
$customer_data
[
'phone'
],
...
...
@@ -97,7 +97,7 @@ class Customer_model extends CI_Model {
if
(
!
empty
(
$phoneChk
)
&&
$phoneChk
->
num_rows
()
>
0
)
{
return
3
;
}
$upMecArr
=
array
(
'dob'
=>
$customer_data
[
'dob'
],
'
city'
=>
$customer_data
[
'
city'
],
'
profile_city'
=>
$customer_data
[
'profile_
city'
],
'name'
=>
$customer_data
[
'name'
],
'phone'
=>
$customer_data
[
'phone'
],
'email'
=>
$customer_data
[
'email'
],
...
...
This diff is collapsed.
Click to expand it.
application/views/Booking/viewBooking.php
View file @
fb65dae3
...
...
@@ -82,12 +82,10 @@
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-info"
id=
"viewBooking"
booking_id=
"
<?=
encode_param
(
$booking
->
booking_id
)
?>
"
>
<i
class=
"fa fa-fw fa-eye"
></i>
View
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Booking/changeStatus/"
.
encode_param
(
$booking
->
booking_id
))
.
"/4"
?>
"
onClick=
"return doconfirm()"
>
</a>
<a
class=
"btn btn-sm btn-danger"
status=
"2"
onclick=
"confirmDelete(jQuery(this),'Booking/changeStatus',{'booking_id':'
<?=
encode_param
(
$booking
->
booking_id
)
?>
'})"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
</a>
<?php
}
?>
</td>
</tr>
...
...
This diff is collapsed.
Click to expand it.
application/views/Category/viewCategoryList.php
View file @
fb65dae3
...
...
@@ -61,26 +61,26 @@
<th
class=
"center"
>
<?=
$category
->
category
?>
</th>
<th
class=
"center"
>
<?=
$category
->
category_ar
?>
</th>
<th
class=
"center"
>
<?=
$category
->
category_description
?>
</th>
<th
class=
"center"
>
<?=
(
$category
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<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"
href=
"
<?=
base_url
(
"Category/changeStatus/"
.
encode_param
(
$category
->
cat_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$category
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Category/changeStatus/"
.
encode_param
(
$category
->
cat_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Category/changeStatus/"
.
encode_param
(
$category
->
cat_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
<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>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Checker/viewChecker.php
View file @
fb65dae3
...
...
@@ -84,22 +84,22 @@
<th
class=
"hidden"
>
<?=
$checker
->
id
?>
</th>
<th
class=
"center"
>
<?=
$checker
->
username
?>
</th>
<th
class=
"center"
>
<?=
$checker
->
name
?>
</th>
<th
class=
"center"
>
<?=
(
$checker
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$checker
->
id
?>
"
>
<?=
(
$checker
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Checker/changeStatus/"
.
encode_param
(
$checker
->
id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$checker
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Checker/changeStatus/"
.
encode_param
(
$checker
->
id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Checker/changeStatus/"
.
encode_param
(
$checker
->
id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
<a
class=
"btn btn-sm btn-danger"
onclick=
"confirmDelete(jQuery(this),'Checker/changeStatus',{'checker_id':'
<?=
encode_param
(
$checker
->
id
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
$status
=
0
;
$btnClass
=
'btn-warning'
;
$btnName
=
'De-activate'
;
if
(
$checker
->
status
!=
1
){
$status
=
1
;
$btnClass
=
'btn-success'
;
$btnName
=
'Activate'
;
}
?>
<a
class=
"btn btn-sm
<?=
$btnClass
?>
"
onclick=
"updateStatus(jQuery(this),'Checker/changeStatus',{'checker_id':'
<?=
encode_param
(
$checker
->
id
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$checker
->
id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Customer/customerForm.php
View file @
fb65dae3
...
...
@@ -56,7 +56,7 @@
<div
class=
"form-group"
>
<label>
City
</label>
<input
type=
"text"
class=
"form-control required"
data-parsley-trigger=
"change"
id=
"loc_search_1"
name=
"
city"
placeholder=
"City"
value=
"
<?=
(
isset
(
$customer_data
->
city
))
?
$customer_data
->
city
:
''
?>
"
required
autocomplete=
"off"
>
id=
"loc_search_1"
name=
"
profile_city"
placeholder=
"City"
value=
"
<?=
(
isset
(
$customer_data
->
profile_city
))
?
$customer_data
->
profile_
city
:
''
?>
"
required
autocomplete=
"off"
>
</div>
</div>
<div
class=
"col-md-6"
>
...
...
This diff is collapsed.
Click to expand it.
application/views/Customer/viewCustomer.php
View file @
fb65dae3
...
...
@@ -56,8 +56,10 @@
<th
class=
"center"
>
<?=
$customer
->
name
?>
</th>
<th
class=
"center"
>
<?=
$customer
->
email
?>
</th>
<th
class=
"center"
>
<?=
$customer
->
phone
?>
</th>
<th
class=
"center"
>
<?=
$customer
->
city
?>
</th>
<th
class=
"center"
>
<?=
(
$customer
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
>
<?=
$customer
->
profile_city
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$customer
->
customer_id
?>
"
>
<?=
(
$customer
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<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
...
...
@@ -65,21 +67,19 @@
<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>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Customer/changeStatus/"
.
encode_param
(
$customer
->
customer_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$customer
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Customer/changeStatus/"
.
encode_param
(
$customer
->
customer_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Customer/changeStatus/"
.
encode_param
(
$customer
->
customer_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
</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>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Event/viewEventList.php
View file @
fb65dae3
...
...
@@ -43,7 +43,6 @@
<th>
Category
</th>
<th>
Region
</th>
<th>
Venue
</th>
<!-- <th>Location</th> -->
<th>
Status
</th>
<th
width=
"330px"
>
Action
</th>
</tr>
...
...
@@ -58,15 +57,22 @@
<td>
<?=
$event
->
category
?>
</td>
<td>
<?=
$event
->
region_name
?>
</td>
<td>
<?=
$event
->
venue_name
?>
</td>
<td>
<?php
switch
(
$event
->
event_status
){
case
1
:
echo
'Active'
;
break
;
case
0
:
echo
'De-activate'
;
break
;
case
3
:
echo
'Waiting For Approval'
;
break
;
}
?>
</td>
<?php
switch
(
$event
->
event_status
){
case
1
:
echo
'<td class="center" id="statusFlag_'
.
$event
->
event_id
.
'">
Active
</td>'
;
break
;
case
0
:
echo
'<td class="center" id="statusFlag_'
.
$event
->
event_id
.
'">
De-activate
</td>'
;
break
;
case
3
:
echo
'<td class="center" id="statusFlag_'
.
$event
->
event_id
.
'">
Waiting For Approval
</td>'
;
break
;
}
?>
<td>
<button
class=
"btn btn-sm btn-info"
id=
"viewEventDetails"
event_id=
"
<?=
encode_param
(
$event
->
event_id
)
?>
"
>
...
...
@@ -76,30 +82,25 @@
href=
"
<?=
base_url
(
'Event/editEvents/'
.
encode_param
(
$event
->
event_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Event/changeStatus/"
.
encode_param
(
$event
->
event_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<a
class=
"btn btn-sm btn-danger"
onclick=
"confirmDelete(jQuery(this),'Event/changeStatus',{'event_id':'
<?=
encode_param
(
$event
->
event_id
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
switch
(
$event
->
event_status
){
case
1
:
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Event/changeStatus/"
.
encode_param
(
$event
->
event_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
break
;
case
0
:
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Event/changeStatus/"
.
encode_param
(
$event
->
event_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
break
;
case
3
:
?>
<a
class=
"btn btn-sm btn-warning"
href=
"
<?=
base_url
(
"Event/changeStatus/"
.
encode_param
(
$event
->
event_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Approve
</a>
<?php
break
;
case
1
:
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
break
;
case
0
:
$status
=
1
;
$btnName
=
'Activate'
;
$btnClass
=
'btn-success'
;
break
;
case
3
:
$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>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Host/viewHostCategories.php
View file @
fb65dae3
...
...
@@ -55,26 +55,26 @@
<th
class=
"center"
>
<?=
(
$host
->
show_layout
==
0
)
?
'NO'
:
'YES'
?>
</th>
<th
class=
"center"
>
<?=
(
$host
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<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>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Host/changeStatus/"
.
encode_param
(
$host
->
host_cat_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$host
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Host/changeStatus/"
.
encode_param
(
$host
->
host_cat_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Host/changeStatus/"
.
encode_param
(
$host
->
host_cat_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
</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>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Provider/viewProvider.php
View file @
fb65dae3
...
...
@@ -57,7 +57,9 @@
<th
class=
"center"
>
<?=
$provider
->
username
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
email
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
phone
?>
</th>
<th
class=
"center"
>
<?=
(
$provider
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$provider
->
provider_id
?>
"
>
<?=
(
$provider
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-info"
id=
"viewProvider"
provider_id=
"
<?=
encode_param
(
$provider
->
provider_id
)
?>
"
>
<i
class=
"fa fa-fw fa-eye"
></i>
View
...
...
@@ -65,21 +67,19 @@
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Provider/editProviders/'
.
encode_param
(
$provider
->
provider_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Provider/changeStatus/"
.
encode_param
(
$provider
->
provider_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$provider
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Provider/changeStatus/"
.
encode_param
(
$provider
->
provider_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Provider/changeStatus/"
.
encode_param
(
$provider
->
provider_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
</a>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$provider
->
status
!=
1
){
$status
=
1
;
$btnName
=
'Activate'
;
$btnClass
=
'btn-success'
;
}
?>
<a
class=
"btn btn-sm btn-danger"
onclick=
"confirmDelete(jQuery(this),'Provider/changeStatus',{'provider_id':'
<?=
encode_param
(
$provider
->
provider_id
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<a
class=
"btn btn-sm
<?=
$btnClass
?>
"
onclick=
"updateStatus(jQuery(this),'Provider/changeStatus',{'provider_id':'
<?=
encode_param
(
$provider
->
provider_id
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$provider
->
provider_id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Region/viewRegionList.php
View file @
fb65dae3
...
...
@@ -59,26 +59,26 @@
</th>
<th
class=
"center"
>
<?=
$region
->
name
?>
</th>
<th
class=
"center"
>
<?=
$region
->
name_ar
?>
</th>
<th
class=
"center"
>
<?=
(
$region
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<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>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Region/changeStatus/"
.
encode_param
(
$region
->
id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$region
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Region/changeStatus/"
.
encode_param
(
$region
->
id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Region/changeStatus/"
.
encode_param
(
$region
->
id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
<?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>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Staff/viewStaff.php
View file @
fb65dae3
...
...
@@ -51,7 +51,7 @@
if
(
!
empty
(
$staff_data
)){
foreach
(
$staff_data
as
$staff
)
{
?>
<tr>
<th
class=
"hidden"
>
<?=
$staff
->
staff_
id
?>
</th>
<th
class=
"hidden"
>
<?=
$staff
->
id
?>
</th>
<th
class=
"center textCenterAlign"
>
<img
id=
"image_id"
src=
"
<?=
base_url
(
$staff
->
profile_image
)
?>
"
onerror=
"this.src='
<?=
base_url
(
"assets/images/user_avatar.jpg"
)
?>
';"
...
...
@@ -59,26 +59,27 @@
</th>
<th
class=
"center"
>
<?=
$staff
->
display_name
?>
</th>
<th
class=
"center"
>
<?=
$staff
->
username
?>
</th>
<th
class=
"center"
>
<?=
(
$staff
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$staff
->
id
?>
"
>
<?=
(
$staff
->
status
==
1
)
?
'Active'
:
'De-active'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Staff/editStaffs/'
.
encode_param
(
$staff
->
id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Staff/changeStatus/"
.
encode_param
(
$staff
->
id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$staff
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Staff/changeStatus/"
.
encode_param
(
$staff
->
id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Staff/changeStatus/"
.
encode_param
(
$staff
->
id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$staff
->
status
!=
1
){
$status
=
1
;
$btnName
=
'Activate'
;
$btnClass
=
'btn-success'
;
}
?>
<a
class=
"btn btn-sm btn-danger"
onclick=
"confirmDelete(jQuery(this),'Staff/changeStatus',{'staff_id':'
<?=
encode_param
(
$staff
->
id
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<a
class=
"btn btn-sm
<?=
$btnClass
?>
"
onclick=
"updateStatus(jQuery(this),'Staff/changeStatus',{'staff_id':'
<?=
encode_param
(
$staff
->
id
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$staff
->
id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Tag/viewTagList.php
View file @
fb65dae3
...
...
@@ -51,26 +51,26 @@
<tr>
<th
class=
"hidden"
>
<?=
$tag
->
tag_id
?>
</th>
<th
class=
"center"
>
<?=
$tag
->
tag_name
?>
</th>
<th
class=
"center"
>
<?=
(
$tag
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<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"
href=
"
<?=
base_url
(
"Tag/changeStatus/"
.
encode_param
(
$tag
->
tag_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
</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
if
(
$tag
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Tag/changeStatus/"
.
encode_param
(
$tag
->
tag_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Tag/changeStatus/"
.
encode_param
(
$tag
->
tag_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
<
/a
>
<
?php
}
?
>
</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>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
application/views/Venue/viewVenueList.php
View file @
fb65dae3
...
...
@@ -57,7 +57,9 @@
<th
class=
"center"
>
<?=
$venue
->
region_name
?>
</th>
<th
class=
"center"
>
<?=
$venue
->
host_category
?>
</th>
<th
class=
"center"
>
<?=
$venue
->
location
?>
</th>
<th
class=
"center"
>
<?=
(
$venue
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$venue
->
venue_id
?>
"
>
<?=
(
$venue
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<button
class=
"btn btn-sm btn-info"
id=
"viewVenueDetails"
venue_id=
"
<?=
encode_param
(
$venue
->
venue_id
)
?>
"
>
...
...
@@ -67,20 +69,18 @@
href=
"
<?=
base_url
(
'Venue/editVenues/'
.
encode_param
(
$venue
->
venue_id
))
?>
"
>
<i
class=
"fa fa-fw fa-edit"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Venue/changeStatus/"
.
encode_param
(
$venue
->
venue_id
))
.
"/2"
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<?php
if
(
$venue
->
status
==
1
){
?>
<a
class=
"btn btn-sm btn-success"
style=
"background-color:#ac2925"
href=
"
<?=
base_url
(
"Venue/changeStatus/"
.
encode_param
(
$venue
->
venue_id
))
.
"/0"
?>
"
>
<i
class=
"fa fa-cog"
></i>
De-activate
</a>
<?php
}
else
{
?>
<a
class=
"btn btn-sm btn-success"
href=
"
<?=
base_url
(
"Venue/changeStatus/"
.
encode_param
(
$venue
->
venue_id
))
.
"/1"
?>
"
>
<i
class=
"fa fa-cog"
></i>
Activate
</a>
<?php
}
?>
<?php
$status
=
0
;
$btnName
=
'De-activate'
;
$btnClass
=
'btn-warning'
;
if
(
$venue
->
status
!=
1
){
$status
=
1
;
$btnName
=
'Activate'
;
$btnClass
=
'btn-success'
;
}
?>
<a
class=
"btn btn-sm btn-danger"
onclick=
"confirmDelete(jQuery(this),'Venue/changeStatus',{'venue_id':'
<?=
encode_param
(
$venue
->
venue_id
)
?>
'})"
status=
"2"
><i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
<a
class=
"btn btn-sm
<?=
$btnClass
?>
"
onclick=
"updateStatus(jQuery(this),'Venue/changeStatus',{'venue_id':'
<?=
encode_param
(
$venue
->
venue_id
)
?>
'})"
status=
"
<?=
$status
?>
"
status_id=
"
<?=
$venue
->
venue_id
?>
"
>
<i
class=
"fa fa-cog"
>
<?=
$btnName
?>
</i>
</a>
</td>
</tr>
<?php
}
}
?>
...
...
This diff is collapsed.
Click to expand it.
assets/js/custom-script.js
View file @
fb65dae3
...
...
@@ -839,6 +839,10 @@ jQuery('#locPointerMap').locationpicker({
}
});
jQuery
(
'[aria-controls="mechanicUsers"]'
).
on
(
'click'
,
function
(
event
)
{
jQuery
(
'.datatable'
).
DataTable
().
draw
();
});
jQuery
(
'[id="pushNotification"]'
).
on
(
'click'
,
function
(
event
)
{
event
.
preventDefault
();
var
validation
=
jQuery
(
'[name="pushNotifForm"]'
).
parsley
().
validate
();
...
...
@@ -853,3 +857,73 @@ jQuery('[id="pushNotification"]').on('click',function(event) {
jQuery
(
'[name="pushNotifForm"]'
).
submit
();
}
});
function
updateStatus
(
thisObj
,
fnName
,
params
){
var
status
=
thisObj
.
attr
(
'status'
),
status_id
=
thisObj
.
attr
(
'status_id'
);
if
(
status
==
undefined
||
status
==
'undefined'
||
status
==
null
||
status
==
'null'
||
status
==
''
||
params
==
undefined
||
params
==
'undefined'
||
params
==
null
||
params
==
'null'
||
params
==
''
||
fnName
==
undefined
||
fnName
==
'undefined'
||
fnName
==
null
||
fnName
==
'null'
||
fnName
==
''
||
thisObj
==
undefined
||
thisObj
==
'undefined'
||
thisObj
==
null
||
thisObj
==
'null'
||
thisObj
==
''
){
setErrModal
(
'Status Upadting...'
,
'Something went wrong, please try again later...!'
);
return
false
;
}
params
.
status
=
status
;
jQuery
.
ajax
({
url
:
base_url
+
fnName
,
type
:
'POST'
,
data
:
params
,
success
:
function
(
resp
){
if
(
resp
==
''
||
resp
==
undefined
||
resp
==
'undefined'
||
resp
==
null
||
resp
==
'null'
){
setErrModal
(
'Status Upadting...'
,
'Something went wrong, please try again later...!'
);
return
false
;
}
var
resp_data
=
jQuery
.
parseJSON
(
resp
);
if
(
resp_data
[
'status'
]
==
0
){
setErrModal
(
'Status Upadting...'
,
'Something went wrong, please try again later...!'
);
return
false
;
}
if
(
status
==
2
){
var
table
=
jQuery
(
'.datatable'
).
DataTable
();
table
.
row
(
thisObj
.
parents
(
'tr'
)).
remove
();
thisObj
.
parents
(
'tr'
).
remove
();
return
false
;
}
if
(
status
==
1
){
thisObj
.
attr
(
'status'
,
'0'
);
thisObj
.
addClass
(
'btn-warning'
);
thisObj
.
removeClass
(
'btn-success'
);
thisObj
.
find
(
'i'
).
html
(
'De-activate'
);
jQuery
(
'[id="statusFlag_'
+
status_id
+
'"]'
).
html
(
'Active'
);
return
false
;
}
if
(
status
==
0
){
thisObj
.
attr
(
'status'
,
'1'
);
thisObj
.
addClass
(
'btn-success'
);
thisObj
.
removeClass
(
'btn-warning'
);
thisObj
.
find
(
'i'
).
html
(
'Activate'
);
jQuery
(
'[id="statusFlag_'
+
status_id
+
'"]'
).
html
(
'De-active'
);
return
false
;
}
},
fail
:
function
(
xhr
,
textStatus
,
errorThrown
){
remFullScreenLoader
();
setErrModal
(
'Status Upadting...'
,
'Something went wrong, please try again later...!'
);
},
error
:
function
(
ajaxContext
)
{
remFullScreenLoader
();
setErrModal
(
'Status Upadting...'
,
'Something went wrong, please try again later...!'
);
}
});
}
function
confirmDelete
(
thisObj
,
fnName
,
params
){
if
(
confirm
(
"Are you sure to delete permanently?"
)){
updateStatus
(
thisObj
,
fnName
,
params
,
status
);
}
}
This diff is collapsed.
Click to expand it.
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