Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Mizter Egoist 04.06.2014 12:49
Добрый день!<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteRule ^rooms/([^/]+) /_/rooms.html?url=$1 RewriteRule ^rooms /_/rooms.html </IfModule>Вот содержание /_/rooms.html
$room[/rooms] $uri[$request:uri] $query[$request:query] ^query.match[(\w+)\=(\w+)][']{ $url[$match.1] $urlValue[$match.2] } ^connect[$connect_string]{ $ROOM[^table::sql{SELECT id, roomName, url, rID FROM R WHERE url='$urlValue'}] $C[^table::sql{SELECT id, FuID, TuID, rID, DATE, MESS FROM C WHERE rID = '$ROOM.id' AND FuID = '$A.AUTH.id'}] $R[^table::sql{SELECT id, roomName, url, rID FROM R}] } ^if($R){ <a href="${room}">Комнаты</a> ^R.menu{ <a href="${room}/${R.url}">$R.roomName</a> } }<br> ^if($ROOM){ $ROOM.roomName }<br> <div class="messages"> ^if($C){ ^C.menu{ ${A.AUTH.login}: ${C.MESS}<br/> } }<br/> </div> ^send[] @send[] <form name="messageForm" method="POST" accept-charset="UTF-8"> <input type="text" name="message"> <input type="submit" value="sendMessage"> </form> ^if(def $form:message){ ^connect[$connect_string]{ ^void:sql{ INSERT INTO C (FuID, rID, DATE, MESS) VALUES ('$A.AUTH.id', '$ROOM.id', '$A.nowTime', '$form:message') } } }