Файл: vkollektive2014/head.php
Строк: 452
<?
if($u['setting_theme']){
$theme = '/themes/'.$u['setting_theme'].'/';
if(!is_dir($theme)){
$theme = '/themes/default/';
}
} else {
$theme = '/themes/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>';
$t=microtime(1); //вставляем в шапку
echo '<a id="page-up"></a>';
# echo '<div class="logo"><img src="image/logo.png" width="210" height="75"></div>';
# echo '<div class="logo2"></div>';
#####Унакал ссылка
if ( isset( $u['id'] ) )
{
$extra_n = rand( 1, 100 );
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic = rand( 1111111111, 9999999999 );
$_SESSION['unic_code'] = $extra_unic;
$_SESSION['is_str'] = $_SERVER['PHP_SELF'];
echo'<div class="div"><a href="/unic.money.php?unic_code=' . $extra_unic . '"><center>Поймать уникальную ссылку!</center></a></div>';
}
}
####
if ($u['ukraw'] == 0) {
echo'<div class="logo2"></div>';
}
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_user` WHERE `time` > '".(time()-(15*15*6))."'"), 0);
if($lenta_user > 0) $lenta_new2 = '+'.$lenta3.'';
$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 = '';
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('#up-browser|blackberry|windows ce|symbian|palm|nokia#i', $_SERVER["HTTP_USER_AGENT"]))
$webbrowser=false;
elseif (isset($_SERVER["HTTP_USER_AGENT"]) && (preg_match('#windows#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#linux#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#bsd#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#x11#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#unix#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#macos#i', $_SERVER["HTTP_USER_AGENT"]) ||preg_match('#macintosh#i', $_SERVER["HTTP_USER_AGENT"])))
$webbrowser=true;else $webbrowser=false; // определение типа браузера
if ($webbrowser == true)
{
$web_panel = true;
} else $web_panel = false;
$color = array();
$color['newevent'] = '#'.$u['panel_newevent'];
$color['fon'] = '#'.$u['panel_fon'];
$color['link'] = '#'.$u['panel_link'];
$color['focus_fon'] = '#'.$u['panel_focus_fon'];
$color['focus_link'] = '#'.$u['panel_focus_link'];
$color['border'] = '#'.$u['panel_border'];
$panel = array();
$panel['font_size'] = $u['panel_font_size'];
if ($u['panel']==1) {
$panel['home']="<img class='icon' src='/style/panel/home_".$u['panel_icons_list'].($web_panel==false?"_16x16":NULL).".png' alt='Дом'>";
$panel['mail']="<img class='icon' src='/style/panel/mail_".$u['panel_icons_list'].($web_panel==false?"_16x16":NULL).".png' alt='Почта'>";
$panel['journal']="<img class='icon' src='/style/panel/journal_".$u['panel_icons_list'].($web_panel==false?"_16x16":NULL).".png' alt='Журнал'>";
$panel['lenta']="<img class='icon' src='/style/panel/lenta_".$u['panel_icons_list'].($web_panel==false?"_16x16":NULL).".png' alt='События'>";
} elseif ($u['panel']==2) {
$panel['home']='Дом';
$panel['mail']='Почта';
$panel['journal']='Журнал';
$panel['lenta']='События';
} else {
$panel['home']='Д';
$panel['mail']='Пч';
$panel['journal']='Ж';
$panel['lenta']='С';
}
#
echo '<div style="
background-color: '.$fon.';
color: #434e60;
padding:0px 0px 0px 0px;
margin: 0px;
line-height: 20px;
">';
echo ' <div class="menu_icon"><font color="#434e60">';
?>
<style>
a.top_menu_link {
text-align: center;
display: block;
padding: 3px;
}
tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit;
}
table {
border-collapse: separate;
border-spacing: 2px;
border-color: gray;
}
#navi {
color: <? echo $color['border'];?>;
font-size: <? echo $panel['font_size'];?>;
padding:4px 2px;
background-color:<? echo $color['fon'];?>;
border:1px solid #abbefb;
}
#navi a:link,#navi a:visited {
color:<? echo $color['link'];?>;
text-decoration:none;
font-size: <? echo $panel['font_size'];?>;
}
#navi a:focus,#navi a:hover,#navi a:active {
color:<? echo $color['focus_link'];?>;
background-color:<? echo $color['focus_fon'];?>;
}
#navi a:focus,#navi a:hover,#navi a:active {
background-color: '.$fon.';
color: #434e60;
padding:0px 0px 0px 0px;
margin: 0px;
line-height: 19px;
}
#time {
background-color:#ccc;
color:#000;
font-size:medium;
text-align:right;
padding:0px 10px 0px 0px;
}
.newevent {
color: black;
font-size: <? echo $panel['font_size'];?>;
vertical-align:bottom;
}
</style>
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;width:24%;border-right:solid;; border-width:1px">
<a class="top_menu_link user_color_link" href="/page.php?"title="Дом">
<? echo $panel['home'];?>
</a>
</td>
<td style="vertical-align:top;width:25%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/mail.php" title="Почта">
<? echo $panel['mail'];?>
<? echo "<span class='newevent'>$mn</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:25%;border-right:solid;border-width:1px;">
<a class="top_menu_link user_color_link" href="/jurnal.php" title="Журнал">
<? echo $panel['journal'];?>
<? echo "<span class='newevent'>$j</span>n";?>
</a>
</td>
<td style="vertical-align:top;width:24%;border-right:solid;border-width:0px;">
<a class="top_menu_link user_color_link" href="/lenta.php" title="События">
<? echo $panel['lenta'];?>
<? echo "<span class='newevent'>$lenta_new</span>n";?>
</a>
</td>
</tr></table>
</div></font>
<?
if ($u['ukraw'] == 0) {
echo'<div class="logo2"></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']."'");
}
}
####
$vnim=mysql_fetch_array(mysql_query("SELECT * FROM `vnim`"));
$vnim_user=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$vnim['id_user']."'"));
if($u['clock'] == 0){
echo '<div class ="clock">';
echo '<div class="left"><b>Лидер: </b>';
echo ' '.ico($vnim_user['sex'],$vnim_user['admin']).' <a href="/page.php?id='.$vnim[id_user].'"><span style='color:'.$vnim[color].''><b>'.$vnim[nick_user].' '. online($vnim_user['online']) .'</b></span></font></a></div>';
if ($u['format_time'] == 0) {
$times = date("T G:i");
echo ''.$times.'';
} else {
$time1 = date("G") - 1;
$time2 = date("i");
$times = '' . $time1 . ':' . $time2 . '';
echo ' '.$times.'';
}
echo '</div>';
}
if ($u['ukraw'] == 0) {
echo'<div class="logo2"></div>';
}
#################################Вывод предупреждения!
if ($u['profession']!=NULL)echo "n";
else
echo "<div class='div'><a href='profile.php?id=$u[id]'><font color='red'> Внимание! Заполните данные в анкете!</font></a></div>n";
if ($u['login']==$u['password'])
{
echo '<div class="div1"><b>Внимание!</b> Грубое нарушение безопасности! Ваш ник совпадает с вашим паролем! Вам необходимо <a href="/settings.php?act=password">срочно сменить пароль</a>!</div>';
}
if(is_numeric($u['password']))
{
echo '<div class="div1"><b>Внимание!</b> Грубое нарушение безопасности! У вас слишком простой пароль! Вам необходимо <a href="/settings.php?act=password">срочно сменить пароль</a>!</div>';
}
###########3Конец
if($u['mail'] == 0) {
echo '<div class="cred">
<b>Администрация сайта никогда не попросит вас</br></b>
<u>выслать пароль,</br> отправить смс,</br> зайти на какой-либо сайт.</u></br>
<b>Не сообщайте свой пароль и третьим лицам!</br>Все сообщения такого типа являются мошеничеством или рекламой.</br>
Если вы получили такое сообщение нажмите "<font color="red">Спам</font>" возле сообщения!</b>
<a href = "mail.php?act=warning=off"><img src="ico/mdel.gif">Скрыть </div></a>';
}
#http://vkollektive.net/forum.php?act=theme&id=52
if($_SERVER['PHP_SELF']=='/index.php')
{
echo '<td style="vertical-align:top;width:20%;white-space: nowrap;"><a href = "/login.php?out=1"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="'.$link.'"><img src="/ico/exit.png" alt="Выход" title="Выход"></font></a></td>';
}
echo '</tr></table></div></div>';
if($u['admin'] ==1 || $u['admin'] ==2){
$count_spam = mysql_result(mysql_query("SELECT COUNT(*) FROM `spam`"), 0);
if($count_spam){
if($count_spam) echo '<div class="cred"><a href = "adminka.php?act=spam">Спам почта</a> (<font color="red">+'.$count_spam.'</font>)</div>';
}
}
$fo = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `user` = '".$user['id']."' and `online` > '".(time()-$system['online_time'])."'"), 0);
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="div">Ссылка сохранена в буфере !</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: url(../image/1.png);
color: #434e60;
padding:0px 0px 0px 0px;
margin: 0px;
line-height: 21px;
">';
echo ' <div class="menu_icon">
<table style="width:100%" cellspacing="0" cellpadding="0"><tr>
';
if(isset($_SERVER['PHP_SELF']) && $_SERVER['PHP_SELF']!='/index.php')
{
echo '<td style="vertical-align:top;width:24%;border-right: 1px solid #D4EEFF;white-space: nowrap;"><a href = "http://vkollektive.net/index.php"style="text-align:center;display:block;padding:5px;font-size: small;"><font color="black">Главная</font></a></td>';
}
if($_SERVER['PHP_SELF']!='/login.php')
{
echo '
<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;"><font color="black">Вход</font></a></td>';
}
if($_SERVER['PHP_SELF']!='/registration.php')
{
echo '<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;"><font color="black">Регистрация</font></a></td>
</tr></table></div></div>';
}
echo '</tr></table></div></div>';
}
if ($u['delete'] == 1) {
ok(' Акаунт '.$u['login'].' заморожен за нарушение </font><a href="/rules.php">условий использования сервиса ');
require('foot.php');
exit;
}
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"));
echo'<div class="div">
<span style="color:green;">Дата блокировки : </span>'.vremya($ban['time']).'<br/><span style="color:green;">Причина: </span>';
if ($bans['who'] == 1) {
echo '<b>грубость и оскорбления.</b>';
}
if ($bans['who'] == 2) {
echo 'Нецензурная лексика.';
}
if ($bans['who'] == 3) {
echo 'Спам, реклама.';
}
if ($bans['who'] == 4) {
echo'Разжигание ненависти.';
}
if ($bans['who'] == 5) {
echo 'Флуд, оффтопик.';
}
if ($bans['who'] == 6) {
echo 'Некорректное название темы.';
}
if ($bans['who'] == 7) {
echo 'Бессмысленная тема.';
}
if ($bans['who'] == 8) {
echo 'Намеки на дп.';
}
if ($bans['who'] == 9) {
echo 'ДП.';
}
if ($bans['who'] == 10) {
echo 'Педофилия.';
}
if ($bans['who'] == 11) {
echo 'Иное.';
}
if ($bans['who'] == 0) {
echo 'Иное.';
}
echo ' <span style="color:green;"><br/> До разблокировки осталось: </span> '.kikt($bans['time_ban']).' </div>';
require('foot.php');
exit;
}
}
########3
function extract16color($color16){
$mask16=array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
$color_mask=array("r","g","b");
$true_color=array("r"=>0,"g"=>0,"b"=>0);
$color16=substr($color16,1);
for($icm=0; $icm<count($color_mask); $icm++){
$color16_temp=array(substr($color16,($icm*2),1),substr($color16,($icm*2)+1,1));
for ($ic=0; $ic<2; $ic++){
for($i=0; $i<count($mask16); $i++){
if ($color16_temp[$ic]==$mask16[$i]){
$color16_temp[$ic]=$i;
break;
}
}
}
$true_color[$color_mask[$icm]]=((int)$color16_temp[0]*16)+(int)$color16_temp[1];
}
return $true_color;
}
function make16color($color10){
$mask16=array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
$color_mask=array("r","g","b");
$true_color="#";
for($icm=0; $icm<count($color_mask); $icm++){
$color10_temp=(int)$color10[$color_mask[$icm]];
$true_color.=$mask16[(int)($color10_temp/16)];
$true_color.=$mask16[$color10_temp%16];
}
return $true_color;
}
function GradientText($text,$sColor,$eColor){
$color_mask=array("r","g","b");
$color_move=array("r"=>0,"g"=>0,"b"=>0);
$color_add=array("r"=>0,"g"=>0,"b"=>0);
$word=array();
$length=strlen($text);
$output="";
$Gzip="";
$current_color="";
$max=0;
if($length>0){
$sColor=extract16color($sColor);
$eColor=extract16color($eColor);
$cColor=$sColor;
for($i=0; $i<count($color_mask); $i++){
$temp=$sColor[$color_mask[$i]]-$eColor[$color_mask[$i]];
$color_add[$color_mask[$i]]=abs($temp);
if(abs($temp)>$max){
$max=abs($temp);
}
if($temp<0){
$color_move[$color_mask[$i]]=1;
} else if ($temp>0){
$color_move[$color_mask[$i]]=-1;
} else {
$color_move[$color_mask[$i]]=0;
}
}
for($i=0; $i<$length; $i++){
$char=substr($text,$i,1);
$test=ord($char);
if($test>=128 and $test<=255 | $test=""){
$char=substr($text,$i,2);
$i++;
}
$word[]=$char;
}
}
$length=count($word);
$koeff_add=@(($max/$length)/$max)*100;
for($i=0; $i<$length; $i++){
for($i2=0; $i2<count($color_mask); $i2++){
$add=(($color_add[$color_mask[$i2]]/100)*$koeff_add)*$color_move[$color_mask[$i2]];
$cColor[$color_mask[$i2]]+=$add;
}
$current_color=make16color($cColor);
if(!$i){
$output.='<font color="'.$current_color.'">'.$word[$i];
$Gzip=$current_color;
} else {
if($current_color==$Gzip | $word[$i]==" "){
$output.=$word[$i];
} else {
$output.='</font><font color="'.$current_color.'">'.$word[$i];
$Gzip=$current_color;
}
}
}
if(strlen($output)){
$output.="</font>";
}
return $output;
}
//-------------------------------Фиксируем день рождение-------------------------------//
$ank_date = $u['anketa_bday'] + $u['anketa_bmonth'];
$real_date = date("n") + date("j");
if ($ank_date == $real_date) {
@mysql_query("UPDATE `users` SET `cake` = '1' WHERE `id` = '" . $u['id'] . "'");
} else {
@mysql_query("UPDATE `users` SET `cake` = '0' WHERE `id` = '" . $u['id'] . "'");
}
?>