Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
453df0d0
Commit
453df0d0
authored
Jul 23, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
e1acc674
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Webservices.php
application/controllers/Webservices.php
+2
-2
Booking_model.php
application/models/Booking_model.php
+3
-0
No files found.
application/controllers/Webservices.php
View file @
453df0d0
...
...
@@ -1458,9 +1458,9 @@
return
;
}
// $data = "{ \"notification\": { \"title\": \"".$fcm_data['title']."\", \"text\": \"".$fcm_data['message']."\", \"sound\": \"default\" }, \"time_to_live\": 60, \"data\" : {\"response\" : {\"status\" : \"success\", \"data\" : {\"booking
_id\" : \"".$fcm_data['booking_id']."\", \"type\" : \"".$fcm_data['service_type']."\"}}}, \"collapse_key\" : \"trip\", \"priority\":\"high\", \"to\" : \"".$fcm_data['device_id']."\"}";
$data
=
"{
\"
notification
\"
: {
\"
title
\"
:
\"
"
.
$fcm_data
[
'title'
]
.
"
\"
,
\"
text
\"
:
\"
"
.
$fcm_data
[
'message'
]
.
"
\"
,
\"
sound
\"
:
\"
default
\"
},
\"
time_to_live
\"
: 60,
\"
data
\"
: {\"
response
\
" : {\"
status
\
" :
\"
success
\"
,
\"
data
\"
: {\"
service
_id
\
" :
\"
"
.
$fcm_data
[
'booking_id'
]
.
"
\"
,
\"
type
\"
:
\"
"
.
$fcm_data
[
'service_type'
]
.
"
\"
}}},
\"
collapse_key
\"
:
\"
trip
\"
,
\"
priority
\"
:
\"
high
\"
,
\"
to
\"
:
\"
"
.
$fcm_data
[
'device_id'
]
.
"
\"
}"
;
$data
=
"
{
\"data\":{\"params\":{\"service_id\":\"".$fcm_data['booking_id']."\"},\"type\":\"".$fcm_data['service_type']."\"},\"to\":\"".$fcm_data['device_id']."\"
}
"
;
//
$data = "{\"data\":{\"params\":{\"service_id\":\"".$fcm_data['booking_id']."\"},\"type\":\"".$fcm_data['service_type']."\"},\"to\":\"".$fcm_data['device_id']."\"}";
$ch
=
curl_init
(
"https://fcm.googleapis.com/fcm/send"
);
$header
=
array
(
'Content-Type: application/json'
,
'Authorization: key='
.
$key
);
...
...
application/models/Booking_model.php
View file @
453df0d0
...
...
@@ -113,6 +113,9 @@ class Booking_model extends CI_Model {
$bookDetails
=
array
();
$bookData
=
$bookData
->
result
();
foreach
(
$bookData
AS
$book
)
{
if
(
empty
(
$book
->
scheduled_date
)
||
empty
(
$book
->
scheduled_time
)){
continue
;
}
$bookMechData
=
$this
->
db
->
query
(
"SELECT * FROM mechanic_booking
WHERE booking_id='
$book->booking_id
' AND status!='2'"
);
if
(
!
empty
(
$bookMechData
)){
...
...
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