Файл: top_reit/rustats.su/system/view/news/comments.tpl
Строк: 14
<div class="h5"><form method="post"
action="?">
Сообщение [5 - 100]<br
/>
<input type="text" name="text"
maxlength="1000" style="width:80%;"/>
<input
type="submit" value="Отправить"
/>
</form></div>
<?php
$all = Core::count("SELECT
COUNT(*) FROM `com_news` WHERE `id_news` = ? ORDER BY `id` DESC ",
array($_GET['get']));
if($all > 0){
$q = Core::query("SELECT *
FROM `com_news` WHERE `id_news` = ?",
array($_GET['get']));
while($comm = $q -> fetch()){
$ank =
Core::query("SELECT * FROM `users` WHERE `id` = ?",
array($comm['id_user'])) -> fetch();
echo '<div
class="h5">'.$ank['login'].' |
'.Protect::title($comm['text']).'</div>';
}
}else{
echo '<div
class="h1">Новость не
обсуждалась</div>';
}
?>