Просмотр файла let/index.php

Размер файла: 1.26Kb
<?php

	include"../tools.php";
	include"../head.php";
echo "<div>";
echo "<div class='contur_rek'>
<div class='header_rek'><span style='color:#c00000;'><p align='center'><big><b>Персональные сообщения</b></big></p></span></div></div>";

if (!empty($_SESSION['login']))
{
$newl = mysql_query("select * from `let` where `user` LIKE '".$_SESSION['login']."' and `type` LIKE 'in' and `read` LIKE 'no';");
$countnew = mysql_num_rows($newl);
if ($countnew>0)
{$newlet="|<span style='color: red'>$countnew</span>";}
$messages = mysql_query("select * from `let` where user='$_SESSION[login]' and type='in' ;");
$count = mysql_num_rows($messages);
    echo "<div class='contur'>
	<div class='header'><a href='letters.php?act=in'>Входящих</a> (".$count."".$newlet.")</div></div>";
  $messages = mysql_query("select * from `let` where author='$_SESSION[login]' and type='out' ;");
$count = mysql_num_rows($messages);

    echo "<div class='contur'>
	<div class='header'><a href='letters.php?act=out'>Исходящие</a> ($count)</div></div>";
    echo "<div class='contur'>
	<div class='header'><a href='letters.php?act=write'>Написать</a></div></div>";
}
echo "<a href='../'>На главную</a></div>";
require ('../foot.php');
?>