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
ef439d5b
Commit
ef439d5b
authored
Oct 04, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
e680e527
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
Api_model.php
application/models/Api_model.php
+6
-5
Webservice_model.php
application/models/Webservice_model.php
+4
-2
No files found.
application/models/Api_model.php
View file @
ef439d5b
...
...
@@ -1356,19 +1356,20 @@ class Api_model extends CI_Model {
array
(
'bookId'
=>
$trBook
[
'booking_id'
]));
$bkData
=
$this
->
db
->
query
(
"
SELECT
EVT.event_name_en
,CONCAT(EDATE.date,' ',EDATE.time) AS show_time,
SELECT
TEVT.event_name
,CONCAT(EDATE.date,' ',EDATE.time) AS show_time,
CUST.name,CUST.email,CUST.phone
FROM booking AS BK
INNER JOIN events AS EVT ON (EVT.event_id=BK.event_id)
INNER JOIN translator_event AS TEVT ON (TEVT.event_id=EVT.event_id)
INNER JOIN customer AS CUST ON (CUST.customer_id=BK.customer_id)
INNER JOIN event_date_time AS EDATE ON (EDATE.id=BK.event_date_id)
WHERE BK.bookId='"
.
$trBook
[
'booking_id'
]
.
"' AND EVT.status='1' AND
BK.status='1' AND EDATE.status='1'"
)
->
row_array
();
BK.status='1' AND EDATE.status='1'
AND TEVT.language_code='EN'
"
)
->
row_array
();
if
(
!
empty
(
$bkData
)){
$subject
=
"Your Tickets - TimeOut"
;
$showTime
=
date
(
"d'S F Y - h:i, (l)"
,
strtotime
(
$bkData
[
'show_time'
]));
$msgContent
=
"Hi, Your booking is confirmed for the event '"
.
$bkData
[
'event_name
_en
'
]
.
$msgContent
=
"Hi, Your booking is confirmed for the event '"
.
$bkData
[
'event_name'
]
.
"' and show is on '"
.
$showTime
.
"'. Booking ID "
.
$trBook
[
'booking_id'
];
$message
=
"<html><body><p>"
.
$msgContent
.
"</p></body></html>"
;
...
...
@@ -1376,7 +1377,7 @@ class Api_model extends CI_Model {
if
(
isset
(
$template
[
'booking_mail'
])
&&
!
empty
(
$template
[
'booking_mail'
])){
$msgContent
=
str_replace
(
array
(
'{:event_name}'
,
'{:booking_id}'
,
'{:time}'
),
array
(
$bkData
[
'event_name
_en
'
],
$trBook
[
'booking_id'
],
$showTime
),
array
(
$bkData
[
'event_name'
],
$trBook
[
'booking_id'
],
$showTime
),
$template
[
'booking_mail'
]);
}
$this
->
send_mail
(
$subject
,
$bkData
[
'email'
],
$message
);
...
...
@@ -1384,7 +1385,7 @@ class Api_model extends CI_Model {
if
(
isset
(
$template
[
'booking_sms'
])
&&
!
empty
(
$template
[
'booking_sms'
])){
$msgContent
=
str_replace
(
array
(
'{:event_name}'
,
'{:booking_id}'
,
'{:time}'
),
array
(
$bkData
[
'event_name
_en
'
],
$trBook
[
'booking_id'
],
$showTime
),
array
(
$bkData
[
'event_name'
],
$trBook
[
'booking_id'
],
$showTime
),
$template
[
'booking_sms'
]);
}
$this
->
sendSMS
(
$bkData
[
'phone'
],
$msgContent
);
...
...
application/models/Webservice_model.php
View file @
ef439d5b
...
...
@@ -1782,8 +1782,9 @@ class Webservice_model extends CI_Model {
WHERE ("
.
$phNumbers
.
") AND
customer_id NOT IN (SELECT from_user FROM chats WHERE (from_user=
$user_id
AND type='2') OR (to_user =
$user_id
AND type='2')) AND
customer_id NOT IN (SELECT to_user FROM chats WHERE (from_user=
$user_id
AND type='2') OR (to_user =
$user_id
AND type='2'))"
);
$respArr
[
'status'
]
=
1
;
if
(
!
empty
(
$result
)
&&
!
empty
(
$result
=
$result
->
result_array
())){
if
(
!
empty
(
$result
)
&&
!
empty
(
$result
=
$result
->
result_array
())){
$respArr
[
'status'
]
=
1
;
$respArr
[
'data'
]
=
$result
;
}
else
{
$respArr
[
'message'
]
=
'No Data Found'
;
...
...
@@ -1834,6 +1835,7 @@ class Webservice_model extends CI_Model {
$respArr
=
array
(
'status'
=>
0
,
'code'
=>
'918'
,
'message'
=>
'No Request for you'
);
$user_id
=
$this
->
auth_token_get
(
$data
[
'auth_token'
]);
$result
=
$this
->
db
->
query
(
"SELECT from_user,to_user,type FROM chats WHERE (from_user=
$user_id
OR to_user=
$user_id
) AND type IN('0','1')"
)
->
result_array
();
$custData
=
array
();
if
(
!
empty
(
$result
)){
foreach
(
$result
as
$key
=>
$value
)
{
if
(
$value
[
'type'
]
==
0
){
...
...
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