32 lines
854 B
PHP
32 lines
854 B
PHP
<?php
|
||
|
||
if ($_SESSION['dostup']!='a' && $_SESSION['dostup']!='e') die('403');
|
||
/* ----------------------------------------------------------------------
|
||
06.03.2023
|
||
Получаем список новый заказов
|
||
---------------------------------------------------------------------- */
|
||
$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']);
|
||
}
|
||
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
$smarty -> assign( 'new_orders', $new_orders);
|
||
|
||
|
||
|
||
|
||
?>
|