Файл: head.php
Строк: 166
<?
if($u['setting_theme']){
$theme = 'template/theme/'.$u['setting_theme'].'/';
if(!is_dir($theme)){
$theme = 'template/theme/Default/';
}
} else {
$theme = 'template/theme/Default/';
}
echo '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="'.$theme.'style.css" type="text/css"/>
<title>'.$title.'</title>
</head>
<body>';
echo '<a id="page-up"></a>';
if($u['id']){ $color = $u['pcolor'].'';}
if($u['id']){ $fon = $u['pfon'].'';}
if($u['id']){ $link = $u['plink'].'';}
if($u['id']){ $nlink = $u['ncolor'].'';}
if($u['id']){
$lenta2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `lenta` WHERE `time` > '".(time()-(15*15*6))."'"), 0);
if($lenta2 > 0) $lenta_new = '+'.$lenta2.'';
$j = mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `user` = '".$u['id']."' and `new` = '1'"), 0);
if($j) $j = '+'.$j.''; else $j = '';
if($u['count_mail']) $mn = '+'.$u['count_mail'].''; else $mn = '';
echo '<div style="
background-color: '.$fon.';
color: #434e60;
padding:0px 0px 0px 0px;
margin: 0px;
line-height: 19px;
">';
echo ' <div class="menu_icon">
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:24%;border-right: 1px solid '.$color.';white-space: nowrap;"><a href = "/'.$u['id'].'"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="'.$link.'">Дом</font></a></td>
<td style="vertical-align:top;width:24%;border-right: 1px solid '.$color.';white-space: nowrap;"><a href="/mail.php?"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="'.$link.'">Почта </font><font color="'.$nlink.'">'.$mn.' </font> </a></td>
<td style="vertical-align:top;width:24%;border-right: 1px solid '.$color.';white-space: nowrap;"><a href="/jurnal.php?"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="'.$link.'">Журнал </font><font color="'.$nlink.'">'.$j.' </font></a></td>
<td style="vertical-align:top;width:24%;white-space: nowrap;"><a href = "/lenta.php?"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="'.$link.'">Лента </font><font color="'.$nlink.'"> '.$lenta_new.'</font></a></td>
';
echo '</tr></table></div></div>';
if($u['clock'] == 0){
echo '<div class ="clock">';
echo date("H:i:s");
echo' UKR';
echo '</div>';
}
if($u['vip'] == 1){
$evip = mysql_query("SELECT `evip` FROM `users` WHERE `id` = '".$u['id']."' AND `evip` < '".time()."'");
if (mysql_num_rows($evip)) {
mysql_query("UPDATE `users` SET `vip` = '".($u['vip']-1)."' WHERE `id` = '".$u['id']."'");
}
}
if($_GET['links_ok']) {
echo '<div class="cred">Ссылка сохранена в буфере !</div>';
}
echo '</div>';
}
if($u['id']){
$duels_end = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_list` WHERE `time_end` < '".time()."'"), 0);
if($duels_end > 0){
$result = mysql_query("SELECT * FROM `duels_list` WHERE `time_end` < '".time()."'");
while($duel = mysql_fetch_assoc($result)){
$count1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_votes` WHERE `vote` = '1' AND `duel` = '".$duel['id']."'"), 0);
$count2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_votes` WHERE `vote` = '2' AND `duel` = '".$duel['id']."'"), 0);
if($count1 == $count2) $victory = 0;
else if($count1>$count2) $victory = $duel['user1'];
else $victory = $duel['user2'];
mysql_query("UPDATE `duels_list` SET `victory` = '$victory' WHERE `id` = '".$duel['id']."'");
}
}
mysql_query("UPDATE `users` SET `online` = '".time()."', `location` = '$location', `chat_location` = '$chat_location' WHERE `id` = '".$u['id']."'");
if($u['online']){
$timeplus = time()-$u['online'];
if($timeplus < $system['online_time']){
mysql_query("UPDATE `users` SET `anketa_alltime` = '".($u['anketa_alltime'] + $timeplus)."' WHERE `id` = '".$u['id']."'");
} else {
mysql_query("UPDATE `users` SET `anketa_alltime` = '".($u['anketa_alltime'] + $system['online_time'])."' WHERE `id` = '".$u['id']."'");
}
}
} else {
echo '<div style="
background-color: #b4c8e9;
color: #434e60;
padding:0px 0px 0px 0px;
margin: 0px;
line-height: 19px;
">';
echo ' <div class="menu_icon">
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:24%;border-right: 1px solid #D4EEFF;white-space: nowrap;"><a href = "/"style="text-align:center;display:block;padding:5px;font-size: small;">Главная</a></td>
<td style="vertical-align:top;width:24%;border-right: 1px solid #D4EEFF;white-space: nowrap;"><a href = "/login.php"style="text-align:center;display:block;padding:5px;font-size: small;">Вход</a></td>
<td style="vertical-align:top;width:24%;white-space: nowrap;"><a href = "/registration.php"style="text-align:center;display:block;padding:5px;font-size: small;">Регистрация</a></td>
</tr></table></div></div>';
}
if ($u['delete'] == 1) {
ok(' Акаунт '.$u['login'].' заморожен за нарушение </font><a href="/rules.php">условий использования сервиса ');
require('foot.php');
exit;
}
if(isset($u['id']) && empty($page_page)){
if(ban($u['id'])) {
$bans = mysql_fetch_assoc(mysql_query("SELECT * FROM `users_ban` WHERE `user` = '".$u['id']."' ORDER BY `time` DESC"));
ok(' Вы были заблокированы за нарушение <a href="/rules.php">условий использования сервиса</a>. </br>
До окончания блокировки осталось: '.kikt($bans['time_ban']).' ');
require('foot.php');
exit;
}
}
?>