File size: 2.32Kb
<?php
//Локальноя папка
$local_dir="http://sphp.h2m.ru/";
header("Content-type:text/html; charset=utf-8");
header('Cache-control: no-cache');
echo '<!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>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
if((isset($_SESSION['slogin'])!='') && (isset($_SESSION['spass'])!='')) {
echo '<link rel="stylesheet" type="text/css" href="../styles/'.$dthema.'.css">'; }
else { echo '<link rel="stylesheet" type="text/css" href="../styles/'.$setstyle.'.css">'; }
echo '<link rel="shortcut icon" href="../styles/favicon.ico">';
echo '<title>Главная '.$date.'/'.$time.'</title>';
echo '<meta name="keywords" content="">';
echo '<meta name="description" content="">';
echo '</head><body>';
echo '<div class="header"><div align="right"><img src="../16-prev.gif" alt="" /></div>';
if((isset($_SESSION['slogin'])=='') && (isset($_SESSION['spass'])=='')) {
echo '<div class="menu"><a href="../pages/avtori.php">Войти</a> | <a href="../pages/reg.php">Регистрация</a></div></div>'; } else {
echo '<div class="menu">';
if(($ddostup!=0) && ($ddostup==1)) { echo '<a href="../'.admdir.'/?">Админка</a> | <a href="../pages/anketa.php?id='.$dlogin.'">Анкета</a> | '; } else { echo '<a href="pages/anketa.php?id='.$dlogin.'">Анкета</a> | '; }
echo '<a href="../pages/exit.php">Выход</a></div></div>'; }
if((isset($setclose)) && ($setclose==1) && ($setlogadm!=isset($dlogin))) { echo "Сайт временно закрыт!<br>© Smartfan"; exit; }
if(empty($dban)) { $dban=0; } else { echo "Ваш профиль забанил администратор!<br>© Smartfan<br>"; exit; }
if(isset($_SESSION['slogin'])!='') {
$log=$_SESSION['slogin']; } else { $log='guest'; }
$unix=time();
$sec=300;
mysql_query("DELETE FROM `online` WHERE `time`+$sec < ".$unix." || `ip`='".$ip."';");
mysql_query("INSERT INTO `online` VALUES ('','".mysql_real_escape_string($log)."','".mysql_real_escape_string($ip)."','".mysql_real_escape_string($agent1)."','".mysql_real_escape_string($unix)."');");
$skolko=mysql_query("SELECT COUNT(*) FROM `online`;");
$count=mysql_result($skolko,0);
?>