| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Sidhe 07.02.2005 18:04
Сходите на sidhe.akir.inc.ru<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="sfield" type="text" size="15" class="searchform" value="$form:sdata"> <input name="submitb" type="submit" value="Найти!" class="searchform">
^if(def $form:sfield){
$response:location[search.html?sdata=$form:sfield&stype=all]
}
</form>Это обработка: <table class="listitems" width="100%" cellspacing="1" cellpadding="1">
<tr>
<td class="listitems" bgcolor="#660000">
Результаты поиска по запросу $form:sfield</td>
</tr>
^MAIN:dbconnect{
^if($form:type eq all){
$nws[^table::sql{select Title,Author,ID from News where Title or Author like '$url'}]
}
^if($form:type eq auth){
$nws[^table::sql{select Title,Author,ID from News where Author like '$url'}]
}{
$nws[^table::sql{select Title,Author,ID from News where Title like '$url'}]
}}
^if(def $nws){
^nws.menu{
<tr>
<td class="postitem">
<a href="show.html?$nws.ID" class="publ">$nws.Title - $nws.Author</a>
</td>
</tr>}
}{
<tr>
<td class="postitem">
Ничего не найдено!
</td>
</tr>
}
</table>
</td>
</tr>
</table>