File size: 2.77Kb
<?
//считаем время генерации страницы
list($msec1, $sec1) = explode(chr(32), microtime());
$headtime1 = $sec1 + $msec1;
$t1=microtime();
echo '<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title>';if($title)echo $title.' - '; echo $_SERVER['HTTP_HOST'].'</title> ';
if($user)
echo'<link rel="stylesheet" href="/'.$user['design'].'" type="text/css" media="all"/>';
else
echo'<link rel="stylesheet" href="/'.$design.'" type="text/css" media="all"/>';
echo '<link href="/player/video-js.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/files/js/jquery.js"></script>
<script type="text/javascript" src="/files/js/main.js"></script>
</head><body><div class="html">';
echo'<div class="menu" style="text-align:center;"><a href="/"><img src="/files/images/logo.png" alt=""/></a></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>';
?>
<script>
setInterval(updateInfo, 4500);
function updateInfo(){console.log('ajax');$('#refresh').load('/other/new_act.php');}
</script>
<div id="refresh"></div>
<?php
echo'<div class="head"><a href="/">'.$head.'</a>'; if($title)echo' → '.$title;
if($user)echo'<a id="up" href="#" class="login" style="float:right;">Личный кабинет</a>';
echo'</div>';
if($user){
$db->prepare("update `user` set `where1`='$where_me', `where2`='$title' where `id`='$user[id]'")->execute();
echo'<div id="hide"><div class="menu" style="text-align:center;">Мой ID: '.$user['id'].'<br />Мой баланс: '.$user['balans'].' баллов</div>
<div class="touch">';
if($user['level'])echo'<div class="menu"><a href="/admin" style="padding:6px;">Админ-панель</a></div>';
echo'<div class="menu"><a href="/profile'.$user['id'].'" style="padding:6px;">Мой профиль</a></div>
<div class="menu"><a href="/dialog" style="padding:6px;">Мои сообщения</a></div>
<div class="menu"><a href="/notice" style="padding:6px;">Мои оповещения</a></div>
<div class="menu"><a href="/friends" style="padding:6px;">Мои друзья</a></div>
<div class="menu"><a href="/my/edit/profile" style="padding:6px;">Редактировать профиль</a></div>
<div class="menu"><a href="/my/edit/avatar" style="padding:6px;">Редактировать аватар</a></div>
<div class="menu"><a href="/remied" style="padding:6px;">Изменить пароль</a></div>
<div class="menu"><a href="/exit" style="padding:6px;">Выход</a></div>
</div>
<div class="head">'.$title.'</div>
</div>';
}