Файл: chat/anagram2.php
Строк: 16
<?php
$b = mysql_fetch_array(mysql_query("SELECT * FROM `vopros` WHERE `ids` = '2' LIMIT 1"));
$nom = $b['number'];
$vr = $b['time'];
$answ = $b['answer'];
$amsg = rus_to_k($msg);
$tran = $b['tran'];
$amsg = preg_replace('/$amsg/ui', "mb_strtolower('$1', 'UTF8')", $amsg);
if (($msg == $answ || $tran == $amsg) && $nom != 5) {
$st = time();
$st = $st + 20;
mysql_query("UPDATE `vopros` SET `number` = '5', `time` = '$st', `answer` = ' ', `tran` = ' ' WHERE `ids` = '2' LIMIT 1");
$creditss1 = $user['credits'];
$mes = 'Молодец <b>' . cvetnik($user['id']) . '</b>!<br/>
Ответ: <b>' . $answ . '</b>.<br/>';
$ids = mt_rand(100000, 999999);
mysql_query("INSERT INTO `message` SET
`id` = '$ids',
`user` = 'Анаграмма',
`who` = '0',
`time` = '" . time() . "',
`msg` = '$mes',
`room` = '$rm'");
}
?>