Файл: weddings/includes/configuration_tamada.php
Строк: 8
<?php
$tamadalast = mysql_fetch_assoc(mysql_query("SELECT * FROM `weddings_banquet_post` WHERE `id_hall` = '$hall[id]' AND `tamada` = '1' ORDER BY id DESC LIMIT 1"));
if ($tamadalast==NULL || $tamadalast['time']<time()-25)
{
$k_shut=mysql_result(mysql_query("SELECT COUNT(*) FROM `weddings_tamada`"));
$tamada = mysql_fetch_assoc(mysql_query("SELECT * FROM `weddings_tamada` ORDER BY rand()"));
mysql_query("INSERT INTO `weddings_banquet_post` (`tamada`,`time`,`msg`,`time_hall`,`id_hall`) values('1','$time','".my_esc($tamada['msg'])."','$hall[time]','$hall[id]')");
}
?>