Файл: vk.com_vhllam/sys/inc/thead.php
Строк: 85
<?
$set['meta_keywords']=(isset($set['meta_keywords']))?$set['meta_keywords']:null;
$set['meta_description']=(isset($set['meta_description']))?$set['meta_description']:null;
$p=mysql_fetch_array(mysql_query("select * from `cron` where `id`='clan_bonus';"));
if ($p['time'] < $time)
{
//$id = intval($_GET['id']);
$q = mysql_query("SELECT * FROM `clan`");
while ($post = mysql_fetch_array($q))
{
$users = mysql_result(mysql_query("SELECT COUNT(*) FROM `clan_user` WHERE `id_clan` = '$post[id]' AND `activaty` = 0"),0);
$level = ($post['level']*5)*$users;
if ($level>=1000)
{
$balls = $level;
mysql_query("UPDATE `clan` SET `bank` = '".intval($post['bank']+$balls)."' WHERE `id` = '$post[id]' LIMIT 1");
}
elseif($level<1000)
{
$balls = $level*5;
mysql_query("UPDATE `clan` SET `bank` = '".intval($post['bank']+$balls)."' WHERE `id` = '$post[id]' LIMIT 1");
}
}
$times = time()+1800;
mysql_query("UPDATE `cron` SET `time` = '".$times."' WHERE `id` ='clan_bonus';");
}
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 (isset($user) && isset($_GET['t'])){
if ($webbrowser=='WEB')
{
$set_t='set_them2';
}
else
{
$set_t='set_them';
}
$wap='default';
$web='web';
if ($_GET['t']=='wap')mysql_query("update `user` set `$set_t`='$wap' where `id`='$user[id]' limit 1");
elseif ($_GET['t']=='web')mysql_query("update `user` set `$set_t`='$web' where `id`='$user[id]' limit 1");
header("location: $_SERVER[HTTP_REFERER]");
}
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><?echo $set['title'];?></title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="/style/themes/<?echo $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 (!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="post_1"><img src="/games_xhata/icons/ch.gif" /> <a href="/games_xhata/zagon/fortuna.php?key=' . $key . '">Поймать зверя</a></div>';
}
}
?>