Commit 5a0ef2d5 by Tobin

dc

parent fadf0e11
<?php
$conn = mysqli_connect("localhost","nuvento_timeout","Golden_123","nuvento_timeout");
if($conn->connect_error){
return;
}
$date = date('Y-m-d',strtotime(date("Y-m-d H:i:s")." +30 minutes"));
$sTime = date('H:i',strtotime(date("Y-m-d H:i:s")." +30 minutes"));
$eTime = date("H:i",strtotime(date("Y-m-d H:i:s")." +31 minutes"));
$sql = "SELECT CUST.customer_id,CUST.fcm_token,BOK.id AS booking_id,BOK.bookId,EVT.event_name
FROM booking AS BOK
INNER JOIN customer AS CUST ON (CUST.customer_id=BOK.customer_id)
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
INNER JOIN event_date_time AS EDATE ON (EDATE.event_id=BOK.event_id)
WHERE BOK.status='1' AND USR.status='1' AND EDATE.status='1' AND
EDATE.date='$date' AND EDATE.time<='$eTime' AND EDATE.time>='$sTime'
GROUP BY BOK.id,CUST.customer_id";
$result = mysqli_query($conn, $sql);
if(mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
print_r($row);
}
exit;
foreach($bookData AS $bData){
$userData = array('id'=>$bData['bookId'],
'title'=>$bData['event_name'],
'message'=>'Booking Remainder');
$this->push_sent_cancel('2',$bData['fcm_token'],$userData);
}
$this->db->insert('crontab_notif',array('date'=>date('Y-m-d'),'time'=>date('H:i:s')));
}
$conn->close();
?>
\ No newline at end of file
......@@ -225,7 +225,7 @@
<li>
<a href="<?= base_url('Notification/notification') ?>">
<i class="fa fa-circle-o text-aqua"></i>
Notification Tempaltes
Notification Templates
</a>
</li>
</ul>
......
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