Просмотр файла includes/template.php

Размер файла: 5.52Kb
<?php
@session_start();
if(isset($_SESSION['auth']) and $_SESSION['auth']==1){

$usr =  mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `login` = '".$_SESSION['login']."' LIMIT 1"));

$title = '
['.$usr['login'].'] / youthchat.ru
';

if($usr['op']==0){

$op = '
<a href="/profile/op.php"><b>Оповещения (0)</b></a> 
';

}else{

$op = '
<a href="/profile/op.php"><b>Оповещения ('.$usr['op'].')</b></a> 
';

}

$top = '
<div class="back"><div class="top_line">
<a href="/profile/?"><b>Профиль</b></a> 
<a href=""><b>Почта (0)</b></a>  '.$op.' <a href="/go.php?exit"><b>Выход</b></a>
</div>
';

}else{

$title = '
-='.date("H:i").'=-
';

$top = '
<div class="back"><div class="top_line" style="margin:-2px -5px 0px -5px;color:white;padding:1px 5px 1px 5px;" align="center">
Добро пожаловать!
</div>
';

}

$_up = '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
<head>
<title>'.$title.'</title>
<style type="text/css">
@charset "utf-8";

body {
background: #eef7df;
color: #444;
font: 11px Verdana;
margin: 0 auto;

}
.ead {
background: url(/imgs/css/logobg.png) repeat-x bottom #aded71;
border-bottom: 1px solid #8fcd54;
text-align: center;
}
.ead {
color: #5c6a4e;
font-size: 5px;
font-family: Arial;
padding: 5px 2px 6px 6px;
}
.auth, .top_line {
background: url(/imgs/css/auth.png) repeat-x top #89b54c;
padding: 4px 0;
border-top: 1px solid #c4f482;
border-bottom: 1px solid #68942c;
}
.auth a, .top_line a { background: url(/imgs/css/auth_link.png); padding: 4px 6px; color: #fff; }
.auth a:hover, .top_line  a:hover { background: url(/imgs/css/auth_link_h.png); text-decoration: none; }

a { color: #4d801a; text-decoration: none; }
a:hover { text-decoration: underline; }
img { border: 0; }

form, input, textarea, select { font: 11px Tahoma; margin: 0; }
input, textarea, select {
background: repeat-x top left #fefefe;
border: 1px solid #919191;
color: #737373;
margin: 1px 0;
}
input, textarea {
padding-left: 1px;
padding-right: 1px;
}
input:focus, textarea:focus { border: 1px solid #777; } :focus { outline: 0; }
input[type="text"], input[type="password"] { padding-left: 2px; padding-right: 2px; }
input[type="submit"] {
background: url(/imgs/css/submit.png) repeat-x bottom #94e14a;
color: #fff;
border: 1px solid #7ea259;
padding-left: 2px;
padding-right: 2px;
}

.foot {
background: #8dd24a;
border-bottom: 1px solid #6fa739;
padding: 7px 4px 7px 6px;
}

.foot, .foot a { color: #fff; }

.box1, .box2 { padding: 4px;}
.box1 { background: #eef7df; border-bottom: 1px solid #dde8ca; border-top: 1px solid #fff; }
.box2 { background: #f9ffef; border-bottom: 1px solid #e5eed5; border-top: 1px solid #fff; }

.MSG {
background: #90a272;
padding: 3px;
border-bottom: 1px solid #788562;
border-top: 1px solid #c9dda9;
}
.MSG, .MSG a{ color: #fff;}

.list{

background:#FAFAFA;

}

.title {
background: url(/imgs/css/title.png) repeat-x top #75c22b;
border-top: 1px solid #b1e87e;
border-bottom: 1px solid #6bb02a;
padding: 5px 2px 5px 3px;
font-size: 12px;
font-weight: bold;
color: #ffffff;
}


.top{
background:#A15F40;
color:#ffffff;
margin:-5px -5px -0px -5px;
padding:5px;
}
.back{
font-family: Verdana, Tahoma, Arial;
font-size:12px;
color: #00000;
background-color: #ffffff;
padding:2px 0px 2px 0px;
}



.menu {
background: #f9ffef;
padding: 4px 3px 2px 3px;
border-bottom: 1px solid #e2efcc;
border-top: 1px solid #f4fce6;
}
.bm { background: #e4ffca; border-top: 1px solid #8eb368;  border-bottom: 1px solid #8eb368; padding:  4px; }

.razdel{
background:#ea7500;
border-top:1px solid #C28466;
padding: 4px;
}
</style>
</head><body><div class="ead">
<a href="http://bemsmeet.ru/"><big>Ноая соц.сеть! Заходи!</big></a></div>
'.$top.'
';

$banner1='http://gigatop.net/in.php?22381'; $banner1_img='http://gigatop.net/c.php?22381';

$url = $_SERVER['SCRIPT_NAME'];

if(isset($_SESSION['auth']) and $_SESSION['auth']==1){

if($url!=="/enter.php"){
$_down = '
</div><div class="foot"><div align="right" style="padding:3px;"><span style="float:left;"><a href="/enter.php?">Прихожая</a></span><a href="'.$banner1.'"><img src="'.$banner1_img.'" width="65px" height="15px" alt="banner1"></a> <a href=""><img src="" width="65px" height="15px" alt="banner2"></a></div></div>
</body></html>
';

}else{

$_down = '
</div><div class="foot"><div align="right" style="padding:3px;"><span style="float:left;"><br></span><a href="'.$banner1.'"><img src="'.$banner1_img.'" width="65px" height="15px" alt="banner1"></a> <a href=""><img src="" width="65px" height="15px" alt="banner2"></a></div></div>
</body></html>
';

}
}else{

if($url!=="/index.php"){
$_down = '
</div><div class="foot"><div align="right" style="padding:3px;"><span style="float:left;"><a href="/">Главная</a></span><a href="'.$banner1.'"><img src="'.$banner1_img.'" width="65px" height="15px" alt="banner1"></a> <a href=""><img src="" width="65px" height="15px" alt="banner2"></a></div></div>
</body></html>
';

}else{

$_down = '</div><div class="foot">
<div align="right" style="padding:3px;"><span style="float:left;"><br></span><a href='.$banner1.'""><img src="'.$banner1_img.'" width="65px" height="15px" alt="banner"></a> <a href=""><img src="" width="65px" height="15px" alt="banner"></a></div></div>
</body></html>
';

}
}
?>