File size: 4.77Kb
<?
$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');
}
if (file_exists(H."style/themes/$set[set_them]/head.php"))
include_once H."style/themes/$set[set_them]/head.php";
else
{
$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"?>';
?><!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>
<title><?=$set['title']?></title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/style/themes/<?=$set['set_them']?>/style.css" type="text/css" />
<link rel="alternate" title="Новости RSS" href="/news/rss.php" type="application/rss+xml" />
</head>
<body>
<div class="body">
<?
}
// Уведомления
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>';}
}
?>
<link rel="stylesheet" href="/style/system.css" type="text/css" />