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
44a3a910
Commit
44a3a910
authored
6 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
Master See merge request
!44
parents
7d61b616
4f9a1319
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
24 deletions
+6
-24
Booking.php
application/controllers/Booking.php
+2
-11
bookingStatusCrone.php
application/controllers/bookingStatusCrone.php
+2
-2
viewBooking.php
application/views/Booking/viewBooking.php
+2
-11
No files found.
application/controllers/Booking.php
View file @
44a3a910
...
@@ -178,20 +178,11 @@ class Booking extends CI_Controller {
...
@@ -178,20 +178,11 @@ class Booking extends CI_Controller {
if
(
isset
(
$data
[
'Book_Status'
])){
if
(
isset
(
$data
[
'Book_Status'
])){
switch
(
$data
[
'Book_Status'
])
{
switch
(
$data
[
'Book_Status'
])
{
case
'0'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Cancelled'
;
break
;
case
'0'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Cancelled'
;
break
;
case
'1'
:
case
'1'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Booked'
;
break
;
if
(
$data
[
'has_payment'
]
==
1
){
switch
(
$data
[
'trans_status'
]){
case
0
:
$reportData
[
$key
][
'Book_Status'
]
=
'Payment Failed'
;
break
;
case
1
:
$reportData
[
$key
][
'Book_Status'
]
=
'Booked'
;
break
;
case
2
:
$reportData
[
$key
][
'Book_Status'
]
=
'Payment Processing'
;
break
;
}
}
else
{
$reportData
[
$key
][
'Book_Status'
]
=
'Booked'
;
break
;
}
break
;
case
'2'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Completed'
;
break
;
case
'2'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Completed'
;
break
;
case
'3'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Pending'
;
break
;
case
'3'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Pending'
;
break
;
case
'4'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Deleted'
;
break
;
case
'4'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Deleted'
;
break
;
case
'5'
:
$reportData
[
$key
][
'Book_Status'
]
=
'Payment Failed'
;
break
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
application/controllers/bookingStatusCrone.php
View file @
44a3a910
<?php
<?php
$conn
=
mysqli_connect
(
"
192.168.140.123"
,
"root"
,
"Golden_123"
,
"tobin_eventTimeO
ut"
);
$conn
=
mysqli_connect
(
"
localhost"
,
"nuvento_timeout"
,
"Golden_123"
,
"nuvento_timeo
ut"
);
if
(
$conn
->
connect_error
){
if
(
$conn
->
connect_error
){
return
;
return
;
}
}
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
WHERE event_date_time.date < '
$todate
' and event_date_time.time < now() and booking.status='1'"
;
WHERE event_date_time.date < '
$todate
' and event_date_time.time < now() and booking.status='1'"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
$result
=
mysqli_query
(
$conn
,
$sql
);
$date_time
=
date
(
'Y-m-d H:i:s
a
'
,
strtotime
(
'- 15 minutes'
));
$date_time
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
'- 15 minutes'
));
$sql
=
"UPDATE booking
$sql
=
"UPDATE booking
INNER JOIN transaction ON transaction.booking_id = booking.bookId
INNER JOIN transaction ON transaction.booking_id = booking.bookId
SET booking.status = '5',transaction.status='3'
SET booking.status = '5',transaction.status='3'
...
...
This diff is collapsed.
Click to expand it.
application/views/Booking/viewBooking.php
View file @
44a3a910
...
@@ -63,19 +63,10 @@
...
@@ -63,19 +63,10 @@
<?php
<?php
switch
(
$booking
->
book_status
){
switch
(
$booking
->
book_status
){
case
0
:
echo
'Cancelled'
;
break
;
case
0
:
echo
'Cancelled'
;
break
;
case
1
:
case
1
:
echo
'Booked'
;
break
;
if
(
$booking
->
has_payment
==
1
){
switch
(
$booking
->
trans_status
){
case
0
:
echo
'Payment Failed'
;
break
;
case
1
:
echo
'Booked'
;
break
;
case
2
:
echo
'Pending'
;
break
;
}
}
else
{
echo
'Booked'
;
}
break
;
case
2
:
echo
'Completed'
;
break
;
case
2
:
echo
'Completed'
;
break
;
case
3
:
echo
'Pending'
;
break
;
case
3
:
echo
'Pending'
;
break
;
case
5
:
echo
'Payment Failed'
;
break
;
}
}
?>
?>
</th>
</th>
...
...
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