2022-12-11 13:55:49 +05:00
|
|
|
|
<?php
|
|
|
|
|
|
2023-03-11 21:03:29 +05:00
|
|
|
|
if ($_SESSION['dostup']!='a' && $_SESSION['dostup']!='e') die('403');
|
2022-12-11 13:55:49 +05:00
|
|
|
|
/* ----------------------------------------------------------------------
|
2023-03-11 21:03:29 +05:00
|
|
|
|
06.03.2023
|
|
|
|
|
Получаем список новый заказов
|
2022-12-11 13:55:49 +05:00
|
|
|
|
---------------------------------------------------------------------- */
|
2023-03-11 21:03:29 +05:00
|
|
|
|
$new_orders=\DB::getAll("SELECT * FROM `orders` WHERE `status`=0");
|
|
|
|
|
|
|
|
|
|
//получаем данные о пользователе
|
|
|
|
|
for ($i=0; $i<count($new_orders); $i++){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!$new_orders[$i]['fio']){
|
|
|
|
|
$new_orders[$i]['fio']=\DB::getValue("SELECT `fio` FROM `users` WHERE `id`=? LIMIT 1", $new_orders[$i]['user_id']);
|
|
|
|
|
$new_orders[$i]['tel']=\DB::getValue("SELECT `tel` FROM `users` WHERE `id`=? LIMIT 1", $new_orders[$i]['user_id']);
|
|
|
|
|
}
|
2022-12-11 13:55:49 +05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-11 21:03:29 +05:00
|
|
|
|
|
|
|
|
|
$smarty -> assign( 'new_orders', $new_orders);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-11 13:55:49 +05:00
|
|
|
|
?>
|