/*
-----------------------------------------------------------------
Список контактов
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng['contacts'] . '</b></div>';
$contacts = mysql_query("select * from `privat` where me='$login' and cont!='';");
if (mysql_num_rows($contacts)) {
while ($mass = mysql_fetch_array($contacts)) {
$uz = mysql_query("select * from `users` where name='$mass[cont]';");
$mass1 = mysql_fetch_array($uz);
echo '<div class="menu"><a href="pradd.php?act=write&adr=' . $mass1['id'] . '">' . $mass['cont'] . '</a>';
$ontime = $mass1['lastdate'];
$ontime2 = $ontime + 300;
if (time() > $ontime2) echo '<font color="#FF0000"> [Off]</font>';
else echo '<font color="#00AA00"> [ON]</font>';
echo ' <a href="cont.php?act=edit&id=' . $mass1['id'] . '">[X]</a></div>';
}
} else {
echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr"><a href="?act=add">' . $lng['add'] . '</a></div>';
/*
-----------------------------------------------------------------
Список игноров
-----------------------------------------------------------------
*/
echo '<div class="phdr"><b>' . $lng_pm['block_list'] . '</b></div>';
$ig = mysql_query("select * from `privat` where me='" . $login . "' and ignor!='';");
if (mysql_num_rows($ig)) {
while ($mass = mysql_fetch_array($ig)) {
$uz = mysql_query("select * from `users` where name='$mass[ignor]';");
$mass1 = mysql_fetch_array($uz);
echo '<div class="menu">' . $mass['ignor'];
$ontime = $mass1['lastdate'];
$ontime2 = $ontime + 300;
if (time() > $ontime2) {
echo '<font color="#FF0000"> [Off]</font>';
} else {
echo '<font color="#00AA00"> [ON]</font>';
}
echo ' <a href="ignor.php?act=del&id=' . $mass['id'] . '">[X]</a></div>';
}
} else {
echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr"><a href="?act=add">' . $lng_pm['add_to_ignor'] . '</a></div>';