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
219bb552
Commit
219bb552
authored
5 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
Master See merge request
!134
parents
6bac8003
9133fc55
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
238 additions
and
139 deletions
+238
-139
Api.php
application/controllers/Api.php
+49
-16
Booking.php
application/controllers/Booking.php
+17
-1
Event.php
application/controllers/Event.php
+15
-14
Webservice.php
application/controllers/Webservice.php
+2
-2
bookingStatusCrone.php
application/controllers/bookingStatusCrone.php
+10
-9
notificationRemainder.php
application/controllers/notificationRemainder.php
+44
-44
generals_helper.php
application/helpers/generals_helper.php
+31
-11
Api_model.php
application/models/Api_model.php
+31
-25
Booking_model.php
application/models/Booking_model.php
+12
-13
Event_model.php
application/models/Event_model.php
+1
-1
Validation_app_model.php
application/models/Validation_app_model.php
+1
-2
Webservice_model.php
application/models/Webservice_model.php
+0
-0
generate.php
application/views/Booking/generate.php
+2
-1
viewBookingDetails.php
application/views/Booking/viewBookingDetails.php
+23
-0
No files found.
application/controllers/Api.php
View file @
219bb552
...
...
@@ -338,7 +338,7 @@ class Api extends CI_Controller {
}
public
function
paymentGateway
(
$amount
=
'0'
,
$last_id
=
'0'
,
$event_id
=
'0'
,
$booking_id
=
'0'
,
$custData
=
array
(),
$cardData
=
''
){
$custData
=
array
(),
$cardData
=
array
()
){
$customerName
=
array
();
if
(
isset
(
$custData
->
name
)
&&
!
empty
(
$custData
->
name
)){
$customerName
=
explode
(
' '
,
$custData
->
name
);
...
...
@@ -352,25 +352,58 @@ class Api extends CI_Controller {
$add1
=
$add2
=
$city
=
$state
=
'Saudi Arabia'
;
$pincode
=
'61961'
;
$holder
=
'Basanta Mahunta'
;
$cardType
=
'MasterCard'
;
$cardNo
=
'5111111111111118'
;
$cvv
=
'100'
;
$expMonth
=
'06'
;
$expYear
=
'2022'
;
// if(!empty($cardData)){
// if(isset($cardData['tocken'])){
// } else {
// }
// }
$noCard
=
0
;
$saveCard
=
1
;
$savedCard
=
0
;
if
(
!
empty
(
$cardData
)){
if
(
isset
(
$cardData
[
'cvv'
])
&&
!
empty
(
$cardData
[
'cvv'
])
&&
isset
(
$cardData
[
'tocken'
])
&&
!
empty
(
$cardData
[
'tocken'
])){
$savedCard
=
1
;
}
else
if
(
isset
(
$cardData
[
'cvv'
])
&&
!
empty
(
$cardData
[
'cvv'
])
||
isset
(
$cardData
[
'cardType'
])
&&
!
empty
(
$cardData
[
'cardType'
])
||
isset
(
$cardData
[
'cardNumber'
])
&&
!
empty
(
$cardData
[
'cardNumber'
])
||
isset
(
$cardData
[
'expMonthYear'
])
&&
!
empty
(
$cardData
[
'expMonthYear'
])
||
isset
(
$cardData
[
'cardHolderName'
])
&&
!
empty
(
$cardData
[
'cardHolderName'
])){
$cvv
=
$cardData
[
'cvv'
];
$cardNo
=
$cardData
[
'cardNumber'
];
$holder
=
$cardData
[
'cardHolderName'
];
$cardType
=
$cardData
[
'cardType'
];
$expMonth
=
substr
(
$cardData
[
'expMonthYear'
],
0
,
2
);
$expYear
=
'20'
.
substr
(
$cardData
[
'expMonthYear'
],
2
,
2
);
$saveCard
=
(
isset
(
$cardData
[
'saveCard'
])
&&!
empty
(
$cardData
[
'saveCard'
])
&&
$cardData
[
'saveCard'
]
==
0
)
?
0
:
1
;
}
else
{
$noCard
=
1
;
}
}
else
{
$noCard
=
1
;
}
$failureUrl
=
base_url
(
'Api/paymentFailureUrl'
);
$successUrl
=
base_url
(
'Api/paymentSuccessUrl'
);
$pText
=
'1111110||11111111|'
.
$last_id
.
'|'
.
$amount
.
'|'
.
$successUrl
.
'|'
.
$failureUrl
.
'|INTERNET|DD|01|SAR||1111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
'|SA|'
.
$email
.
'|'
.
$phone
.
'|34|344|34355344||111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
'|SA|'
.
$phone
.
'|34|344|34355344||11111100000|'
.
$cardNo
.
'|'
.
$expMonth
.
'|'
.
$expYear
.
'|'
.
$cvv
.
'|'
.
$holder
.
'|'
.
$cardType
.
'||1110000|'
.
$last_id
.
'|'
.
$event_id
.
'|'
.
$booking_id
.
'||1000000|'
.
$userId
;
$pText
=
'1111110||'
;
$pText
.=
'11111111|'
.
$last_id
.
'|'
.
$amount
.
'|'
.
$successUrl
.
'|'
.
$failureUrl
.
'|INTERNET|DD|01|SAR||'
;
$pText
.=
'1111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
'|SA|'
.
$email
.
'|'
.
$phone
.
'|34|344|34355344||'
;
$pText
.=
'111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
'|SA|'
.
$phone
.
'|34|344|34355344||'
;
if
(
$savedCard
==
1
){
$pText
.=
'00010000001|'
.
$cardData
[
'cvv'
]
.
'|'
.
$cardData
[
'tocken'
]
.
'||'
;
}
else
{
if
(
$noCard
==
0
){
$pText
.=
'11111100000|'
.
$cardNo
.
'|'
.
$expMonth
.
'|'
.
$expYear
.
'|'
.
$cvv
.
'|'
.
$holder
.
'|'
.
$cardType
.
'||'
;
}
else
{
// No Card Payment Method Logic.
// $holder = 'Basanta Mahunta'; $cardType = 'MasterCard'; $cardNo = '5111111111111118';
// $cvv = '100'; $expMonth = '06'; $expYear = '2022';
}
}
$pText
.=
'1110000|'
.
$last_id
.
'|'
.
$event_id
.
'|'
.
$booking_id
.
'||'
;
if
(
$saveCard
==
1
){
$pText
.=
'1000000|'
.
$userId
;
}
$settings
=
getSettings
();
$iv
=
$settings
[
'merchant_iv'
];
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Booking.php
View file @
219bb552
...
...
@@ -190,6 +190,19 @@ class Booking extends CI_Controller {
}
}
if
(
isset
(
$data
[
'trans_status'
])){
switch
(
$data
[
'trans_status'
])
{
case
'0'
:
$reportData
[
$key
][
'trans_status'
]
=
'Failed '
;
break
;
case
'1'
:
$reportData
[
$key
][
'trans_status'
]
=
'Completed '
;
break
;
case
'2'
:
$reportData
[
$key
][
'trans_status'
]
=
'Processing '
;
break
;
case
'3'
:
$reportData
[
$key
][
'trans_status'
]
=
'Payment Timeout '
;
break
;
}
}
if
(
isset
(
$data
[
'has_payment'
])){
$reportData
[
$key
][
'has_payment'
]
=
(
$data
[
'has_payment'
]
==
1
)
?
'Yes '
:
'No '
;
}
if
(
!
empty
(
$data
[
'Ticket_Details'
])){
$tktDtls
=
json_decode
(
$data
[
'Ticket_Details'
],
true
);
if
(
isset
(
$tktDtls
[
'price'
],
$tktDtls
[
'no_ticket'
],
$tktDtls
[
'total_price'
])
&&
...
...
@@ -200,8 +213,11 @@ class Booking extends CI_Controller {
$pDiv
.=
$tktDtls
[
'price'
]
.
' * '
.
$tktDtls
[
'no_ticket'
]
.
'(Seats) = '
.
$tktDtls
[
'total_price'
];
$reportData
[
$key
][
'Ticket_Details'
]
=
$pDiv
;
}
else
{
$reportData
[
$key
][
'Ticket_Details'
]
=
''
;
}
}
else
{
$reportData
[
$key
][
'Ticket_Details'
]
=
''
;
}
}
return
$reportData
;
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Event.php
View file @
219bb552
...
...
@@ -109,10 +109,10 @@ class Event extends CI_Controller {
'weekend_price'
=>
$_POST
[
'weekend_price'
][
$i
]);
}
$_POST
[
'custom_seat_layout'
]
=
json_encode
(
$cstmSeatLayout
);
}
else
{
}
else
if
(
isset
(
$_POST
[
'price'
])
&&
!
empty
(
$_POST
[
'price'
])
&&
isset
(
$_POST
[
'capacity'
])
&&
!
empty
(
$_POST
[
'capacity'
])){
$seatPriceArr
=
array
(
'price'
=>
$_POST
[
'price'
],
'capacity'
=>
$_POST
[
'capacity'
]);
foreach
(
$language
AS
$lang
)
{
$details
=
$_POST
[
'price_details_EN'
];
if
(
isset
(
$_POST
[
'price_details_'
.
$lang
])
&&
!
empty
(
$_POST
[
'price_details_'
.
$lang
])){
$details
=
$_POST
[
'price_details_'
.
$lang
];
}
...
...
@@ -179,15 +179,17 @@ class Event extends CI_Controller {
}
// START - NEW EVENT NOTIFICATION MAIL \\
$settings
=
getSettings
();
$this
->
load
->
model
(
'Api_model'
);
$subject
=
"TimeOut, New Event Created"
;
$emailId
=
$settings
[
'admin_mail_id'
];
$message
=
"<html><body>
New Event Created, event name: <strong>"
.
$_POST
[
'event_name_en'
]
.
"</strong>. Event URL : "
.
base_url
()
.
"eventdetail?event_id=
$event_id
</body></html>"
;
$this
->
Api_model
->
send_mail
(
$subject
,
$emailId
,
$message
);
if
(
$this
->
session
->
userdata
[
'user_type'
]
!=
1
){
$settings
=
getSettings
();
$this
->
load
->
model
(
'Api_model'
);
$subject
=
"TimeOut, New Event Created"
;
$emailId
=
$settings
[
'admin_mail_id'
];
$message
=
"<html><body>
New Event Created, event name: <strong>"
.
$_POST
[
'event_name_en'
]
.
"</strong>. Event URL : "
.
base_url
()
.
"eventdetail?event_id=
$event_id
</body></html>"
;
$this
->
Api_model
->
send_mail
(
$subject
,
$emailId
,
$message
);
}
// END - NEW EVENT NOTIFICATION MAIL \\
$flashMsg
[
'class'
]
=
'success'
;
...
...
@@ -275,7 +277,6 @@ class Event extends CI_Controller {
}
$_POST
[
'has_payment'
]
=
(
isset
(
$_POST
[
'has_payment'
])
&&
$_POST
[
'has_payment'
]
==
1
)
?
'1'
:
'0'
;
$_POST
[
'seat_pricing'
]
=
$_POST
[
'custom_seat_layout'
]
=
''
;
if
(
isset
(
$_POST
[
'fare_type'
])
&&
$_POST
[
'fare_type'
]
==
1
){
$cstmSeatLayout
=
array
();
...
...
@@ -289,10 +290,10 @@ class Event extends CI_Controller {
'weekend_price'
=>
$_POST
[
'weekend_price'
][
$i
]);
}
$_POST
[
'custom_seat_layout'
]
=
json_encode
(
$cstmSeatLayout
);
}
else
{
}
else
if
(
isset
(
$_POST
[
'price'
])
&&
!
empty
(
$_POST
[
'price'
])
&&
isset
(
$_POST
[
'capacity'
])
&&
!
empty
(
$_POST
[
'capacity'
])){
$seatPriceArr
=
array
(
'price'
=>
$_POST
[
'price'
],
'capacity'
=>
$_POST
[
'capacity'
]);
foreach
(
$language
AS
$lang
)
{
$details
=
$_POST
[
'price_details_EN'
];
if
(
isset
(
$_POST
[
'price_details_'
.
$lang
])
&&
!
empty
(
$_POST
[
'price_details_'
.
$lang
])){
$details
=
$_POST
[
'price_details_'
.
$lang
];
}
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Webservice.php
View file @
219bb552
...
...
@@ -29,8 +29,8 @@ class Webservice extends CI_Controller {
if
(
$method
==
'profile'
)
{
$data
=
$_POST
;
}
if
(
isset
(
apache_request_headers
()[
'Auth'
]))
{
$this
->
auth_token
=
apache_request_headers
()[
'A
uth'
];
if
(
isset
(
apache_request_headers
()[
'Auth'
])
||
isset
(
apache_request_headers
()[
'auth'
])
)
{
$this
->
auth_token
=
(
isset
(
apache_request_headers
()[
'Auth'
]))
?
apache_request_headers
()[
'Auth'
]
:
apache_request_headers
()[
'a
uth'
];
$data
[
'auth_token'
]
=
$this
->
auth_token
;
}
$res
=
$this
->
Validation_app_model
->
validation_check
(
$method
,
$data
);
...
...
This diff is collapsed.
Click to expand it.
application/controllers/bookingStatusCrone.php
View file @
219bb552
<?php
date_default_timezone_set
(
"Asia/Riyadh"
);
$conn
=
mysqli_connect
(
"localhost"
,
"nuvento_timeout"
,
"Golden_123"
,
"nuvento_timeout"
);
if
(
$conn
->
connect_error
){
return
;
}
}
$todate
=
date
(
'Y-m-d'
);
$sql
=
"UPDATE booking
$date_time
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
'- 15 minutes'
));
$sql
=
"UPDATE booking
INNER JOIN event_date_time ON event_date_time.id = booking.event_date_id
SET booking.status = '2'
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
);
$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
SET booking.status = '5',transaction.status='3'
WHERE transaction.datetime > '
$date_time
'"
;
WHERE transaction.datetime<'
$date_time
'"
;
mysqli_query
(
$conn
,
$sql
);
$conn
->
close
();
?>
This diff is collapsed.
Click to expand it.
application/controllers/notificationRemainder.php
View file @
219bb552
<?php
date_default_timezone_set
(
"Asia/Riyadh"
);
$conn
=
mysqli_connect
(
"localhost"
,
"nuvento_timeout"
,
"Golden_123"
,
"nuvento_timeout"
);
if
(
$conn
->
connect_error
){
return
;
}
$result
=
mysqli_query
(
$conn
,
"SELECT app_id FROM setting"
);
$conn
=
mysqli_connect
(
"localhost"
,
"nuvento_timeout"
,
"Golden_123"
,
"nuvento_timeout"
);
if
(
$conn
->
connect_error
){
return
;
}
$result
=
mysqli_query
(
$conn
,
"SELECT app_id FROM setting"
);
if
(
mysqli_num_rows
(
$result
)
<=
0
||
empty
(
$row
=
mysqli_fetch_assoc
(
$result
))
||
!
isset
(
$row
[
'app_id'
])
||
empty
(
$key
=
$row
[
'app_id'
])){
return
;
}
$date
=
date
(
'Y-m-d'
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +30 minutes"
));
$sTime
=
date
(
'H:i'
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +30 minutes"
));
$eTime
=
date
(
"H:i"
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +31 minutes"
));
$sql
=
"SELECT CUST.customer_id,CUST.fcm_token,BOK.id AS booking_id,BOK.bookId,EVT.event_name_en
FROM booking AS BOK
INNER JOIN customer AS CUST ON (CUST.customer_id=BOK.customer_id)
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN event_date_time AS EDATE ON (EDATE.event_id=BOK.event_id)
WHERE EVT.status='1' AND BOK.status='1' AND USR.status='1' AND EDATE.status='1' AND
EDATE.date='
$date
' AND EDATE.time<='
$eTime
' AND EDATE.time>='
$sTime
'
GROUP BY BOK.id,CUST.customer_id"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
if
(
mysqli_num_rows
(
$result
)
>
0
)
{
while
(
$row
=
mysqli_fetch_assoc
(
$result
))
{
$data
=
"{
\"
notification
\"
: {
\"
title
\"
:
\"
"
.
$row
[
'event_name_en'
]
.
"
\"
,
\"
text
\"
:
\"
Booking Reminder
\"
,
\"
sound
\"
:
\"
default
\"
},
\"
time_to_live
\"
: 60,
\"
data
\"
: {\"
response
\
" : {\"
status
\
" :
\"
success
\"
,
\"
data
\"
: {\"
booking_id
\
" :
\"
"
.
$row
[
'bookId'
]
.
"
\"
,
\"
trip_status
\"
: 0}}},
\"
collapse_key
\"
:
\"
trip
\"
,
\"
priority
\"
:
\"
high
\"
,
\"
to
\"
:
\"
"
.
$row
[
'fcm_token'
]
.
"
\"
}"
;
$ch
=
curl_init
(
"https://fcm.googleapis.com/fcm/send"
);
$header
=
array
(
'Content-Type: application/json'
,
'Authorization: key='
.
$key
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
$header
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$data
);
$out
=
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_exec
(
$ch
);
curl_close
(
$ch
);
if
(
mysqli_num_rows
(
$result
)
<=
0
||
empty
(
$row
=
mysqli_fetch_assoc
(
$result
))
||
!
isset
(
$row
[
'app_id'
])
||
empty
(
$key
=
$row
[
'app_id'
])){
return
;
}
mysqli_query
(
$conn
,
"INSERT INTO crontab_notif VALUES ('',"
.
date
(
'Y-m-d'
)
.
","
.
date
(
'H:i:s'
)
.
")"
);
}
$conn
->
close
();
$date
=
date
(
'Y-m-d'
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +30 minutes"
));
$sTime
=
date
(
'H:i'
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +30 minutes"
));
$eTime
=
date
(
"H:i"
,
strtotime
(
date
(
"Y-m-d H:i:s"
)
.
" +31 minutes"
));
$sql
=
"SELECT CUST.customer_id,CUST.fcm_token,BOK.id AS booking_id,BOK.bookId,EVT.event_name
FROM booking AS BOK
INNER JOIN customer AS CUST ON (CUST.customer_id=BOK.customer_id)
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN event_date_time AS EDATE ON (EDATE.event_id=BOK.event_id)
WHERE EVT.status='1' AND BOK.status='1' AND USR.status='1' AND EDATE.status='1' AND
EDATE.date='
$date
' AND EDATE.time<='
$eTime
' AND EDATE.time>='
$sTime
'
GROUP BY BOK.id,CUST.customer_id"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
if
(
mysqli_num_rows
(
$result
)
>
0
)
{
while
(
$row
=
mysqli_fetch_assoc
(
$result
))
{
$data
=
"{
\"
notification
\"
: {
\"
title
\"
:
\"
"
.
$row
[
'event_name'
]
.
"
\"
,
\"
text
\"
:
\"
Booking Reminder
\"
,
\"
sound
\"
:
\"
default
\"
},
\"
time_to_live
\"
: 60,
\"
data
\"
: {\"
response
\
" : {\"
status
\
" :
\"
success
\"
,
\"
data
\"
: {\"
booking_id
\
" :
\"
"
.
$row
[
'bookId'
]
.
"
\"
,
\"
trip_status
\"
: 0}}},
\"
collapse_key
\"
:
\"
trip
\"
,
\"
priority
\"
:
\"
high
\"
,
\"
to
\"
:
\"
"
.
$row
[
'fcm_token'
]
.
"
\"
}"
;
$ch
=
curl_init
(
"https://fcm.googleapis.com/fcm/send"
);
$header
=
array
(
'Content-Type: application/json'
,
'Authorization: key='
.
$key
);
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
$header
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_setopt
(
$ch
,
CURLOPT_POST
,
1
);
curl_setopt
(
$ch
,
CURLOPT_POSTFIELDS
,
$data
);
$out
=
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
curl_exec
(
$ch
);
curl_close
(
$ch
);
}
mysqli_query
(
$conn
,
"INSERT INTO crontab_notif VALUES ('',"
.
date
(
'Y-m-d'
)
.
","
.
date
(
'H:i:s'
)
.
")"
);
}
$conn
->
close
();
?>
This diff is collapsed.
Click to expand it.
application/helpers/generals_helper.php
View file @
219bb552
...
...
@@ -156,25 +156,24 @@
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
),
'Promocode'
=>
array
(
1
,
2
,
3
,
4
),
'Country'
=>
array
(
1
,
2
,
3
,
4
));
'Checker'
=>
array
(
1
,
2
,
3
,
4
),
'Category'
=>
array
(
1
,
2
,
3
,
4
),
'Staff'
=>
array
(
1
,
2
,
3
,
4
),
'Venue'
=>
array
(
1
,
2
,
3
,
4
),
'City'
=>
array
(
1
,
2
,
3
,
4
),
'Commission'
=>
array
(
1
,
2
,
3
,
4
),
'Customer'
=>
array
(
1
,
2
,
3
,
4
),
'Booking'
=>
array
(
1
,
2
,
3
,
4
),
'Settings'
=>
array
(
1
,
2
,
3
,
4
),
'Notification'
=>
array
(
1
,
2
,
3
,
4
),
'Promocode'
=>
array
(
1
,
2
,
3
,
4
),
'Country'
=>
array
(
1
,
2
,
3
,
4
),
'HotelCity'
=>
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
(),
'
Venu
e'
=>
array
(
1
,
2
,
3
,
4
),
'City'
=>
array
(),
'Category'
=>
array
(),
'
Promocod
e'
=>
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
),
'
Promocode
'
=>
array
(
1
,
2
,
3
,
4
));
'Booking'
=>
array
(
1
,
2
,
3
,
4
),
'
Venue'
=>
array
(
1
,
2
,
3
,
4
),
'HotelCity
'
=>
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
));
'Event'
=>
array
(
1
,
2
,
3
,
4
),
'Checker'
=>
array
(
1
,
2
,
3
,
4
),
'Customer'
=>
array
(
1
,
2
,
3
,
4
),
'Organizer'
=>
array
(
1
,
2
,
3
,
4
),
'
Booking
'
=>
array
(
1
,
2
,
3
,
4
),
'
Notification'
=>
array
(
1
,
2
,
3
,
4
),
'HotelCity
'
=>
array
(
1
,
2
,
3
,
4
));
break
;
}
return
$menus
;
...
...
@@ -305,6 +304,27 @@
$langArr
[
'region_name'
.
$code
]
=
$name
;
}
break
;
case
'HCTY'
:
$cond
.=
"hotel_city_id='
$id
'"
;
$sql
=
"SELECT * FROM translator_hotel_city WHERE
$cond
$orderBy
"
;
$resp
=
$thisObj
->
db
->
query
(
$sql
)
->
result_array
();
$regName
=
''
;
if
(
empty
(
$lngCode
)){
$languages
=
getLanguages
();
foreach
(
$languages
AS
$lang
)
{
$langArr
[
'hotel_city_name_'
.
$lang
]
=
''
;
}
}
else
{
$langArr
[
'hotel_city_name'
]
=
''
;
}
foreach
(
$resp
AS
$data
)
{
$code
=
(
empty
(
$lngCode
))
?
'_'
.
$data
[
'language_code'
]
:
''
;
$regName
=
(
$code
==
'en'
)
?
$data
[
'hotel_city_name'
]
:
''
;
$name
=
(
!
empty
(
$data
[
'hotel_city_name'
]))
?
$data
[
'hotel_city_name'
]
:
$regName
;
$langArr
[
'hotel_city_name'
.
$code
]
=
$name
;
}
break
;
case
'TAG'
:
$cond
.=
"tag_id='
$id
'"
;
$sql
=
"SELECT * FROM translator_tag WHERE
$cond
$orderBy
"
;
...
...
This diff is collapsed.
Click to expand it.
application/models/Api_model.php
View file @
219bb552
This diff is collapsed.
Click to expand it.
application/models/Booking_model.php
View file @
219bb552
...
...
@@ -12,11 +12,11 @@ class Booking_model extends CI_Model {
$sql
=
"SELECT BOK.id AS booking_id,CUST.customer_id,CUST.name AS customer_name,EVT.provider_id,
CUST.phone AS customer_phone,CUST.email AS customer_email,CUST.gender,EVT.venue_id,
CUST.dob,CUST.city,CUST.profile_image,BOK.event_id,BOK.bookId,BOK.event_date_id,
CUST.dob,CUST.
profile_
city,CUST.profile_image,BOK.event_id,BOK.bookId,BOK.event_date_id,
BOK.qrcode,BOK.no_of_ticket,BOK.ticket_details,BOK.amount,EVT.has_payment,
BOK.reserved_by,BOK.status AS book_status,EVT.category_id,EVT.max_booking,
EVT.seat_pricing,EVT.custom_seat_layout,EVT.status AS evt_status,EDT.time,
HCAT.host_category,HCAT.show_layout,EDT.date,PRV.name AS provider_name,
HCAT.host_category,HCAT.show_layout,EDT.date,PRV.name AS provider_name,
BOK.booking_date,
PRV.email AS provider_email,PRV.phone AS provider_phone,VEN.location,
PRV.profile_image AS provider_image,TRANS.transaction_id,TRANS.status AS trans_status
FROM booking AS BOK
...
...
@@ -107,18 +107,17 @@ class Booking_model extends CI_Model {
$fields
=
str_replace
(
array
(
'EVT.event_name,'
,
'EVT.event_description,'
,
'ECAT.category,'
,
'VEN.venue_name,'
,
'REG.name_en AS Region,'
),
''
,
$fields
);
$sql
=
"SELECT EVT.event_id,EVT.category_id,VEN.id AS venue_id,REG.id AS region_id,"
.
$fields
.
"
FROM booking AS BOK
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN customer AS CUST ON (CUST.customer_id=BOK.customer_id)
INNER JOIN event_category AS ECAT ON (ECAT.cat_id=EVT.category_id)
INNER JOIN venue AS VEN ON (VEN.id=EVT.venue_id)
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
INNER
JOIN region AS REG ON (REG.id=VEN.region_id)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
FROM booking AS BOK
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN customer AS CUST ON (CUST.customer_id=BOK.customer_id)
INNER JOIN event_category AS ECAT ON (ECAT.cat_id=EVT.category_id)
INNER JOIN venue AS VEN ON (VEN.id=EVT.venue_id)
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
LEFT
JOIN region AS REG ON (REG.id=VEN.region_id)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
"
.
$where_clause
.
"
GROUP BY Booking_ID
ORDER BY BOK.id ASC"
;
$reportData
=
$this
->
db
->
query
(
$sql
);
...
...
This diff is collapsed.
Click to expand it.
application/models/Event_model.php
View file @
219bb552
...
...
@@ -209,7 +209,7 @@ class Event_model extends CI_Model {
if
(
empty
(
$event_id
)
||
empty
(
$eventData
)){
return
0
;
}
$this
->
db
->
delete
(
'event_date_time'
,
array
(
'event_id'
=>
$event_id
));
$this
->
db
->
update
(
'event_date_time'
,
array
(
'status'
=>
'0'
)
,
array
(
'event_id'
=>
$event_id
));
$status
=
$this
->
db
->
insert_batch
(
'event_date_time'
,
$eventData
);
return
$status
;
}
...
...
This diff is collapsed.
Click to expand it.
application/models/Validation_app_model.php
View file @
219bb552
...
...
@@ -47,8 +47,7 @@ class Validation_app_model extends CI_Model {
'customer_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER29'
,
'message'
=>
'Customer id is null or empty'
)),
'event_date_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER30'
,
'message'
=>
'Event date id is null or empty'
)),
'no_of_ticket'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER31'
,
'message'
=>
'Number of ticket is null or empty'
)),
'ticket_details'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER32'
,
'message'
=>
'Ticket details is null or empty'
)),
'amount'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER33'
,
'message'
=>
'Amount is null or empty'
)),),
'ticket_details'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER32'
,
'message'
=>
'Ticket details is null or empty'
))),
'cancel_booking'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
)),
'booking_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER34'
,
'message'
=>
'Booking Id is null or empty'
)),),
'update_fcm_token'
=>
array
(
'auth_token'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER17'
,
'message'
=>
'User Id is null or empty'
)),
...
...
This diff is collapsed.
Click to expand it.
application/models/Webservice_model.php
View file @
219bb552
This diff is collapsed.
Click to expand it.
application/views/Booking/generate.php
View file @
219bb552
...
...
@@ -126,6 +126,7 @@
'BOK.ticket_details AS Ticket_Details'
=>
'Ticked Details'
,
'BOK.amount AS Amount'
=>
'Booking Amount'
,
'BOK.reserved_by AS Reserved_By'
=>
'Reserved By'
,
'BOK.booking_date AS Booking_Time'
=>
'Booking Time'
,
'BOK.status AS Book_Status'
=>
'Booking Status'
)
),
...
...
@@ -141,7 +142,7 @@
array
(
'CUST.name AS Customer_Name'
=>
'Customer Name'
,
'CUST.phone AS Customer_Phone'
=>
'Customer Phone'
,
'CUST.email AS Customer_Email'
=>
'Customer Email'
,
'CUST.city AS Customer_City'
=>
'Customer City'
'CUST.
profile_
city AS Customer_City'
=>
'Customer City'
)
),
array
(
'name'
=>
'Provider Details'
,
...
...
This diff is collapsed.
Click to expand it.
application/views/Booking/viewBookingDetails.php
View file @
219bb552
...
...
@@ -124,6 +124,18 @@
<div
class=
"row"
>
<div
class=
"col-md-2"
>
Booking Time
</div>
<div
class=
"col-md-1"
style=
"padding-left: 52px;"
>
:
</div>
<div
class=
"col-md-9"
>
<?=
$bookData
->
booking_date
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-2"
>
Event Name
</div>
<div
class=
"col-md-1"
style=
"padding-left: 52px;"
>
...
...
@@ -206,6 +218,17 @@
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"row"
>
<div
class=
"col-md-5"
>
Customer City
</div>
<div
class=
"col-md-1"
>
:
</div>
<div
class=
"col-md-5"
>
<?=
$bookData
->
profile_city
?>
</div>
</div>
</div>
</div>
...
...
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