Файл: sys/inc/thead.php
Строк: 67
<?
$set['meta_keywords']=(isset($set['meta_keywords']))?$set['meta_keywords']:null;
$set['meta_description']=(isset($set['meta_description']))?$set['meta_description']:null;
####
if (isset($user))
{
$timeactiv=time() - $user['date_last'];
if($timeactiv < 120)
{
$newtimeactiv=$user['time']+$timeactiv;
mysql_query("UPDATE `user` SET `time` ='$newtimeactiv', `perehodu` = '".($user['perehodu']+1)."' WHERE `id` = '$user[id]' LIMIT 1");
echo mysql_error();
}
}
####
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";
################################################################################
if (isset($user['id']))
{
$extra_n=rand(1,100);
if ($extra_n == 100 or $extra_n == 50 or $extra_n == 1)
{
@session_start();
$extra_unic=rand(1111111111,9999999999);
$_SESSION['unic_code']=$extra_unic;
$_SESSION['is_str']=$_SERVER['PHP_SELF'];
echo '<div class="aut"><a href="/pages/extra_ball.php?unic_code='.$extra_unic.'">Поймать подарок!</a></div>';
}}
################################################################################
if (isset($user['id']))
{
$bonus_date=date('d.m.y', time());
if($bonus_date != $user['bonus_date']){
mysql_query("UPDATE `user` SET `balls` = (`balls`+500), `bonus_date` = '$bonus_date' WHERE `id` = '$user[id]'");
echo "<div class='aut'>
Получайте монеты каждый день!<br />
Получайте монеты один раз в день.
Вам нужно зайти всего лишь раз в сутки на сайт!<br />n";
echo "Поздравляем! Вам было начисленно бонусных <b>+500</b> баллов!</div>n";
}
if($user['bonus_date'])echo "";
}
################################################################################
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>
<?
}
?>