View file user.php

File size: 1.13Kb
<?

include $_SERVER['DOCUMENT_ROOT']."/template/head.php";


if($id)
{	
	if(!empty($_GET['del']) && !empty($admin))
	{
		if(mysql_query("delete from user where id='$_GET[del]'") && mysql_query("delete from prof where id='$_GET[del]'")){echo'Пользователь успешно удален';}
	}
	$result_prof = mysql_query("select * from `prof` order by `id`");
	while ($prof_user = mysql_fetch_array($result_prof)) 
	{

		echo '<br/><div class="head"><table><tr><td valign="top" width="200" align="left">';

		echo'<a href="./?id='.$prof_user[id].'">';
		photo($prof_user[foto],$prof_user[id]);
		echo'</a><br>';

		echo '</td><td valign="top" width="350" align="left">';
		echo'<a href="./?id='.$prof_user[id].'">'.$prof_user[name].' '.$prof_user[fam].'</a><br/>';
		//echo on(mess_user[id]);
		echo '</td><td valign="top" width="" align="left">';
		echo '<a href="./priv.php?mail='.$prof_user[id].'">отправить сообщение</a><p>';
		if($admin){echo'<a href="user.php?del='.$prof_user[id].'">Удалить id'.$prof_user[id].'</a><br/>';}
		echo '</td></tr></table></div>';
	}
}
include $_SERVER['DOCUMENT_ROOT']."/template/foot.php";
?>