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
380a3def
Commit
380a3def
authored
Jan 23, 2020
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change in hotel booking and bookedList api
parent
aab1308e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
Api_model.php
application/models/Api_model.php
+4
-4
Webservice_model.php
application/models/Webservice_model.php
+9
-5
No files found.
application/models/Api_model.php
View file @
380a3def
...
@@ -1806,10 +1806,10 @@ class Api_model extends CI_Model {
...
@@ -1806,10 +1806,10 @@ class Api_model extends CI_Model {
return
;
return
;
}
}
$bookId
=
'HTL'
.
date
(
'ymd'
)
.
str_pad
(
rand
(
1111
,
9999
),
4
,
0
,
STR_PAD_LEFT
);
$bookId
=
'HTL'
.
date
(
'ymd'
)
.
str_pad
(
rand
(
1111
,
9999
),
4
,
0
,
STR_PAD_LEFT
);
$insert
=
array
(
'hotel_book_id'
=>
$bookId
,
'
hotel_name'
=>
$bookData
[
'hotelName'
],
$insert
=
array
(
'hotel_book_id'
=>
$bookId
,
'
customer_id'
=>
$user_id
,
'hotel_name'
=>
'hotel_image'
=>
$bookData
[
'hotelImage'
],
'checkin'
=>
$bookData
[
'checkin'
],
$bookData
[
'hotelName'
],
'hotel_image'
=>
$bookData
[
'hotelImage'
],
'checkin'
=>
'checkout'
=>
$bookData
[
'checkout'
],
'price'
=>
$bookData
[
'amount'
],
$bookData
[
'checkin'
],
'checkout'
=>
$bookData
[
'checkout'
],
'price'
=>
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
])
);
$bookData
[
'amount'
],
'request_data'
=>
json_encode
(
$bookData
[
'requestData'
]),
'traveller_details'
=>
$bookData
[
'requestData'
]
->
traveller_details
);
$this
->
db
->
insert
(
'hotel_booking'
,
$insert
);
$this
->
db
->
insert
(
'hotel_booking'
,
$insert
);
$this
->
db
->
insert
(
'orders'
,
array
(
'booking_id'
=>
$bookId
,
'order_type'
=>
'2'
,
'created_date'
=>
date
(
'Y-m-d h:i:s'
)));
$this
->
db
->
insert
(
'orders'
,
array
(
'booking_id'
=>
$bookId
,
'order_type'
=>
'2'
,
'created_date'
=>
date
(
'Y-m-d h:i:s'
)));
return
array
(
'status'
=>
1
,
'transaction_id'
=>
$bookId
);
return
array
(
'status'
=>
1
,
'transaction_id'
=>
$bookId
);
...
...
application/models/Webservice_model.php
View file @
380a3def
...
@@ -1434,11 +1434,15 @@ class Webservice_model extends CI_Model {
...
@@ -1434,11 +1434,15 @@ class Webservice_model extends CI_Model {
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
if
(
$user_id
>
0
)
{
if
(
$user_id
>
0
)
{
$count
=
$this
->
db
->
query
(
"
$count
=
$this
->
db
->
query
(
"
SELECT BOK.id FROM booking AS BOK
SELECT ODR.order_id FROM orders AS ODR
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN booking AS BOK ON
INNER JOIN event_date_time AS EDT ON (EVT.event_id=EVT.event_id)
(ODR.booking_id=BOK.bookId AND BOK.status IN (0,1,2,3,5,6))
WHERE BOK.customer_id='
$user_id
' AND BOK.status IN (0,1,2,6) AND EVT.status='1'
INNER JOIN flight_booking AS FBK ON
GROUP BY BOK.id"
)
->
num_rows
();
(ODR.booking_id=FBK.flight_book_id AND FBK.status IN (0,1,2,3,5))
INNER JOIN hotel_booking AS HBK ON
(ODR.booking_id=HBK.hotel_book_id AND HBK.status IN (0,1,2,3,5))
WHERE BOK.customer_id='
$user_id
' AND EVT.status='1'
GROUP BY ODR.order_id"
)
->
num_rows
();
if
(
$count
>
0
)
{
if
(
$count
>
0
)
{
if
(
isset
(
$data
[
'page'
]))
{
if
(
isset
(
$data
[
'page'
]))
{
...
...
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