Файл: mklik.tk/header/header.inc.php
Строк: 178
<?php
error_reporting(0);
$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']="left";
$_CONF['index_page']="index.php";
$themes=$_COOKIE['winter'];
if (@file ("/includes/lite.css"))
{$themes=$themes;}
else {
if (!empty($setall['par1']))
{
$themes=$setall['par1'];
}
else
{
$themes='green';
}
}
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'])?'lite':$_COOKIE['MyStyle']):$_POST['MyStyle']):$_GET['MyStyle'])));
if(!file_exists($_SERVER['DOCUMENT_ROOT'].'/includes/'.$_MyStyle.'.css'))
$_MyStyle='lite';
setcookie('MyStyle',$_MyStyle,time()+60*60*24*30*12);
$_SESSION['MyStyle']=$_MyStyle;
}
else
$_MyStyle=isset($_SESSION['MyStyle'])?$_SESSION['MyStyle']:'lite';
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 "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>';
include 'connect.inc.php';
{ $style=$_USER['style'];
if($style == NULL) {$style = '3onclub';}
else{$style = $_USER['style'];}
print "<title>".$_CONF['title']."</title><link rel="stylesheet" href="/includes/".$style.".css" type="text/css" /></head><body>";
}
echo "<div class='head'>".$_CONF['index_title']."</div>";
$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="enterrega"><noindex>';}
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="/rek.php?mode=go&id='.$f[id].'">'.$b1.' '.$nfont.' '.$f[nazv].' '.$kfont.' '.$b2.'</a><br>';
}
if($k!==0) {echo'</noindex></div>';}
include 'connect.inc.php';
////////////Закладки вывод///////////
$result = mysql_query("SELECT * FROM `zakladki` where `gde`='1' && `mesto`='1' && `login` = '".$_USER['login']."' order by `id`");
$k=mysql_num_rows($result); if($k!==0) {echo'<div class="enterrega"><noindex>';}
for ($c=0; $c<mysql_num_rows($result); $c++) { $f = mysql_fetch_array($result);
echo ' <a href="http://'.$f['url'].'">'.$f['ankor'].'</a> |'; } if($k!==0) {echo'</noindex></div>';}
////////////Конец Закладки вывод///////////
$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="enterrega"><div class="enter"><img src="/images/privat.gif"></a><a href=/mail.php?mode=vhod><font color="#cc0000"><b> SMSka('.$ne.')!</b></font></a></div></div>';
}
if (isset($_USER)){
{
$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 = '<div class="menuindex"><a href="/enter.php'.$_zapros.'mode=go"><b>C: ['.$g.']</b></a></div>';}
}
echo''.$ssilk.'';
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="/panel/admin.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="/panel/admin.php'.$_zapros.'mode=admin">Aдмин-пaнeль</a>'.$mod.''.$vvod.' '.$vivod.'
<br/><a href="/adm_chat.php'.$_zapros.'">Админ чaт</a> ['.$kolvo4.']</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]);
}
?>