Просмотр файла insetting.php

Размер файла: 5.31Kb
<?php
///////////////////////////////////////////////////////////////////////////////////////////
/////
/////                        ********* WAP-MOTORS *********
/////
/////                            Made by   :  VANTUZ
/////                              E-mail  :  [email protected]
/////                                Site  :  http://pizdec.ru
/////                            WAP-Site  :  http://visavi.net 
/////                                 ICQ  :  36-44-66
/////
//////////////////////////////////////////////////////////////////////////////////////////////
//      ВЫ НЕ ИМЕЕТЕ ПРАВО ВНОСИТ ИЗМЕНЕНИЯ В КОД СКРИПТА ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ   //
//////////////////////////////////////////////////////////////////////////////////////////////
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
function myErrorHandler ($errno, $errstr, $errfile, $errline) {}
set_error_handler("myErrorHandler"); 
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
//////////////////////////////////////////////////////////////////////////////////////
ini_set('arg_separator.output','&amp;');
session_name("SID");
 session_start();
//////////////////////////////
require"config.php";
require_once"template/regglobals.php";
require_once"template/antiban.php";
if(eregi("[^0-9]",$bookpostus) || $bookpostus>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$news)|| $news>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$forumpost)|| $forumpost>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$forumtem)|| $forumtem>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$userlist)||$userlist>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$chatpost)|| $chatpost>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$rewnew)|| $rewnew>300){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$board)|| $board>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9]",$prrivs)|| $prrivs>50){ header ("Location: setting.php?incorrect");  exit;}
if(eregi("[^0-9+-]",$sdvig)){ header ("Location: setting.php?incorrect");  exit;}

// На всякий пожарный и нехуй пиздеть что это лишнее и отнимает время
$skins=htmlspecialchars(stripslashes(trim($skins)));
$news=htmlspecialchars(stripslashes(trim($news)));
$forumpost=htmlspecialchars(stripslashes(trim($forumpost)));
$forumtem=htmlspecialchars(stripslashes(trim($forumtem)));
$userlist=htmlspecialchars(stripslashes(trim($userlist)));
$chatpost=htmlspecialchars(stripslashes(trim($chatpost)));
$rewnew=htmlspecialchars(stripslashes(trim($rewnew)));
$board=htmlspecialchars(stripslashes(trim($board)));
$daytime=htmlspecialchars(stripslashes(trim($daytime)));
$sdvig=htmlspecialchars(stripslashes(trim($sdvig)));
$times=htmlspecialchars(stripslashes(trim($times)));
$prrivs=htmlspecialchars(stripslashes(trim($prrivs)));

function avto($s) {
$s = str_replace("<title>","<meta http-equiv=\"refresh\" content=\"1;URL=index.php?".SID."\"><title>",$s);
return $s; }
ob_start("avto");

if(@file ("themes/$themes.php"))
{include_once"themes/$themes.php";}else{$themes="default"; include_once"themes/$themes.php";}

if ($_SERVER['HTTP_X_FORWARDED_FOR'])
{ $ipsus=htmlspecialchars(stripslashes($_SERVER['HTTP_X_FORWARDED_FOR'])); }
else { $ipsus=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR'])); }
$text = @file("local/profil/$log.prof"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);}
////////////////////////////////
$currHour=date("H",time());
$currDate=date("d F, Y", time());
$currTime=date("$currHour:i:s", time());

if (!$log=="" && !md5($par)=="" && md5($par)==$provpar && $log==$provlog ){
$fal = @file("local/profil/$log.prof"); 
$udata = explode(":||:",$fal[0]);

$text=$udata[0].':||:'.$udata[1].':||:'.$udata[2].':||:'.$udata[3].':||:'.$udata[4].':||:'.$udata[5].':||:'.$udata[6].':||:'.$udata[7].':||:'.$udata[8].':||:'.$udata[9].':||:'.$udata[10].':||:'.$udata[11].':||:'.$udata[12].':||:'.$udata[13].':||:'.$ipsus.':||:'.$udata[15].':||:'.$udata[16].':||:'.$udata[17].':||:'.$udata[18].':||:'.$udata[19].':||:'.$skins.':||:'.$bookpostus.':||:'.$news.':||:'.$forumpost.':||:'.$forumtem.':||:'.$userlist.':||:'.$chatpost.':||:'.$rewnew.':||:'.$board.':||:'.$daytime.':||:'.$sdvig.':||:'.$times.':||:'.$prrivs.':||:'.$udata[33].':||:';

$of = @file("local/profil/$log.prof"); 
$udata = explode(":||:",$of[0]);
$provpar= $udata[1];
$provpar= trim($provpar);

if ($provpar==md5($par)) { 
$fp=fopen("local/profil/$log.prof","a+");
flock($fp,LOCK_EX);           
ftruncate($fp,0);                                                                 
fputs($fp,"$text");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
//chmod ("local/profil/$log.prof", 0777); 
print"Настройки успешно изменены!<br><br>";}}

else {print"Неверный пароль!<br>";}
echo"<a href=\"index.php\"><font color=\"#FF0033\">На главную</font></a>";
require_once"template/foot.php";                    
?>