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
78e66e27
Commit
78e66e27
authored
Nov 21, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
Master See merge request
!213
parents
016e0446
fb48d613
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
15 deletions
+21
-15
Notification.php
application/controllers/Notification.php
+2
-2
generals_helper.php
application/helpers/generals_helper.php
+2
-2
Api_model.php
application/models/Api_model.php
+2
-2
Organizer_model.php
application/models/Organizer_model.php
+1
-1
Validation_app_model.php
application/models/Validation_app_model.php
+6
-0
Webservice_model.php
application/models/Webservice_model.php
+8
-8
No files found.
application/controllers/Notification.php
View file @
78e66e27
...
@@ -125,7 +125,7 @@ class Notification extends CI_Controller {
...
@@ -125,7 +125,7 @@ class Notification extends CI_Controller {
'title'
=>
$event_data
->
event_name_EN
,
'title'
=>
$event_data
->
event_name_EN
,
'param'
=>
'event_id'
,
'param'
=>
'event_id'
,
'message'
=>
$message
);
'message'
=>
$message
);
push_sent_cancel
(
$user
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
1
,
$user
[
'fcm_token'
],
$userData
);
}
}
$flashMsg
[
'class'
]
=
'success'
;
$flashMsg
[
'class'
]
=
'success'
;
...
@@ -156,7 +156,7 @@ class Notification extends CI_Controller {
...
@@ -156,7 +156,7 @@ class Notification extends CI_Controller {
'param'
=>
'booking_id'
,
'param'
=>
'booking_id'
,
'title'
=>
$bData
[
'event_name_en'
],
'title'
=>
$bData
[
'event_name_en'
],
'message'
=>
'Booking Remainder'
);
'message'
=>
'Booking Remainder'
);
push_sent_cancel
(
$bData
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
1
,
$bData
[
'fcm_token'
],
$userData
);
}
}
}
}
}
}
...
...
application/helpers/generals_helper.php
View file @
78e66e27
...
@@ -397,9 +397,9 @@
...
@@ -397,9 +397,9 @@
return
$langArr
;
return
$langArr
;
}
}
function
push_sent_cancel
(
$fcm_token
=
''
,
$fcm_data
=
array
())
{
function
push_sent_cancel
(
$
app
=
'1'
,
$
fcm_token
=
''
,
$fcm_data
=
array
())
{
$settings
=
getSettings
();
$settings
=
getSettings
();
$key
=
$settings
[
'org_app_id'
];
$key
=
(
$app
==
'1'
)
?
$settings
[
'app_id'
]
:
$settings
[
'org_app_id'
];
if
(
empty
(
$key
)
||
empty
(
$fcm_token
)
||
empty
(
$fcm_data
)){
if
(
empty
(
$key
)
||
empty
(
$fcm_token
)
||
empty
(
$fcm_data
)){
return
;
return
;
}
}
...
...
application/models/Api_model.php
View file @
78e66e27
...
@@ -705,7 +705,7 @@ class Api_model extends CI_Model {
...
@@ -705,7 +705,7 @@ class Api_model extends CI_Model {
'title'
=>
'New Booking'
,
'title'
=>
'New Booking'
,
'param'
=>
'booking_id'
,
'param'
=>
'booking_id'
,
'message'
=>
'New Booking is There For Approval'
);
'message'
=>
'New Booking is There For Approval'
);
push_sent_cancel
(
$bkData
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
2
,
$bkData
[
'fcm_token'
],
$userData
);
}
}
}
}
}
else
{
}
else
{
...
@@ -1423,7 +1423,7 @@ class Api_model extends CI_Model {
...
@@ -1423,7 +1423,7 @@ class Api_model extends CI_Model {
'title'
=>
'New Booking'
,
'title'
=>
'New Booking'
,
'param'
=>
'booking_id'
,
'param'
=>
'booking_id'
,
'message'
=>
'New Booking is There For Approval'
);
'message'
=>
'New Booking is There For Approval'
);
push_sent_cancel
(
$bkData
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
2
,
$bkData
[
'fcm_token'
],
$userData
);
}
}
}
}
$this
->
db
->
update
(
'booking'
,
array
(
'status'
=>
$bokStatus
),
array
(
'bookId'
=>
$book_id
));
$this
->
db
->
update
(
'booking'
,
array
(
'status'
=>
$bokStatus
),
array
(
'bookId'
=>
$book_id
));
...
...
application/models/Organizer_model.php
View file @
78e66e27
...
@@ -1100,7 +1100,7 @@ class Organizer_model extends CI_Model {
...
@@ -1100,7 +1100,7 @@ class Organizer_model extends CI_Model {
'param'
=>
'booking_id'
,
'param'
=>
'booking_id'
,
'title'
=>
'Booking Approved'
,
'title'
=>
'Booking Approved'
,
'message'
=>
'Your Booking is Approved by the Event Provider'
);
'message'
=>
'Your Booking is Approved by the Event Provider'
);
push_sent_cancel
(
$bData
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
2
,
$bData
[
'fcm_token'
],
$userData
);
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Booking Accepted Successfully'
);
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Booking Accepted Successfully'
);
}
catch
(
Exception
$e
){
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South'
,
'code'
=>
'ER06'
);
...
...
application/models/Validation_app_model.php
View file @
78e66e27
...
@@ -664,6 +664,12 @@ class Validation_app_model extends CI_Model {
...
@@ -664,6 +664,12 @@ class Validation_app_model extends CI_Model {
'message'
=>
'Tracking Id is null or empty'
'message'
=>
'Tracking Id is null or empty'
)
)
),
),
'boardCode'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER02'
,
'message'
=>
'Board Code Field is null or empty'
)
),
),
),
'hotel_book'
=>
array
(
'hotel_book'
=>
array
(
'auth_token'
=>
array
(
'auth_token'
=>
array
(
...
...
application/models/Webservice_model.php
View file @
78e66e27
...
@@ -1215,7 +1215,7 @@ class Webservice_model extends CI_Model {
...
@@ -1215,7 +1215,7 @@ class Webservice_model extends CI_Model {
'param'
=>
'booking_id'
,
'param'
=>
'booking_id'
,
'title'
=>
'New Booking'
,
'title'
=>
'New Booking'
,
'message'
=>
'New Booking is There For Approval'
);
'message'
=>
'New Booking is There For Approval'
);
push_sent_cancel
(
$bkData
[
'fcm_token'
],
$userData
);
push_sent_cancel
(
2
,
$bkData
[
'fcm_token'
],
$userData
);
}
}
}
}
}
else
{
}
else
{
...
@@ -1911,10 +1911,10 @@ class Webservice_model extends CI_Model {
...
@@ -1911,10 +1911,10 @@ 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'
=>
$
toUser
,
'param'
=>
'user_id'
,
$fcmData
=
array
(
'id'
=>
$
user_id
,
'param'
=>
'user_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
(
$toCustData
[
'fcm_token'
],
$fcmData
);
push_sent_cancel
(
1
,
$toCustData
[
'fcm_token'
],
$fcmData
);
}
}
return
(
$status
)
?
1
:
0
;
return
(
$status
)
?
1
:
0
;
}
}
...
@@ -1936,9 +1936,9 @@ class Webservice_model extends CI_Model {
...
@@ -1936,9 +1936,9 @@ 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'
=>
'user_id'
,
'title'
=>
'New
Friend
Request'
,
'title'
=>
'New
Chat
Request'
,
'message'
=>
'You got a New
Friend
Request from '
.
$toCustData
[
'name'
]);
'message'
=>
'You got a New
Chat
Request from '
.
$toCustData
[
'name'
]);
push_sent_cancel
(
$frmCustData
[
'fcm_token'
],
$fcmData
);
push_sent_cancel
(
1
,
$frmCustData
[
'fcm_token'
],
$fcmData
);
}
else
if
(
!
empty
(
$result
)
&&
$result
[
'type'
]
==
'0'
){
}
else
if
(
!
empty
(
$result
)
&&
$result
[
'type'
]
==
'0'
){
$this
->
db
->
update
(
'chats'
,
array
(
'type'
=>
'1'
),
array
(
'chat_id'
=>
$result
[
'chat_id'
]));
$this
->
db
->
update
(
'chats'
,
array
(
'type'
=>
'1'
),
array
(
'chat_id'
=>
$result
[
'chat_id'
]));
}
}
...
@@ -2347,7 +2347,7 @@ class Webservice_model extends CI_Model {
...
@@ -2347,7 +2347,7 @@ 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
){
$settings
=
getSettings
();
$settings
=
getSettings
();
$url
=
"https://trawex.biz/api/hotel_trawexv5/get_
booking_term
s"
;
$url
=
"https://trawex.biz/api/hotel_trawexv5/get_
rate_rule
s"
;
$postData
=
array
(
$postData
=
array
(
"user_id"
=>
$settings
[
'trawex_user_id'
],
"user_id"
=>
$settings
[
'trawex_user_id'
],
"user_password"
=>
$settings
[
'trawex_user_password'
],
"user_password"
=>
$settings
[
'trawex_user_password'
],
...
@@ -2362,7 +2362,7 @@ class Webservice_model extends CI_Model {
...
@@ -2362,7 +2362,7 @@ class Webservice_model extends CI_Model {
"hotel_name"
=>
$data
[
'hotel_name'
],
"infosource"
=>
$data
[
'infosource'
],
"hotel_name"
=>
$data
[
'hotel_name'
],
"infosource"
=>
$data
[
'infosource'
],
"meal_code"
=>
$data
[
'meal_code'
],
"meal_code"
=>
$data
[
'meal_code'
],
"rate_basis_id"
=>
$data
[
'rate_basis_id'
],
"rate_basis_id"
=>
$data
[
'rate_basis_id'
],
"room_code"
=>
$data
[
'room_code'
],
"room_code"
=>
$data
[
'room_code'
],
"boardCode"
=>
$data
[
'boardCode'
],
"roomType_runno"
=>
$data
[
'roomType_runno'
]);
"roomType_runno"
=>
$data
[
'roomType_runno'
]);
$result
=
$this
->
passToJsonCurl
(
$url
,
$postData
);
$result
=
$this
->
passToJsonCurl
(
$url
,
$postData
);
if
(
!
empty
(
$result
)){
if
(
!
empty
(
$result
)){
...
...
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