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
76f70e67
Commit
76f70e67
authored
Jan 22, 2020
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.techware.co.in/timeout/timeOut
into tobin
parents
1f3b2050
e119aeaa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
FlightServices.php
application/controllers/FlightServices.php
+1
-1
FlightServices_model.php
application/models/FlightServices_model.php
+7
-3
Webservice_model.php
application/models/Webservice_model.php
+2
-2
No files found.
application/controllers/FlightServices.php
View file @
76f70e67
...
@@ -108,7 +108,7 @@ class FlightServices extends CI_Controller {
...
@@ -108,7 +108,7 @@ class FlightServices extends CI_Controller {
public
function
flight_book
(){
public
function
flight_book
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$data
[
'auth_token'
]
=
$this
->
auth_token
;
$res
=
$thi
a
->
FlightServices_model
->
flight_book
(
$data
);
$res
=
$thi
s
->
FlightServices_model
->
flight_book
(
$data
);
if
(
$res
[
'status'
]
==
1
){
if
(
$res
[
'status'
]
==
1
){
$this
->
response
(
$res
[
'data'
]);
$this
->
response
(
$res
[
'data'
]);
}
else
{
}
else
{
...
...
application/models/FlightServices_model.php
View file @
76f70e67
...
@@ -116,12 +116,16 @@ class FlightServices_model extends CI_Model {
...
@@ -116,12 +116,16 @@ class FlightServices_model extends CI_Model {
$data
[
'issue_country'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'issue_country'
]);
$data
[
'issue_country'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'issue_country'
]);
$data
[
'passport_expiry'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'passport_expiry'
]);
$data
[
'passport_expiry'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'passport_expiry'
]);
$data
[
'passport_no'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'passport_no'
]);
$data
[
'passport_no'
]
=
str_replace
(
" "
,
"<br>"
,
$data
[
'passport_no'
]);
$childMealplan
=
(
isset
(
$data
[
'childMealplan'
])
&&
!
empty
(
$data
[
'childMealplan'
]))
?
$data
[
'childMealplan'
]
:
''
;
$infantMealplan
=
(
isset
(
$data
[
'infantMealplan'
])
&&
!
empty
(
$data
[
'infantMealplan'
]))
?
$data
[
'infantMealplan'
]
:
''
;
$adultmealplan
=
(
isset
(
$data
[
'adultmealplan'
])
&&
!
empty
(
$data
[
'adultmealplan'
]))
?
$data
[
'adultmealplan'
]
:
''
;
$postCode
=
(
isset
(
$data
[
'PostCode'
])
&&
!
empty
(
$data
[
'PostCode'
]))
?
$data
[
'PostCode'
]
:
''
;
$url
=
"https://trawex.biz/api/flight_trawex/book?user_id="
.
$settings
[
'trawex_user_id'
]
.
"&user_password="
.
$settings
[
'trawex_user_password'
]
.
"&access="
.
$settings
[
'trawex_access'
]
.
"&ip_address="
.
$settings
[
'trawex_ip_address'
]
.
"&target="
.
$data
[
'target'
]
.
"&session_id="
.
$data
[
'session_id'
]
.
"&area_code="
.
$data
[
'area_code'
]
.
"&country_code="
.
$data
[
'country_code'
]
.
"&first_name="
.
$data
[
'first_name'
]
.
"&last_name="
.
$data
[
'last_name'
]
.
"&title="
.
$data
[
'title'
]
.
"&email_id="
.
$data
[
'email_id'
]
.
"&mobile_no="
.
$data
[
'mobile_no'
]
.
"&dob="
.
$data
[
'dob'
]
.
"&gender="
.
$data
[
'gender'
]
.
"&issue_country="
.
$data
[
'issue_country'
]
.
"&passport_expiry="
.
$data
[
'passport_expiry'
]
.
"&passport_no="
.
$data
[
'passport_no'
]
.
"&type="
.
$data
[
'type'
]
.
"&IsPassportMandatory="
.
$data
[
'IsPassportMandatory'
]
.
"&adult_flight="
.
$data
[
'adult_flight'
]
.
"&child_flight="
.
$data
[
'child_flight'
]
.
"&infant_flight="
.
$data
[
'infant_flight'
]
.
"&frequentFlyrNum="
.
$data
[
'frequentFlyrNum'
]
.
"&adultmealplan="
.
$
data
[
'adultmealplan'
]
.
"&child_dob="
.
$data
[
'child_dob'
]
.
"&child_gender="
.
$data
[
'child_gender'
]
.
"&child_title="
.
$data
[
'child_title'
]
.
"&child_first_name="
.
$data
[
'child_first_name'
]
.
"&child_last_name="
.
$data
[
'child_last_name'
]
.
"&child_passport_expiry_date="
.
$data
[
'child_passport_expiry_date'
]
.
"&child_passport_no="
.
$data
[
'child_passport_no'
]
.
"&child_frequentFlyrNum="
.
$data
[
'child_frequentFlyrNum'
]
.
"&childMealplan="
.
$data
[
'childMealplan'
]
.
"&infant_dob="
.
$data
[
'infant_dob'
]
.
"&infant_gender="
.
$data
[
'infant_gender'
]
.
"&infant_first_name="
.
$data
[
'infant_first_name'
]
.
"&infant_last_name="
.
$data
[
'infant_last_name'
]
.
"&infant_title="
.
$data
[
'infant_title'
]
.
"&infantMealplan="
.
$data
[
'infantMealplan'
]
.
"&FareSourceCode="
.
$data
[
'FareSourceCode'
]
.
"&PostCode="
.
$data
[
'PostCode'
]
.
""
;
$url
=
"https://trawex.biz/api/flight_trawex/book?user_id="
.
$settings
[
'trawex_user_id'
]
.
"&user_password="
.
$settings
[
'trawex_user_password'
]
.
"&access="
.
$settings
[
'trawex_access'
]
.
"&ip_address="
.
$settings
[
'trawex_ip_address'
]
.
"&target="
.
$data
[
'target'
]
.
"&session_id="
.
$data
[
'session_id'
]
.
"&area_code="
.
$data
[
'area_code'
]
.
"&country_code="
.
$data
[
'country_code'
]
.
"&first_name="
.
$data
[
'first_name'
]
.
"&last_name="
.
$data
[
'last_name'
]
.
"&title="
.
$data
[
'title'
]
.
"&email_id="
.
$data
[
'email_id'
]
.
"&mobile_no="
.
$data
[
'mobile_no'
]
.
"&dob="
.
$data
[
'dob'
]
.
"&gender="
.
$data
[
'gender'
]
.
"&issue_country="
.
$data
[
'issue_country'
]
.
"&passport_expiry="
.
$data
[
'passport_expiry'
]
.
"&passport_no="
.
$data
[
'passport_no'
]
.
"&type="
.
$data
[
'type'
]
.
"&IsPassportMandatory="
.
$data
[
'IsPassportMandatory'
]
.
"&adult_flight="
.
$data
[
'adult_flight'
]
.
"&child_flight="
.
$data
[
'child_flight'
]
.
"&infant_flight="
.
$data
[
'infant_flight'
]
.
"&frequentFlyrNum="
.
$data
[
'frequentFlyrNum'
]
.
"&adultmealplan="
.
$
adultmealplan
.
"&child_dob="
.
$data
[
'child_dob'
]
.
"&child_gender="
.
$data
[
'child_gender'
]
.
"&child_title="
.
$data
[
'child_title'
]
.
"&child_first_name="
.
$data
[
'child_first_name'
]
.
"&child_last_name="
.
$data
[
'child_last_name'
]
.
"&child_passport_expiry_date="
.
$data
[
'child_passport_expiry_date'
]
.
"&child_passport_no="
.
$data
[
'child_passport_no'
]
.
"&child_frequentFlyrNum="
.
$data
[
'child_frequentFlyrNum'
]
.
"&childMealplan="
.
$childMealplan
.
"&infant_dob="
.
$data
[
'infant_dob'
]
.
"&infant_gender="
.
$data
[
'infant_gender'
]
.
"&infant_first_name="
.
$data
[
'infant_first_name'
]
.
"&infant_last_name="
.
$data
[
'infant_last_name'
]
.
"&infant_title="
.
$data
[
'infant_title'
]
.
"&infantMealplan="
.
$infantMealplan
.
"&FareSourceCode="
.
$data
[
'FareSourceCode'
]
.
"&PostCode="
.
$postCode
.
""
;
$result
=
$this
->
passToJsonCurl
(
$url
,
''
);
$result
=
$this
->
passToJsonCurl
(
$url
,
''
);
if
(
!
empty
(
$result
)){
if
(
!
empty
(
$result
)){
$result
=
json_decode
(
$result
);
$result
=
json_decode
(
$result
);
$res
=
array
(
'status'
=>
1
,
'
result
'
=>
$result
);
$res
=
array
(
'status'
=>
1
,
'
data
'
=>
$result
);
}
else
{
}
else
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER08'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER08'
);
}
}
...
@@ -197,7 +201,7 @@ class FlightServices_model extends CI_Model {
...
@@ -197,7 +201,7 @@ class FlightServices_model extends CI_Model {
try
{
try
{
$cond
=
''
;
$cond
=
''
;
if
(
isset
(
$data
[
'query'
])
&&
!
empty
(
$data
[
'query'
])){
if
(
isset
(
$data
[
'query'
])
&&
!
empty
(
$data
[
'query'
])){
$cond
=
"WHERE airport_code LIKE '%"
.
$data
[
'query'
]
.
"%' OR airport_name LIKE '%"
.
$data
[
'query'
]
.
"%'"
;
$cond
=
"WHERE airport_code LIKE '%"
.
$data
[
'query'
]
.
"%' OR airport_name LIKE '%"
.
$data
[
'query'
]
.
"%'
OR city LIKE '%"
.
$data
[
'query'
]
.
"%'
"
;
}
}
$sql
=
"SELECT id FROM airport_details
$cond
"
;
$sql
=
"SELECT id FROM airport_details
$cond
"
;
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
...
...
application/models/Webservice_model.php
View file @
76f70e67
...
@@ -1971,7 +1971,7 @@ class Webservice_model extends CI_Model {
...
@@ -1971,7 +1971,7 @@ class Webservice_model extends CI_Model {
if
(
$data
[
'add_as_friend'
]
==
1
){
if
(
$data
[
'add_as_friend'
]
==
1
){
$toCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$fromUser
))
->
row_array
();
$toCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$fromUser
))
->
row_array
();
$frmCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$user_id
))
->
row_array
();
$frmCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$user_id
))
->
row_array
();
$fcmData
=
array
(
'id'
=>
$user_id
,
'param'
=>
'
user
_id'
,
$fcmData
=
array
(
'id'
=>
$user_id
,
'param'
=>
'
friend
_id'
,
'title'
=>
'Accepted Chat Request'
,
'title'
=>
'Accepted Chat Request'
,
'message'
=>
$frmCustData
[
'name'
]
.
' has Accepted Your Chat Request'
);
'message'
=>
$frmCustData
[
'name'
]
.
' has Accepted Your Chat Request'
);
push_sent_cancel
(
1
,
$toCustData
[
'fcm_token'
],
$fcmData
);
push_sent_cancel
(
1
,
$toCustData
[
'fcm_token'
],
$fcmData
);
...
@@ -1995,7 +1995,7 @@ class Webservice_model extends CI_Model {
...
@@ -1995,7 +1995,7 @@ class Webservice_model extends CI_Model {
$toCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$toUser
))
->
row_array
();
$toCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$toUser
))
->
row_array
();
$frmCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$user_id
))
->
row_array
();
$frmCustData
=
$this
->
db
->
get_where
(
'customer'
,
array
(
'customer_id'
=>
$user_id
))
->
row_array
();
$fcmData
=
array
(
'id'
=>
$toUser
,
'param'
=>
'
user
_id'
,
$fcmData
=
array
(
'id'
=>
$toUser
,
'param'
=>
'
friend
_id'
,
'title'
=>
'New Chat Request'
,
'title'
=>
'New Chat Request'
,
'message'
=>
'You got a New Chat Request from '
.
$toCustData
[
'name'
]);
'message'
=>
'You got a New Chat Request from '
.
$toCustData
[
'name'
]);
push_sent_cancel
(
1
,
$frmCustData
[
'fcm_token'
],
$fcmData
);
push_sent_cancel
(
1
,
$frmCustData
[
'fcm_token'
],
$fcmData
);
...
...
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