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

Размер файла: 6.13Kb
<?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("[^a-z0-9-]",$npar)){ header ("Location: profil.php?incorrect");  exit;}

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 (!empty($npar)){
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());

$npar = htmlspecialchars(stripslashes(trim($npar)));
$otkel = htmlspecialchars(stripslashes(trim($otkel)));
$infa = htmlspecialchars(stripslashes(trim($infa)));
$meil = htmlspecialchars(stripslashes(trim($meil)));
$site = htmlspecialchars(stripslashes(trim($site)));
$avators=htmlspecialchars(stripslashes(trim($avators)));
$mobilus=htmlspecialchars(stripslashes(trim($mobilus)));
$ipsus=htmlspecialchars(stripslashes(trim($ipsus)));
$pol=htmlspecialchars(stripslashes(trim($pol)));
$rost=htmlspecialchars(stripslashes(trim($rost)));
$ves=htmlspecialchars(stripslashes(trim($ves)));
$happy=htmlspecialchars(stripslashes(trim($happy)));
$icq=htmlspecialchars(stripslashes(trim($icq)));
  

$infa = str_replace("|","",$infa);
$infa = str_replace("||","",$infa);
$infa=str_replace("&","&amp;",$infa);
$infa = str_replace("'", "&#39;",$infa);
$infa=str_replace("<","&#60;",$infa);
$infa=str_replace(">","&#62;",$infa);
$infa=str_replace("\"","&#34;",$infa);
$infa=str_replace("$","&#036;",$infa);
$infa = str_replace("\\", "&#092;", $infa);
$infa = str_replace("!", "&#33;", $infa);
$infa = str_replace("[", "&#91;", $infa);
$infa = str_replace("]", "&#93;", $infa);
$infa = str_replace("@", "&#064;", $infa);
            
$otkel = str_replace("|","",$otkel);
$otkel = str_replace("||","",$otkel);
$otkel=str_replace("&","&amp;",$otkel);
$otkel = str_replace("'", "&#39;",$otkel);
$otkel=str_replace("<","&#60;",$otkel);
$otkel=str_replace(">","&#62;",$otkel);
$otkel=str_replace("\"","&#34;",$otkel);
$otkel=str_replace("$","&#036;",$otkel);
$otkel = str_replace("\\", "&#092;", $otkel);
$otkel = str_replace("!", "&#33;", $otkel);
$otkel = str_replace("[", "&#91;", $otkel);
$otkel = str_replace("]", "&#93;", $otkel);
$otkel = str_replace("@", "&#064;", $otkel); 
 
$meil = str_replace("|","",$meil);
$meil = str_replace("||","",$meil);
$site = str_replace("|","",$site);
$site = str_replace("||","",$site);
$avators = str_replace("|","",$avators);
$avators = str_replace("||","",$avators);
$ipsus = str_replace("|","",$ipsus);
$ipsus = str_replace("||","",$ipsus);
$mobila = str_replace("|","",$mobila);
$mobila = str_replace("||","",$mobila);
$rost = str_replace("|","",$rost);
$rost = str_replace("||","",$rost);
$ves = str_replace("|","",$ves);
$ves = str_replace("||","",$ves);
$happy = str_replace("|","",$happy);
$happy = str_replace("||","",$happy);
$icq = str_replace("|","",$icq);
$icq= str_replace("||","",$icq);
$npars=md5($npar);

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

$text=$log.':||:'.$npars.':||:'.$otkel.':||:'.$infa.':||:'.$meil.':||:'.$site.':||:'.$udata[6].':||:'.$avators.':||:'.$udata[8].':||:'.$udata[9].':||:'.$udata[10].':||:'.$udata[11].':||:'.$udata[12].':||:'.$mobila.':||:'.$ipsus.':||:'.$pol.':||:'.$rost.':||:'.$ves.':||:'.$happy.':||:'.$icq.':||:'.$udata[20].':||:'.$udata[21].':||:'.$udata[22].':||:'.$udata[23].':||:'.$udata[24].':||:'.$udata[25].':||:'.$udata[26].':||:'.$udata[27].':||:'.$udata[28].':||:'.$udata[29].':||:'.$udata[30].':||:'.$udata[31].':||:'.$udata[32].':||:'.$udata[33].':||:';

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

if ($provpar==md5($_SESSION[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);  
print"Данные успешно изменены!<br> Ваш ник: $log <br>Ваш пароль: $npar<br>";}

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