Файл: header/header.inc.php
Строк: 218
<?php
session_name('im');
session_start();
$PREFER_DEFLATE=true;
$FORCE_COMPRESSION=false;
function head_return_replaced_str($o){
$o=ereg_replace("<:([^:>]*):>","",$o);
$o=str_replace('href=""','href="'.$_SERVER['SCRIPT_NAME'].'"',$o);
$o=str_replace('action=""','action="'.$_SERVER['SCRIPT_NAME'].'"',$o);
$o=str_replace('href="?','href="'.$_SERVER['SCRIPT_NAME'].'?',$o);
$o=str_replace('action="?','action="'.$_SERVER['SCRIPT_NAME'].'?',$o);
$o=str_replace('URL=?','URL='.$_SERVER['SCRIPT_NAME'].'?',$o);
return $o;
}
function compress_output_gzip($output) {
global $_CONF;
If (isset($_CONF)){
foreach($_CONF as $key=>$value){
$output=formating($key,$value);
}
}
$o=utf_encode($output);
$o=head_return_replaced_str($o);
return gzencode($o);}
function compress_output_deflate($output) {
global $_CONF;
If (isset($_CONF)){
foreach($_CONF as $key=>$value){
$output=formating($key,$value,$output);
}
}
$o=utf_encode($output);
$o=head_return_replaced_str($o);
return gzdeflate($o);}
function compress_output_x_gzip($output) {
global $_CONF;
If (isset($_CONF)){
foreach($_CONF as $key=>$value){
$output=formating($key,$value,$output);
}
}
$o=utf_encode($output);
$o=head_return_replaced_str($o);
return gzcompress($o);}
function standart($output) {
global $_CONF;
If (isset($_CONF)){
foreach($_CONF as $key=>$value){
$output=formating($key,$value,$output);
}
}
$output=utf_encode($output);
$output=head_return_replaced_str($output);
return $output;
}
if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {$AE=$_SERVER['HTTP_ACCEPT_ENCODING'];}
elseif (isset($_SERVER['HTTP_TE'])) {$AE=$_SERVER['HTTP_TE'];}
else {$AE="";}
$support_gzip=(strpos($AE, 'gzip')!== FALSE)||$FORCE_COMPRESSION;
$support_deflate=(strpos($AE, 'deflate')!== FALSE)||$FORCE_COMPRESSION;
$support_x_gzip=(strpos($AE, 'x-gzip')!== FALSE)||$FORCE_COMPRESSION;
if($support_gzip && $support_deflate) {$support_deflate=$PREFER_DEFLATE;}
if ($support_deflate) {header("Content-Encoding: deflate"); ob_start("compress_output_deflate");}
elseif($support_gzip) {header("Content-Encoding: gzip"); ob_start("compress_output_gzip");}
elseif($support_x_gzip) {header("Content-Encoding: x_gzip"); ob_start("compress_output_x_gzip");}
else {ob_start("standart");}
$_CONF['index_align']="klubv";
$_CONF['index_page']="index.php";
$themes=$_COOKIE['klubv'];
if (@file ("/style/klubv.css"))
{$themes=$themes;}
else {
if (!empty($setall['par1'])){
$themes=$setall['par1'];
}
else{
$themes='klubv';
}
}
if(!isset($_SESSION['MyStyle']) AND (isset($_GET['MyStyle']) OR isset($_POST['MyStyle']) OR isset($_COOKIE['MyStyle']))){
$_MyStyle=str_replace('./',' ',str_replace(" ",'',(empty($_GET['MyStyle'])?(empty($_POST['MyStyle'])?(empty($_COOKIE['MyStyle'])?'klubv':$_COOKIE['MyStyle']):$_POST['MyStyle']):$_GET['MyStyle'])));
if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/style/'.$_MyStyle.'.css'))
$_MyStyle='klubv';
setcookie('MyStyle',$_MyStyle,time()+60*60*24*30*12);
$_SESSION['MyStyle']=$_MyStyle;
}
else
$_MyStyle=isset($_SESSION['MyStyle'])?$_SESSION['MyStyle']:'klubv';
ini_set('display_errors', 'off');
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
// Шапка
echo '
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta name="keywords" content="автосерфинг, клик-клуб, раскрутка, сайты, заработать" />
<meta name="description" content="Клик-Клуб новой генерации с уникальным автосёрфингом" />
';
echo '<!-- klikyn.ru -->';
include 'connect.inc.php';{
$style=$_USER['style'];
if($style == NULL) {$style = 'klubv';}
else{$style = $_USER['style'];}
print "<title>".$_CONF['d_title']." | ".$_CONF['title']."</title><link rel="stylesheet" href="/style/".$style.".css" type="text/css" /></head><body>";
}
echo "<div class='zag'><div class='head'>".$_CONF['index_title']."</div>";
// Пишем куку рефа
if(!isset($_COOKIE["pid"])){
setcookie ("pid",$_GET['pid'], time()+604800, "/"); //кука на неделю
}
// Переходов по реф ссылке
$pid = mysql_real_escape_string($_GET[pid]);
if (!empty($pid)){
mysql_query("UPDATE `cclub_users` SET `pidcnt`=`pidcnt`+1 WHERE `login`='".$pid."'") or die('err4578');
}
// Блокировка
if ($_SESSION['block'] >= 10) {
If ($_enter){
mysql_unbuffered_query("update `".prefix."users` set `mesto`='Заблокирован Системой', `online`='".time()."' where `id` = '".$_USER['id']."';");
mysql_query("INSERT into `cclub_adm_chat` VALUES ('','Система','<b>".$_USER['login']."</b>, Временно заблокирован т.к. его действия похожи на автоматические.','".time()."') ");
}
header("Location: /block.php") ; // редирект
exit;
}
// Выключение
$SET = mysql_fetch_assoc(mysql_query("SELECT * FROM `nastroyki` where `id`='1';"));
$off = $SET['off'];
If (!$_USER['admin']){
if ($off == 1) {
header("Location: /off.php") ; // редирект
exit;
}
}
// Реклама верх
$result = mysql_query("SELECT * FROM `rek` where `srok`>".time()." && `mesto`='1' order by `id`");
$k=mysql_num_rows($result);
if($k!==0) {echo'<div class="ads">';}
for ($c=0; $c<mysql_num_rows($result); $c++){
$f = mysql_fetch_array($result);
if($f[cvet]!==NULL){
$nfont='<font color ="'.$f[cvet].'">';
$kfont='</font>';
}
if($f[b]=="1"){
$b1='<b>';
$b2='</b>';
}
else{$b1='';
$b2='';}
echo '<a href="/reklam/rek.php?mode=go&id='.$f[id].'">'.$b1.' '.$nfont.' '.$f[nazv].' '.$kfont.' '.$b2.'</a><br>';
}
if($k!==0) {echo'</div>';}
include 'connect.inc.php';
// SMSka
$qy=mysql_query("select* from `cclub_lichka` where (`loginto`='".$_USER['login']."' && `status`='0');");
$ne=mysql_num_rows($qy);
if (isset($_USER)){
if($ne!==0)
echo '<div class="ads"><div class="enter">
<audio autoplay>
<source src="/sounds/sndIncMsg.wav">
</audio>
<img src="/icon/smska.png"></a>
<a href=/system/mail.php?mode=vhod>
<font color="#FFFF00"><b>SMSka: ['.$ne.']</b></font></a></div></div>';
}
// Рассылка
$df=mysql_query("select* from `cclub_adsmail` where (`loginto`='".$_USER['login']."' && `status`='0');");
$nf=mysql_num_rows($df);
if (isset($_USER)){
if($nf!==0)
echo '<div class="ads"><div class="enter">
<audio autoplay>
<source src="/sounds/sndIncMsg.wav">
</audio>
<img src="/icon/smska.png"></a>
<a href=/reklam/adsmail.php?mode=vhod>
<font color="#FFFF00"><b>Рассылка: ['.$nf.']</b></font></a></div></div>';
}
if (isset($_USER)){
echo'<div class="menuindex">• ';
/// Ручник
$g=mysql_result(mysql_query('SELECT COUNT(*) FROM `'.prefix.'url` LEFT JOIN `'.prefix.'clicks` ON `'.prefix.'clicks`.`who`=''.$_USER['id'].'' AND `'.prefix.'clicks`.`to`=`'.prefix.'url`.`id` WHERE `'.prefix.'url`.`id_user`!=''.$_USER['id'].'' AND `'.prefix.'url`.`activ`='0' AND `'.prefix.'url`.`moder`='0' AND `'.prefix.'clicks`.`to` IS NULL;'),0);
If ($g == 0) {}
else {
$ssilk = '<a href="/surf/go.php'.$_zapros.'"><font color="#CC9900"><b>C: ['.$g.'] </b></font></a>•';
}
/// Автомат
$a=mysql_result(mysql_query('SELECT COUNT(*) FROM `'.prefix.'url` LEFT JOIN `'.prefix.'clicks` ON `'.prefix.'clicks`.`who`=''.$_USER['id'].'' AND `'.prefix.'clicks`.`to`=`'.prefix.'url`.`id` WHERE `'.prefix.'url`.`id_user`!=''.$_USER['id'].'' AND `'.prefix.'url`.`autos`='0' AND `'.prefix.'url`.`activ`='0' AND `'.prefix.'url`.`moder`='0' AND `'.prefix.'clicks`.`to` IS NULL;'),0);
If ($a == 0) {}
else {
$autoserf = '<a href="/surf/ago.php"><font color="#CC0000"><b> А: ['.$a.'] </b></font></a>•';
}
// Кредиты банк
$k= $_USER['cfrom']-$_USER['cto'];
If ($k < 25) {}
else {
$credit = '<a href="/enter.php'.$_zapros.'mode=bank"><font color="#0066FF"><b> K: ['.$k.'] </b></font></a>•';
}
// Час пик
$ch=mysql_fetch_array(mysql_query("SELECT * FROM `nastroyki` where `id`='1';"));
If ($ch['oplata']==1){
if(date('Hi')>=0 && date('Hi')<=59){$chas = '<font color="#66FFFF"><b>[ ЧАС ПИК ] </b></font>•';}
}
$time = '<font color="#FF9900"><b> ['.date ( ' H:i:s ' ).']</b></font></a> •';
echo''.$ssilk.' '.$autoserf.' '.$credit.' '.$time.' '.$chas.'</div>';
If ($_USER['admin']){
$urlm = mysql_num_rows(mysql_query("select * from `".prefix."url` where `moder`='1' && `ban_prihin`='';"));
If ($urlm == 0) {}
else{$mod = '<b> | </b><a href="/amanag/t8EGARt1Ge.php?mode=admin&smode=moder"><font color ="red"><b>МОД('.$urlm.') </b></font></a>';}
$cin = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `in_money`>0"));
If ($cin == 0) {}
else{$vvod = '<b> | </b><a href="/birzha.php'.$_zapros.'&mode=adm&smode=in_m"><font color ="red"><b>В('.$cin.') </b></font></a>';}
$cout = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `out_money`>0"));
If ($cout == 0) {}
else{$vivod = '<b> | </b><a href="/birzha.php'.$_zapros.'&mode=adm&smode=out_m"><font color ="red"><b>ИЗ('.$cout.') </b></font></a>';}
$kolvo3 = mysql_query("select * from cclub_adm_chat;");
$kolvo4=mysql_num_rows($kolvo3);
echo'<div class="menuindex">
<a href="/amanag/t8EGARt1Ge.php'.$_zapros.'mode=admin">Aдмин-пaнeль</a>'.$mod.''.$vvod.' '.$vivod.'<br/>
<a href="/chat/mod_chat.php'.$_zapros.'">Админ чaт</a> ['.$kolvo4.']<br/>
</div>';
}
echo'</div>';
}
echo'</div>';
//
$num=@count($_GET); $num+=@count($_POST);
If ($num>maxnumrequest){
echo '<wml><card id="card0" title="<:title:>">
<p align="center"><u>HTTP ! (Too much parametres)</u></p>';
include "header/end.inc.php";
}
else{
If (isset($_GET))
foreach ($_GET as $value)
if (strlen($value)>maxlengthrequest){
echo '<wml><card id="card0" title="<:title:>">
<p align="center"><u>HTTP ! (Very much lenght of GET parametres)</u></p>';
include "header/end.inc.php";
}
If (isset($_POST))
foreach ($_POST as $value)
if (strlen($value)>maxlengthrequest){
echo '<wml><card id="card0" title="<:title:>">
<p align="center"><u>HTTP ! (Very much lenght of POST parametres)</u></p>';
include "header/end.inc.php";
}
//
If (isset($_GET))
foreach ($_GET as $key=>$value) $_GET[$key]=txt($_GET[$key]);
If (isset($_POST))
foreach ($_POST as $key=>$value) $_POST[$key]=txt($_POST[$key]);
}
?>