43 lines
1.5 KiB
PHP
Executable File
43 lines
1.5 KiB
PHP
Executable File
<?php
|
|
require_once('fixed/config/go_con.php');
|
|
|
|
$check_timer = mysqli_query(
|
|
$db,
|
|
"SELECT `tretment`.`name`, `tretment`.`number`, `tretment`.`id`
|
|
|
|
FROM `invoices`
|
|
INNER JOIN `invoices_has_book` ON `invoices`.`id` = `invoices_has_book`.`invoices_id`
|
|
INNER JOIN `book` ON `book`.`id` = `invoices_has_book`.`book_id`
|
|
INNER JOIN `tretment` ON `tretment`.`id` = `book`.`tretment_id`
|
|
|
|
WHERE `book`.`tretment_id` IN (SELECT `tretment_has_coupons`.`tretment_id` FROM `tretment_has_coupons` WHERE `tretment_has_coupons`.`code` LIKE '%F')
|
|
AND `invoices`.`price` = 0
|
|
AND `tretment`.`commercial_register_id` = 2
|
|
|
|
GROUP BY `book`.`tretment_id`"
|
|
);
|
|
$data = array();
|
|
while ($check_timer_res = mysqli_fetch_assoc($check_timer)) {
|
|
$data[$check_timer_res['id']] = array(
|
|
'name' => $check_timer_res['name'],
|
|
'number' => $check_timer_res['number'],
|
|
);
|
|
}
|
|
|
|
|
|
foreach ($data as $key => $value) {
|
|
$just_U = 'dd';
|
|
|
|
$tretmentNumber = $data[$key]['number'];
|
|
$tretmentName = explode(" ",$data[$key]['name']);
|
|
|
|
$m_body =
|
|
'عميلنا الغالي '.$tretmentName[0].'
|
|
تم تفعيل موقعنا على قوقل ماب، في حال عجبتكم الخدمة نأمل منك التقييم على الرابط
|
|
https://a-q.cc/4';
|
|
|
|
require_once('fixed/sms/send_message.php');
|
|
}
|
|
|
|
echo count($data);
|