Файл: sys/fnc/title.php
Строк: 386
<?
function title($title=NULL)
{
global $set;
global $user;
if ($set['web']==false)
{
if ($title==NULL)$title=$set['title'];
$title=$set['title'];
if (!isset($user)){
echo "<div class='title'>n";
echo "<center>$title</center></div>";
}
/*
echo "<div class='rekl'>n";
rekl(1);
echo "</div>n";*/
}
function aut(){}
echo "<style type='text/css'>
#navi{color:#$user[colorbp];font-size:small;background-color:#$user[colorfp];}
#navi a:link,#navi a:visited{color:#$user[colorlp];text-decoration:none;font-size:small}
.date {
text-align: right;
color: black;
margin: 1px;
padding: 1px;
background: #efebef;
border-bottom: 1px solid #$user[colorbp];
border-left:1px solid #user[colorbp];
border-right:1px solid #user[colorbp];
}
</style>";
if ($set['web']==false)
{
global $user;
if (isset($user))
{
$k_new=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
$jn=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
$lenta = mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
$zoz = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]'"), 0);
echo "<div id='navi'>";
if ($user['up_panel'] == 0)
{
echo "<table style='width:100%' cellspacing='0' cellpadding='0'><tbody><tr>";
if($_SERVER['PHP_SELF']!=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/index$user[iconindex].png' alt='Я'></a>";
echo "</td>";
}
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($user['pol'] == 1) {
echo "<a href='/id$user[id]' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/man$user[iconstr].png' alt='Я'></a>";
} else {
echo "<a href='/id$user[id]' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/woman$user[iconstr].png' alt='Я' /></a>";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($k_new>0){
echo "<a href='/user/mail/new.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/mail$user[iconmail].png'> <span style='color:#$user[colornp]'>$k_new</span></a>n";
} else {
echo "<a href='/user/mail/index.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/mail$user[iconmail].png'></a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($jn>0) {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/jurnal$user[iconjurnal].png'> <span style='color:#$user[colornp]'>$jn</span></a>n";
} else {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/jurnal$user[iconjurnal].png'></a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($lenta>0) {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/notice$user[iconnotice].png'> <span style='color:#$user[colornp]'>$lenta</span></a>n";
} else {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/notice$user[iconnotice].png'></a>n";
}
echo "</td>";
if($_SERVER['PHP_SELF']=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/exit.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/title/exit.png' alt='Выход'></a>";
echo "<td>";
}
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"), 0) > 0)
{
echo "<a href='/frend_new.php' style='text-align:center;display:block;padding:1px;font-size:small;'><img src='/style/icons/frend.png'> <span style='color:#$user[colornp]'>$zoz</span></a>n";
}
echo "</td>";
echo "</tr></tbody></table>";
}
elseif ($user['up_panel'] == 1)
{
echo "<table style='width:100%' cellspacing='0' cellpadding='0'><tbody><tr>";
if($_SERVER['PHP_SELF']!=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/' style='text-align:center;display:block;padding:1px;font-size:small;'>Krasavo</a>";
echo "</td>";
}
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/id$user[id]' style='text-align:center;display:block;padding:1px;font-size:small;'>Я</a>";
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($k_new>0){
echo "<a href='/user/mail/new.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Почта <span style='color:#$user[colornp]'>$k_new</span></a>n";
} else {
echo "<a href='/user/mail/index.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Почта</a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($jn>0) {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Журнал <span style='color:#$user[colornp]'>$jn</span></a>n";
} else {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Журнал</a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;white-space:nowrap;border-bottom:1px solid;'>";
if ($lenta>0) {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Лента <span style='color:#$user[colornp]'>$lenta</span></a>n";
} else {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Лента</a>n";
}
echo "</td>";
if($_SERVER['PHP_SELF']=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/exit.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Выход</a>";
echo "<td>";
}
echo "</tr></tbody></table>";
}
else
{
echo "<table style='width:100%' cellspacing='0' cellpadding='0'><tbody><tr>";
if($_SERVER['PHP_SELF']!=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/' style='text-align:center;display:block;padding:1px;font-size:small;'>K</a>";
echo "</td>";
}
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/id$user[id]' style='text-align:center;display:block;padding:1px;font-size:small;'>Я</a>";
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($k_new>0){
echo "<a href='/user/mail/new.php' style='text-align:center;display:block;padding:1px;font-size:small;'>П <span style='color:#$user[colornp]'>$k_new</span></a>n";
} else {
echo "<a href='/user/mail/index.php' style='text-align:center;display:block;padding:1px;font-size:small;'>П</a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
if ($jn>0) {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Ж <span style='color:#$user[colornp]'>$jn</span></a>n";
} else {
echo "<a href='/jurnal.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Ж</a>n";
}
echo "</td>";
echo "<td style='vertical-align:top;width:20%;white-space:nowrap;border-bottom:1px solid'>";
if ($lenta>0) {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Л <span style='color:#$user[colornp]'>$lenta</span></a>n";
} else {
echo "<a href='/notice/news.php' style='text-align:center;display:block;padding:1px;font-size:small;'>Л</a>n";
}
if($_SERVER['PHP_SELF']=="/index.php"){
echo "<td style='vertical-align:top;width:20%;border-right: 1px solid;white-space:nowrap;border-bottom:1px solid'>";
echo "<a href='/exit.php' style='text-align:center;display:block;padding:1px;font-size:small;'>В</a>";
echo "<td>";
}
echo "</td>";
echo "</tr></tbody></table>";
}
if ($user['level']>0){
$jaloby=mysql_result(mysql_query("SELECT COUNT(*) FROM `jaloby` WHERE `read` = '0'"), 0);
echo "<a href='/system_panel/jaloby.php'>Жалобы".($jaloby>0?"<font color='red'> +$jaloby</font>":"")."</a>";
$ticket=mysql_result(mysql_query("SELECT COUNT(*) FROM `ticket` WHERE `status` = '0'"), 0);
echo " | <a href='/mods/ticket/admin.php'>Тикеты".($ticket>0?"<font color='red'> +$ticket</font>":"")."</a>";
$privat= mysql_result(mysql_query("SELECT COUNT(*) FROM `private` WHERE `time` > '".(time()-86400)."'"), 0);
echo " | <a href='/system_panel/private/'>Приват".($privat>0?"<font color='red'> +$privat</font>":"")."</a>";
}
if ($user['id']==2){
$fund=mysql_result(mysql_query("SELECT COUNT(*) FROM `fund` WHERE `pomog` = '0'"), 0);
echo " | <a href='/system_panel/fund.php'>Фонд".($fund>0?"<font color='red'> +$fund</font>":"")."</a>";
}
echo "</div>";
if (isset($user) && $user['qwest']==0)echo "<a href='/mods/qwest'><div class='forum'><img src='/style/icons/money.gif' alt=''> Получить подарок</center></div></a>";
$admin_settings=mysql_fetch_array(mysql_query("SELECT * FROM `admin_settings`"));
if ($admin_settings["udacha"]==1){
$money=mysql_result(mysql_query("SELECT COUNT(*) FROM `udacha_yes` WHERE `user`='$user[id]'"),0);
if($money>0){echo '<a href="/user/udacha.php"><div class="forum"><img src="/style/icons/money.gif"> Вам улыбнулась удача!</div></a>';
}
}
if ($user['paneltime']==1)echo '<div class="date">';
if ($user['paneltime']==1)echo "".date("Дата d.m.y")." Время ".vremja($time)."";
if ($user['paneltime']==1)echo '</div>';
}
/*
else {
echo "<div class='line'>";
echo "<center>Первый раз на ".$_SERVER['HTTP_HOST']." ? Пройди быструю и бесплатную регистрацию и получи полный доступ ко всем сервисам нашего дружного портала общения и знакомств.:-). Живи красаво вместе с нами на KRASAVO.RU !!!!!</center>n";
echo "</div><table class='gmenu'>n";
echo "<td style='vertical-align:top;border:1px solid skyblue;background:whitesmoke url(/style/kn.png);width:10%'><a style='padding:3px;display:block;text-align:center;'href='aut.php'>Вход</a></td>";
echo "<td style='vertical-align:top;border:1px solid skyblue;background:whitesmoke url(/style/kn.png);width:10%'><a style='padding:3px;display:block;text-align:center;'href='reg.php'>Регистрация</a></td></table>";
}
echo "</div>n";
*/
}
}