View file fnc/book/book_msg.php

File size: 955B
<?php
include"../../sys/fnc.php";

$page_book=$_GET['page_book'];



if(empty($page_book)){$page_book=0;}
$res=$db->query("select * from `book` order by `id` DESC  LIMIT ".$page_book." ,".$str."");
while($pole = $res->fetch_array())
{
	echo'<p><b>'.$pole[name].'</b><br/><i>'.$pole[data].'</i><br/>'.bbcod($pole[msg]).'<br/>
	<a href="javascript:%20x()" onclick="DoSmilie(\''.$pole[name].', \');">Ответить</a>';
	if($user[leval]==4){echo'| <a href="javascript:book_msg_del('.$pole[id].')">Удалить сообщение</a>';}
	if($user[leval]==4 or $user[user]==$pole[name]){echo'| <a href="javascript:book_msg_edit('.$pole[id].')">Редактировать сообщение</a>';}
	echo'<br>..........................................</p>';
}
if($res->num_rows==0)
{
	echo'Сообщений пока нет :)';
}
$res->close();
$dop_book="";
mess_str("book",$page_book,$dop_book);

?>

<?include"../sch2.php";?>