Файл: forum/inc/search_form.php
Строк: 38
<?php
echo "<form class = 'foot' name = 'search' method = 'POST' action = '?newsearch=$passgen'>";
echo "Текст<br />";
echo "<input type = 'text' name = 'text' value = '" . htmlentities($searched['text'], ENT_QUOTES, 'UTF-8') . "' /><br />";
echo "Место поиска:<br />";
echo "<select name = 'in'>n";
echo "<option value = ''>Везде</option>n";
$q = mysql_query("SELECT `id`,`name` FROM `forum_f`" . ((!isset($user) || $user['level'] == 0) ? " WHERE `adm` = '0'" : null) . " ORDER BY `pos` ASC");
while ($forums = mysql_fetch_assoc($q)) {
echo "<option value = 'f$forums[id]'" . (($searched['in']['m'] == 'f' && $searched['in']['id'] == $forums['id']) ? " selected='selected'" : null) . ">>> $forums[name]</option>n";
$q2 = mysql_query("SELECT `id`,`name` FROM `forum_r` WHERE `id_forum` = '$forums[id]' ORDER BY `time` DESC");
while ($razdels = mysql_fetch_assoc($q2)) {
echo "<option value = 'r$razdels[id]'" . (($searched['in']['m'] == 'r' && $searched['in']['id'] == $razdels['id']) ? " selected='selected'" : null) . ">> $razdels[name]</option>n";
}
}
echo "</select><br />";
echo "<button class = 'btn'>";
echo "<img src = '/style/icons/tick.png' /> Начать поиск";
echo "</button></form><div class = 'foot'>";
echo "<img src = '/style/icons/left.png' /> <a href = '/forum/'>Форум</a>";
echo "</div>";