Commit ad75e20c by Tobin

sms noti

parent f514e8fb
...@@ -134,21 +134,20 @@ class Customer extends CI_Controller { ...@@ -134,21 +134,20 @@ class Customer extends CI_Controller {
$subject = "Your TimeOut Account is now activated"; $subject = "Your TimeOut Account is now activated";
$email_id = $_POST['email']; $email_id = $_POST['email'];
$template = getNotifTemplate(); $template = getNotifTemplate();
$msgContent = "Hi, Welcome to TimeOut. Please use username: ".$_POST['email']."
$message = "<html> for access your account.";
<body> $message = "<html><body>".$msgContent."<br></body></html>";
Hi,\n\r Welcome to TimeOut. \r\n Please use username:
".$_POST['email']." for access your account <br>
</body>
</html>";
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){ if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message = str_replace(array('{:email}'),array($email_id), $message=str_replace(array('{:email}'),array($email_id),$template['registration_mail']);
$template['registration_mail']);
} }
$this->Api_model->send_mail($subject,$email_id,$message); $this->Api_model->send_mail($subject,$email_id,$message);
if(isset($template['registration_sms']) && !empty($template['registration_sms'])){
$msgContent=str_replace(array('{:email}'),array($email_id),$template['registration_sms']);
}
$this->Api_model->sendSMS($_POST['phone'],$msgContent);
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); $flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/viewCustomers')); redirect(base_url('Customer/viewCustomers'));
......
...@@ -46,9 +46,15 @@ class Notification extends CI_Controller { ...@@ -46,9 +46,15 @@ class Notification extends CI_Controller {
if(!isset($_POST['forgot_sms']) || empty($_POST['forgot_sms'])){ if(!isset($_POST['forgot_sms']) || empty($_POST['forgot_sms'])){
unset($_POST['forgot_sms']); unset($_POST['forgot_sms']);
} }
if(!isset($_POST['booking_sms']) || empty($_POST['booking_sms'])){
unset($_POST['booking_sms']);
}
if(!isset($_POST['verify_mail']) || empty($_POST['verify_mail'])){ if(!isset($_POST['verify_mail']) || empty($_POST['verify_mail'])){
unset($_POST['verify_mail']); unset($_POST['verify_mail']);
} }
if(!isset($_POST['booking_mail']) || empty($_POST['booking_mail'])){
unset($_POST['booking_mail']);
}
if(!isset($_POST['staff_reg_mail']) || empty($_POST['staff_reg_mail'])){ if(!isset($_POST['staff_reg_mail']) || empty($_POST['staff_reg_mail'])){
unset($_POST['staff_reg_mail']); unset($_POST['staff_reg_mail']);
} }
......
...@@ -74,20 +74,19 @@ class Api_model extends CI_Model { ...@@ -74,20 +74,19 @@ class Api_model extends CI_Model {
$data['phone'] = '966'.$data['phone']; $data['phone'] = '966'.$data['phone'];
} }
$customer_data = array('customer_id'=>$id,'phone'=>$data['phone'],'email_verified'=>'0', $customer_data = array('customer_id'=>$id,'phone'=>$data['phone'],
'email'=>$data['email_id'],'name'=>$data['name'], 'email_verified'=>'0','email'=>$data['email_id'],
'confirm_link'=>$unique_id); 'name'=>$data['name'],'confirm_link'=>$unique_id);
$this->db->insert('customer', $customer_data); $this->db->insert('customer', $customer_data);
$subject = "TimeOut, Verify your account"; $subject = "TimeOut, Verify your account";
$email_id = $data['email_id']; $email_id = $data['email_id'];
$reset_link = base_url().'Api/verifyMail/'.$unique_id; $reset_link = base_url().'Api/verifyMail/'.$unique_id;
$message = "<html> $msgContent = "Hi, Welcome to TimeOut. Please Verify your E-mail for the username:
<body> ".$email_id.". User the following link verify your account
Hi,\n\r Welcome to TimeOut. \r\n Please Verify your E-mail for the username: ".$email_id.". User the following link verify your account ".$reset_link.". ".$reset_link.".";
</body> $message = "<html><body>".$msgContent."</body></html>";
</html>";
$template = getNotifTemplate(); $template = getNotifTemplate();
if(isset($template['verify_mail']) && !empty($template['verify_mail'])){ if(isset($template['verify_mail']) && !empty($template['verify_mail'])){
...@@ -96,6 +95,8 @@ class Api_model extends CI_Model { ...@@ -96,6 +95,8 @@ class Api_model extends CI_Model {
$template['verify_mail']); $template['verify_mail']);
} }
$this->send_mail($subject,$email_id,$message); $this->send_mail($subject,$email_id,$message);
$res = array('status'=>1,'data'=>''); $res = array('status'=>1,'data'=>'');
// $this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city'); // $this->db->select('customer.name,customer.dob,customer.phone,customer.email,customer.profile_image AS image,customer.gender,users.id AS userId, customer.city');
...@@ -155,19 +156,16 @@ class Api_model extends CI_Model { ...@@ -155,19 +156,16 @@ class Api_model extends CI_Model {
$subject = "TimeOut: Forgot Password"; $subject = "TimeOut: Forgot Password";
$url = 'https://timeout.sa/staging/forgot/?reset_key='.$unique_id; $url = 'https://timeout.sa/staging/forgot/?reset_key='.$unique_id;
$msgContent = "Hi, Welcome to TimeOut. Please use this link
$message = "<html> for reset your password: ".$url;
<body> $message = "<html><body><p>".$msgContent."</p></body></html>";
<p>Please use mentioned link for reset your password: ".$url."</p>
</body>
</html>";
$template = getNotifTemplate(); $template = getNotifTemplate();
if(isset($template['forgot_mail']) && !empty($template['forgot_mail'])){ if(isset($template['forgot_mail']) && !empty($template['forgot_mail'])){
$message = str_replace(array('{:url}'),array($url),$template['forgot_mail']); $message = str_replace(array('{:url}'),array($url),$template['forgot_mail']);
} }
$result = $this->send_mail($subject,$data['email_id'],$message); $result = $this->send_mail($subject,$data['email_id'],$message);
if($result){ if($result){
$res = array('status'=>1,'data'=>null); $res = array('status'=>1,'data'=>null);
} else { } else {
...@@ -420,20 +418,29 @@ class Api_model extends CI_Model { ...@@ -420,20 +418,29 @@ class Api_model extends CI_Model {
try { try {
$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) {
$res_count = $this->db->where('bookId',$data['bookingCode'])->get('booking')->num_rows(); $res_count=$this->db->where('bookId',$data['bookingCode'])->get('booking')->num_rows();
if($res_count > 0) { if($res_count > 0) {
// $rs = $this->db->where('bookId',$data['bookingCode'])->update('booking',array('status'=>1)); $result = $this->db->
// if($rs) { select('booking.id AS book_id,booking.event_id,booking.bookId AS bookingCode,
$result = $this->db->select('booking.id AS book_id,booking.event_id,booking.bookId AS bookingCode,booking.qrcode,booking.no_of_ticket,booking.amount,booking.status AS book_status,events.event_name,events.event_name_ar,events.event_discription,event_gallery.media_url,venue.location,customer.name AS customer_name,customer.profile_image,venue.venue_name,venue.venue_name_ar,venue.location_lat AS lat,venue.location_lng AS lng, booking.ticket_details,event_date_time.date,event_date_time.time')->where('booking.bookId',$data['bookingCode'])->from('booking')->join('events','booking.event_id = events.event_id')->join('event_date_time','booking.event_date_id = event_date_time.id')->join('venue', 'venue.id = events.venue_id')->join('event_gallery', 'events.event_id = event_gallery.event_id', 'LEFT')->join('customer','customer.customer_id = booking.customer_id')->get()->row(); booking.qrcode,booking.no_of_ticket,booking.amount,
booking.status AS book_status,events.event_name,events.event_name_ar,
events.event_discription,event_gallery.media_url,venue.location,
customer.name AS customer_name,customer.profile_image,venue.venue_name,
venue.venue_name_ar,venue.location_lat AS lat,booking.ticket_details,
venue.location_lng AS lng,event_date_time.date,event_date_time.time')->
where('booking.bookId',$data['bookingCode'])->
from('booking')->
join('events','booking.event_id = events.event_id')->
join('event_date_time','booking.event_date_id = event_date_time.id')->
join('venue', 'venue.id = events.venue_id')->
join('event_gallery', 'events.event_id = event_gallery.event_id', 'LEFT')->
join('customer','customer.customer_id = booking.customer_id')->get()->row();
if(count($result)>0){ if(count($result)>0){
$res = array('status'=>1,'data'=>$result); $res = array('status'=>1,'data'=>$result);
} else { } else {
$res = array('status'=>0,'message'=>'Invalid booking code','code'=>'ER24'); $res = array('status'=>0,'message'=>'Invalid booking code','code'=>'ER24');
} }
// } else {
// $res = array('status'=>0,'message'=>'Confirm submission failed','code'=>'ER26');
// }
} else { } else {
$res = array('status'=>0,'message'=>'Invalid booking code','code'=>'ER24'); $res = array('status'=>0,'message'=>'Invalid booking code','code'=>'ER24');
} }
...@@ -560,6 +567,42 @@ class Api_model extends CI_Model { ...@@ -560,6 +567,42 @@ class Api_model extends CI_Model {
$res = array('status'=>1, $res = array('status'=>1,
'data'=>array('user_id'=>$user_id, 'data'=>array('user_id'=>$user_id,
'bookingCode'=>$post_data['bookId'])); 'bookingCode'=>$post_data['bookId']));
if($status == 1){
$bkData = $this->db->query("
SELECT EVT.event_name,CUST.name,CUST.email,CUST.phone,
CONCAT(EDATE.date,' ',EDATE.time) AS show_time
FROM booking AS BK
INNER JOIN events AS EVT ON (EVT.event_id=BK.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='".$post_data['bookId']."' AND EVT.status='1' AND
BK.status='1' AND EDATE.status='1'")->row_array();
$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']."' and show is on '".$showTime."'.
Booking ID ".$post_data['bookId'];
$message = "<html><body><p>".$msgContent."</p></body></html>";
$template = getNotifTemplate();
if(isset($template['booking_mail']) && !empty($template['booking_mail'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$post_data['bookId'],$showTime),
$template['booking_mail']);
}
$this->send_mail($subject,$bkData['email'],$message);
if(isset($template['booking_sms']) && !empty($template['booking_sms'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$post_data['bookId'],$showTime),
$template['booking_sms']);
}
$this->sendSMS($bkData['phone'],$msgContent);
}
} else { } else {
$res = array('status'=>0,'message'=>'Seat booking failed','code'=>'ER37'); $res = array('status'=>0,'message'=>'Seat booking failed','code'=>'ER37');
} }
...@@ -1067,11 +1110,39 @@ class Api_model extends CI_Model { ...@@ -1067,11 +1110,39 @@ class Api_model extends CI_Model {
function searchEvent($data) { function searchEvent($data) {
$str = urldecode(strtolower($data['str'])); $str = urldecode(strtolower($data['str']));
$event = $this->db->select('event_name,event_id')->from('events') $this->db->query("SET SESSION group_concat_max_len = 20000");
->where("event_name LIKE '%$str%'")->where('status',1)->limit(5)->get(); $sql = "SELECT GROUP_CONCAT(DISTINCT CONCAT_WS('#',EDATE.id,EDATE.date,EDATE.time))
AS date_time,EVT.event_name,EVT.event_id
FROM events AS EVT
INNER JOIN event_date_time AS EDATE ON (EVT.event_id=EDATE.event_id)
WHERE (EVT.event_name LIKE '%$str%' OR EVT.event_name_ar LIKE '%$str%') AND
EDATE.date>=DATE_FORMAT(NOW(),'%Y-%m-%d') AND EVT.status='1' AND EDATE.status='1'
GROUP BY EVT.event_id LIMIT 5";
$resCount = $this->db->query($sql)->result();
if(!empty($resCount)){
foreach ($resCount AS $key => $rs) {
if(!empty($dates = explode(',',$rs->date_time))){
$checkTime = 0;
foreach ($dates as $date) {
if(empty($date)){ unset($resCount[$key]); continue; }
$dArr = explode('#', $date);
if($dArr[1] == date("Y-m-d") &&
$dArr[1].' '.$dArr[2] < date("Y-m-d H:i", strtotime('+15 minutes'))){
$checkTime += 1;
}
}
if($checkTime == count($dates)){ unset($resCount[$key]); continue; }
} else { unset($resCount[$key]); continue; }
unset($resCount[$key]->date_time);
}
}
$sEvents = (!empty($resCount))?$resCount:[];
$region = $this->db->select('id,name')->from('region')->where("name LIKE '%$str%'") $region = $this->db->select('id,name')->from('region')->where("name LIKE '%$str%'")
->where('status',1)->limit(5)->get(); ->where('status',1)->limit(5)->get();
$response = array('events'=>$event->result(), 'cityList'=>$region->result()); $response = array('events'=>$sEvents, 'cityList'=>$region->result());
$res = array('status'=>1,'data'=>$response); $res = array('status'=>1,'data'=>$response);
return $res; return $res;
} }
...@@ -1120,6 +1191,41 @@ class Api_model extends CI_Model { ...@@ -1120,6 +1191,41 @@ class Api_model extends CI_Model {
$this->db->update('booking',array('status'=>'1'), $this->db->update('booking',array('status'=>'1'),
array('bookId'=>$trBook['booking_id'])); array('bookId'=>$trBook['booking_id']));
$bkData = $this->db->query("
SELECT EVT.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 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();
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'].
"' and show is on '".$showTime."'. Booking ID ".$trBook['booking_id'];
$message = "<html><body><p>".$msgContent."</p></body></html>";
$template = getNotifTemplate();
if(isset($template['booking_mail']) && !empty($template['booking_mail'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$trBook['booking_id'],$showTime),
$template['booking_mail']);
}
$this->send_mail($subject,$bkData['email'],$message);
if(isset($template['booking_sms']) && !empty($template['booking_sms'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$trBook['booking_id'],$showTime),
$template['booking_sms']);
}
$this->sendSMS($bkData['phone'],$msgContent);
}
} }
$res = array('status'=>1); $res = array('status'=>1);
}catch(Exception $e){ }catch(Exception $e){
...@@ -1280,11 +1386,27 @@ class Api_model extends CI_Model { ...@@ -1280,11 +1386,27 @@ class Api_model extends CI_Model {
public function verifyMail($data = ''){ public function verifyMail($data = ''){
try{ try{
$cust = $this->db->query("SELECT CUST.customer_id FROM customer AS CUST $cust = $this->db->query("SELECT CUST.customer_id,CUST.email,CUST.phone
FROM customer AS CUST
INNER JOIN users AS USER ON (USER.id=CUST.customer_id) INNER JOIN users AS USER ON (USER.id=CUST.customer_id)
WHERE CUST.confirm_link='".$data['unique_id']."' AND USER.status!='2'"); WHERE CUST.confirm_link='".$data['unique_id']."' AND USER.status!='2'");
if(!empty($cust)){
$cust = $cust->row_array(); if(!empty($cust) && !empty($cust = $cust->row_array())){
$email = $cust['email'];
$subject = "New account created successfully";
$message = "Hi, Welcome to TimeOut. Please use username: ".$email.
" for access your account";
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message=str_replace(array('{:email}'),array($email),$template['registration_mail']);
}
$this->send_mail($subject,$email,$message);
if(isset($template['registration_sms']) && !empty($template['registration_sms'])){
$message=str_replace(array('{:email}'),array($email),$template['registration_sms']);
}
$this->sendSMS($cust['phone'],$message);
if($this->db->update('customer',array('confirm_link'=>'','email_verified'=>'1'), if($this->db->update('customer',array('confirm_link'=>'','email_verified'=>'1'),
array('customer_id'=>$cust['customer_id']))){ array('customer_id'=>$cust['customer_id']))){
header('Location:https://timeout.sa/staging/location?login=1'); header('Location:https://timeout.sa/staging/location?login=1');
...@@ -1377,5 +1499,29 @@ class Api_model extends CI_Model { ...@@ -1377,5 +1499,29 @@ class Api_model extends CI_Model {
} }
return $res; return $res;
} }
function sendSMS($phone_no, $message) {
$phone_no = trim($phone_no);
$phone_no = trim($phone_no,'+');
if(empty($phone_no) && count($phone_no) < 10 && empty($message)){
return;
}
$user = "eventstimeout";
$senderid = "SMSCountry";
$password = "timeout2030";
$url = "http://www.smscountry.com/SMSCwebservice_Bulk.aspx";
$message = urlencode($message);
if($ch = curl_init()){
$ret = curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "User=$user&passwd=$password&mobilenumber=$phone_no&message=$message&sid=$senderid&mtype=N&DR=Y");
$ret = curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$curlresponse = curl_exec ($ch);
}
}
} }
?> ?>
...@@ -4,6 +4,7 @@ class Webservice_model extends CI_Model { ...@@ -4,6 +4,7 @@ class Webservice_model extends CI_Model {
public function _consruct(){ public function _consruct(){
parent::_construct(); parent::_construct();
$this->load->model('Api_model');
} }
function update_fcm_token($data) { function update_fcm_token($data) {
...@@ -161,10 +162,24 @@ class Webservice_model extends CI_Model { ...@@ -161,10 +162,24 @@ class Webservice_model extends CI_Model {
'language'=>$data['language'] 'language'=>$data['language']
); );
$this->db->insert('customer', $customer_data); $this->db->insert('customer', $customer_data);
$email = $data['email'];
$subject = "New account created successfully"; $subject = "New account created successfully";
$email_id = $data['email']; $message = "Hi, Welcome to TimeOut. Please use username: ".$email.
$message = "Hi,\n\r Welcome to TimeOut.\r\n Please use username: ".$email_id." and Password: ".$temp_password." for access your account"; " for access your account";
$this->send_mail($subject,$email_id,$message);
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message = str_replace(array('{:email}'),
array($email),$template['registration_mail']);
}
$this->send_mail($subject,$email,$message);
if(isset($template['registration_sms']) && !empty($template['registration_sms'])){
$message = str_replace(array('{:email}'),
array($email),$template['registration_sms']);
}
$this->sendSMS($data['phone'],$message);
$this->db->select("customer.name AS user_name,customer.phone,customer.email,customer.profile_image AS profile_photo,users.id AS user_id, IF(customer.phone_verified = 0,'false','true') AS is_phone_verified"); $this->db->select("customer.name AS user_name,customer.phone,customer.email,customer.profile_image AS profile_photo,users.id AS user_id, IF(customer.phone_verified = 0,'false','true') AS is_phone_verified");
$this->db->where('users.id',$id); $this->db->where('users.id',$id);
$this->db->from('users'); $this->db->from('users');
...@@ -629,6 +644,31 @@ class Webservice_model extends CI_Model { ...@@ -629,6 +644,31 @@ class Webservice_model extends CI_Model {
return $ci->email->send(); return $ci->email->send();
} }
function sendSMS($phone_no, $message) {
$phone_no = trim($phone_no);
$phone_no = trim($phone_no,'+');
if(empty($phone_no) && count($phone_no) < 10 && empty($message)){
return;
}
$user = "eventstimeout";
$senderid = "SMSCountry";
$password = "timeout2030";
$url = "http://www.smscountry.com/SMSCwebservice_Bulk.aspx";
$message = urlencode($message);
if($ch = curl_init()){
$ret = curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "User=$user&passwd=$password&mobilenumber=$phone_no&message=$message&sid=$senderid&mtype=N&DR=Y");
$ret = curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$curlresponse = curl_exec ($ch);
}
}
function get_category_list($data) { function get_category_list($data) {
try { try {
...@@ -989,6 +1029,42 @@ class Webservice_model extends CI_Model { ...@@ -989,6 +1029,42 @@ class Webservice_model extends CI_Model {
$id = $this->db->insert_id(); $id = $this->db->insert_id();
if($id){ if($id){
$res = array('status'=>1,'data'=>array('bookingCode'=>$post_data['bookId'])); $res = array('status'=>1,'data'=>array('bookingCode'=>$post_data['bookId']));
if($post_data['status'] == 1){
$bkData = $this->db->query("
SELECT EVT.event_name,CUST.name,CUST.email,CUST.phone,
CONCAT(EDATE.date,' ',EDATE.time) AS show_time
FROM booking AS BK
INNER JOIN events AS EVT ON (EVT.event_id=BK.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='".$post_data['bookId']."' AND EVT.status='1' AND
BK.status='1' AND EDATE.status='1'")->row_array();
$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']."' and show is on '".$showTime."'.
Booking ID ".$post_data['bookId'];
$message = "<html><body><p>".$msgContent."</p></body></html>";
$template = getNotifTemplate();
if(isset($template['booking_mail']) && !empty($template['booking_mail'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$post_data['bookId'],$showTime),
$template['booking_mail']);
}
$this->send_mail($subject,$bkData['email'],$message);
if(isset($template['booking_sms']) && !empty($template['booking_sms'])){
$msgContent = str_replace(
array('{:event_name}','{:booking_id}','{:time}'),
array($bkData['event_name'],$post_data['bookId'],$showTime),
$template['booking_sms']);
}
$this->sendSMS($bkData['phone'],$msgContent);
}
} else { } else {
$res = array('status'=>0,'message'=>'Seat booking failed','code'=>'ER37'); $res = array('status'=>0,'message'=>'Seat booking failed','code'=>'ER37');
} }
......
...@@ -85,6 +85,17 @@ ...@@ -85,6 +85,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Booking Mail</label>
<p>Event Name => {:event_name} , Booking ID => {:booking_id} , Time => {:time}</p>
<textarea id="rich_editor_10" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Booking Mail" name="booking_mail"
style="height:108px;" data-parsley-trigger="change"><?= $notificationData->booking_mail ?></textarea>
</div>
</div>
</div>
</div> </div>
<div class="box-header with-border"> <div class="box-header with-border">
...@@ -95,15 +106,25 @@ ...@@ -95,15 +106,25 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Registration SMS</label> <label>Registration SMS</label>
<p>Email => {:email}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration SMS" name="registration_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_sms ?></textarea> <textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration SMS" name="registration_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_sms ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <!-- <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Forgot SMS</label> <label>Forgot SMS</label>
<p>URL => {:url}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot SMS" name="forgot_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_sms ?></textarea> <textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot SMS" name="forgot_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_sms ?></textarea>
</div> </div>
</div> -->
<div class="col-sm-6">
<div class="form-group">
<label>Booking SMS</label>
<p>Event Name => {:event_name} , Booking ID => {:booking_id} , Time => {:time}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Booking SMS" name="booking_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->booking_sms ?></textarea>
</div>
</div> </div>
</div> </div>
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
if(jQuery('#rich_editor_6').length==1){CKEDITOR.replace('rich_editor_6');} if(jQuery('#rich_editor_6').length==1){CKEDITOR.replace('rich_editor_6');}
if(jQuery('#rich_editor_8').length==1){CKEDITOR.replace('rich_editor_8');} if(jQuery('#rich_editor_8').length==1){CKEDITOR.replace('rich_editor_8');}
if(jQuery('#rich_editor_9').length==1){CKEDITOR.replace('rich_editor_9');} if(jQuery('#rich_editor_9').length==1){CKEDITOR.replace('rich_editor_9');}
if(jQuery('#rich_editor_10').length==1){CKEDITOR.replace('rich_editor_10');}
if(jQuery('#rich_editor_3').length==1){CKEDITOR.replace('rich_editor_3',{language:'ar'});} if(jQuery('#rich_editor_3').length==1){CKEDITOR.replace('rich_editor_3',{language:'ar'});}
if(jQuery('#rich_editor_4').length==1){CKEDITOR.replace('rich_editor_4',{language:'ar'});} if(jQuery('#rich_editor_4').length==1){CKEDITOR.replace('rich_editor_4',{language:'ar'});}
......
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