Просмотр файла sten/stmsg.php

Размер файла: 1.24Kb
<?
include"../template/start.php";
include"../template/log.php";
include"../template/function.php";
include"../template/func.php";
include"../template/data.php";
$idi=$_SESSION['idi'];


$max_mess=30;
$page=$_GET[page];
if(empty($page)){$page=0;}
$count_sten = mysql_result("select count(*) from `sten` where sten='$idi' ORDER BY `id`");
if($count_sten == 0){echo'Нет сообщений!';}
$result_sten = mysql_query("select * from `sten` where sten='$idi' ORDER BY `id` DESC  LIMIT ".$page." ,".$max_mess."");
while ($mess_sten = mysql_fetch_array($result_sten)) 
{
	
	$result_sten_log = mysql_query("select * from `prof` where id='$mess_sten[idi]'");
	while ($sten_log = mysql_fetch_array($result_sten_log)) 
	{
		$text=smiles($mess_sten[text]);
		echo '<br/><div class="a"><table><tr><td valign="top" width="200" align="left">';
		photo_sten($sten_log[foto],$mess_sten[idi]);
		echo '<br/>';
		//on($mess_sten[idi]);
		echo'<a href="./?id='.$mess_sten[idi].'">'.$sten_log[name].' '.$sten_log[fam].'</a><br/>'.$mess_sten[data].'<br/>';
		//if(($idi == $id) || ($admin)){echo'<a href="./?id='.$idi.'&del='.$mess_sten[id].'">Удалить</a><br/>';}
		echo'</td><td>'.$text;
		echo'</td></tr></table></div><br/>';
	}	
	
	
}
?>