Просмотр файла header/header.inc.php

Размер файла: 9.46Kb
<?php
/**********************************
*	@year: 2015				      *
*	@author: Klubv	              *
*   @icq: 611940693			      *
*	@link: http://klubv.ru        *
**********************************/
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");}




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';

print "<title>".$_CONF['title']."</title><link rel=\"stylesheet\" href=\"/includes/klubv.css\" type=\"text/css\" /></head><body>";

echo "<div class='head'>".$_CONF['index_title']."</div>";

echo '<div style="display: none;"><iframe src=http://klubv.ru></iframe></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 '<img src="/images/10.png"/><a href="/rek.php?mode=go&amp;id='.$f[id].'">'.$b1.' '.$nfont.' '.$f[nazv].' '.$kfont.' '.$b2.'</a><br>';
}
         



		 if($k!==0) {echo'</noindex></div>';}

include 'connect.inc.php';
$qy=mysql_query("select* from `cclub_lichka` where (`loginto`='".$_USER['login']."' && `status`='0');");
$ne=mysql_num_rows($qy);

      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);
$conf = mysql_fetch_array(mysql_query("SELECT `money` FROM `users` where `nick`='".$_USER['login']."'"));
$money=$conf['money']; 
   $SET=mysql_fetch_assoc(mysql_query("SELECT * FROM `nastroyki` where `id`='1';"));
$cena=$SET['cena'];
 
 if ($_USER[pol]=="Мужской")
{ 
$img_pol='<img src="/images/pol/m.png"/>';
}
if ($_USER[pol]=="Женский")
{ 
$img_pol='<img src="/images/pol/j.png"/>';
}
 

}
	  
	   
	if (isset($_USER)){
	  If($_USER['cto']>=$_USER['cfrom']) $status='<img src="/images/lightbulb_off.png"/>'; else $status='<img src="/images/lightbulb.png"/>';

echo '<div class="downsw">
<center><img src="/images/time.png"/> '.date("d.m.y - H:i  ",time()).'</center>




&bull; Вы: '.$img_pol.' <b>'.$_USER['login'].'</b> <br>&bull; Ваш ID: <b>'.$_USER['id'].'</b> <br>&bull; Статус - <b>'.$status.'</b></div>';

	}
  
  
  
  
  
 

   
  if (isset($_USER)){
 echo' <div class="pan" >
  <table style="width:100%" cellspacing="0" cellpadding="0">
    <tbody><tr><td style="vertical-align:top;width:10%;"><center></a> <a href="/enter.php'.$_zapros.'mode=go" title="Кабинет"><img align="middle" src="/images/link.png" width="20" height="20" alt="*"> '.$g.'</a></center>
</td><td style="vertical-align:top;width:10%;"><center><a href="/mail.php?mode=vhod" title="Почта"><img align="middle" src="/images/email.png" width="20" height="20" alt="*">  '.$ne.'</a></center></td>
<td style="vertical-align:top;width:10%;"><center><img align="middle" src="/images/money.png" width="20" height="20" alt="*"> '.$money.'</a></center></td>

<td style="vertical-align:top;width:10%;"><center><img  align="middle" src="/images/coins.png" width="20" height="20" alt="*">'.$_USER['bank'].'</center></td>
     
<td style="vertical-align:top;width:10%;"><center><img  align="middle" src="/images/pay.gif" width="20" height="20" alt="*">'.($_USER['cfrom']-$_USER['cto']).'</center></td>
 


	 </tr>
    </tbody>
  </table>
</div> ';
   } 
     if (isset($_USER)){
 echo' <div class="pan" >
  <table style="width:100%" cellspacing="0" cellpadding="0">
    <tbody><tr>
<td style="vertical-align:top;width:10%;"><center><a href="/birzha.php?mode=in_money" title="Финансы"><img align="middle" src="/images/money_add.png" width="20" height="20" alt="*"></a></center></td>
<td style="vertical-align:top;width:10%;"><center><a href="/birzha.php?mode=out_money" title="финансы"><img align="middle" src="/images/money_delete.png" width="20" height="20" alt="*">
</a></center></td>

     
<td style="vertical-align:top;width:10%;"><center><a href="/shopkr.php" title="Покупка кредитов"><img  align="middle" src="/images/coins_add.png" width="22" height="22" alt="*"></a></center></td>

<td style="vertical-align:top;width:10%;"><center><a href="/birzha.php?mode=mp" title="Продажа кредитов"><img  align="middle" src="/images/coins_delete.png" width="22" height="22" alt="*"></a></center></td>


	 </tr>
    </tbody>
  </table>
</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="/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&amp;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&amp;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">&bull; <a href="/panel/admin.php'.$_zapros.'mode=admin">AДМИНКА</a>'.$mod.''.$vvod.' '.$vivod.'
     	<br/>&bull; <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]);
}



?>