Commit ef439d5b by Tobin

dc

parent e680e527
......@@ -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);
......
......@@ -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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment