<?
$set['meta_keywords']=(isset($set['meta_keywords']))?$set['meta_keywords']:null;
$set['meta_description']=(isset($set['meta_description']))?$set['meta_description']:null;
// Ключевые слова
if ($set['meta_keywords']!=NULL)
{
function meta_keywords($str)
{
global $set;
return str_replace('</head>', '<meta name="keywords" content="'.$set['meta_keywords'].'" />'."\n</head>", $str);
}
ob_start('meta_keywords');
}
// Описание мета
if ($set['meta_description']!=NULL)
{
function meta_description($str)
{
global $set;
return str_replace('</head>', '<meta name="description" content="'.$set['meta_description'].'" />'."\n</head>", $str);
}
ob_start('meta_description');
}
$set['web'] = false;
//header("Content-type: application/vnd.wap.xhtml+xml");
//header("Content-type: application/xhtml+xml");
header("Content-type: text/html");
echo '<?xml version="1.0" encoding="utf-8"?>';
//////<script src="/ajax/elka33.js"></script>
?>
<!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 name="viewport" content="width=device-width">
<title>
<?=$set['title']?>
</title>
<link rel="shortcut icon" href="/style/themes/<?=$set['set_them']?>/favicon.ico" />
<link rel="stylesheet" href="/style/themes/<?=$set['set_them']?>/style.css" type="text/css" />
</head>
<body>
<div class="body">
<?
if (isset($_SESSION['message']))
{
echo '<div class="msg">' . $_SESSION['message'] . '</div>';
$_SESSION['message'] = NULL;
}
if ($_SERVER['PHP_SELF'] == '/index.php')
{
?>
<div class="head"><center>
<img src="/style/themes/<?=$set['set_them']?>/logo.png" alt="logo" />
</center></div>
<?
}
// Уведомления
if (isset($_SESSION['message']))
{
echo '<div class="msg">' . $_SESSION['message'] . '</div>';
$_SESSION['message'] = NULL;
}
// Вывод ошибок
if (isset($_SESSION['err']))
{
echo '<div class="msg">' . $_SESSION['err'] . '</div>';
$_SESSION['err'] = NULL;
}
$req = mysql_query("SELECT * FROM `close_site` WHERE `view` AND `time` > '".time()."'");
while ($res = mysql_fetch_assoc($req)) {
if($user['level']>4){
if (isset($_GET['open'])){
mysql_query("UPDATE `close_site` SET `view` = '0' WHERE `id` = '".$res['id']."'");
$_SESSION['message'] = 'Сайт успешно открыт';header("Location:/");}
if (isset($_GET['close'])){
mysql_query("UPDATE `close_site` SET `view` = '1' WHERE `id` = '".$res['id']."'");
$_SESSION['message'] = 'Сайт успешно закрыт до '.vremja($res['time']).'';header("Location:/");}
if (isset($_GET['delete'])){
mysql_query("DELETE FROM `close_site` WHERE `id` = '".$res['id']."' LIMIT 1");
$_SESSION['message'] = 'Успешно!';header("Location:/");}}
if($user['level']<4){
if($res['view']){
if (isset($_GET['id_users']) && isset($_GET['password'])){
include_once H.'sys/inc/shif.php';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '".intval($_GET['id_users'])."' AND `pass` = '".shif($_GET['password'])."' LIMIT 1"), 0)==1){
$user = get_user($_GET['id_users']);
$_SESSION['id_user'] = $user['id'];
mysql_query("UPDATE `user` SET `date_aut` = ".time()." WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `date_last` = ".time()." WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("INSERT INTO `user_log` (`id_user`, `time`, `ua`, `ip`, `method`) values('$user[id]', '$time', '$user[ua]' , '$user[ip]', '0')");
header('Location: /my_aut.php');}
else $_SESSION['err'] = 'Неправильный логин или пароль';}
?>
<table border=0 width=100% height=100%><div class='title'>Сайт закрыт</div>
<tr>
<td class='mess'><center><b><?=text($res['prichina'])?>!<br>Будет открыт - <font
color="green"><?=vremja($res['time'])?></font></b></font></center></td>
</tr>
</table></td></tr></table>
<?include_once H."style/themes/$set[set_them]/foot.php";?>
</td>
</tr>
</table></div>
</body>
</html><?exit();}}else{if($res['view']){echo'<div class="foot">Причина закрытия сайта: '.text($res['prichina']).'! <br/>Открыт будет - <font color="red">'.vremja($res['time']).'</font>'.(isset($user)?'<a style="float:right;" '.($res['view']?'href="?open">Открыть сайт':'href="?close">Закрыть сайт').'</a>':NULL).'</div>';}}
if(isset($user) && $res['view']==0 && $user['level']>4){echo'<div class="foot" style="padding-bottom:20px;">Причина закрытия сайта: '.text($res['prichina']).'! <br/>Открыт будет - <font color="red">'.vremja($res['time']).'</font><br/>'.(isset($user)?'<a style="float:left;" href="?close">Закрыть сайт</a><a style="float:right;" href="?delete"><img src="/style/icons/delete.gif" alt="*"></a>':NULL).'</div>';}
}
if (isset($user['id']))
{
if (date('d.m.y', time()) != $user['year_date'])
{
mysql_query("UPDATE `user` SET `year_cout` = '0',`year_date` = '" . date('d.m.y', time()) . "' WHERE `id` = '$user[id]' LIMIT 1");
}
if ((rand(46,199) == 100 || rand(50,220) == 200 ) && $user['year_cout'] <= 3 )
{
$_SESSION['year_code'] = $year_cod = md5(rand(1000000000,9999999999));
header('Location: /plugins/new_year/new_year.php?year_code='.$year_cod);
}
}
if (!isset($fortuna))$fortuna = 1;
if (isset($user['id']) && $fortuna == 1)
{
$rand = rand(1,500);
$key = rand(1111111111,9999999999);
if ($rand == 10 or $rand == 20 or $rand == 30 or $rand == 40 or $rand == 50 or $rand == 60 or $rand == 70 or $rand == 80 or $rand == 90 or $rand == 100)
{
$_SESSION['s_code'] = $key;
$_SESSION['s_rand'] = $rand;
$_SESSION['s_str'] = $_SERVER['PHP_SELF'];
echo '<div class="nav2"><img src="/style/icons/fav.gif" /> <a href="/plugins/games/zagon/fortuna.php?key=' . $key . '">Поймать добычу</a></div>';
}
}
//////require_once$_SERVER['DOCUMENT_ROOT'].'/sys/include.php';
?>
<link rel="stylesheet" href="/style/system.css" type="text/css" />