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

Размер файла: 3.89Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]             #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#	
require_once"template/start.php";
require_once"template/regglobals.php";
require_once"template/config.php";
require_once"template/functions.php";
require_once"template/maincore.php";
require_once"template/antidos.php";
require_once"template/cookies.php";
require_once"template/gzip.php";
require_once"template/header.php";
require_once"template/referer.php";
include_once"themes/$config_themes/index.php";


$text = file("local/profil/$config_nikname.prof"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);}

if(permissions("local/profil/$config_nikname.prof")>=660){	
if(!empty($provlog) && !empty($provpar)){
//------------------------------- проверка ------------------------------------//
if(!isset($act)){

echo'<div class=b><img src="images/img/forums.gif" alt=""> '.$LANGUAGE['up100'].$motor_version.'</div><br>';
echo $LANGUAGE['up101'].'<br>';

echo $LANGUAGE['up102'].'<br>';

echo $LANGUAGE['up103'].' <b>"'.$provlog.'"</b><br>';
echo $LANGUAGE['up104'].'<br><br>';

if($config_themes!=="wml"){
echo'<form method="post" action="UPGRADE.php?act=upgrade&amp;'.SID.'">';
echo $LANGUAGE['up105'].'<br>';
echo'<input name="password" type="password" maxlength="20" /><br>';
echo'<input value="'.$LANGUAGE['up106'].'" type="submit" /></form>';

}else{

echo $LANGUAGE['up105'].'<br>';
echo'<input name="password" type="password"/><br>';
echo'<anchor>'.$LANGUAGE['up106'];
echo'<go href="UPGRADE.php?act=upgrade&amp;'.SID.'" method="post">';
echo'<postfield name="password" value="$(password)"/>';
echo'</go></anchor><br>';
}
}


//------------------------------- апгрейд ------------------------------------//
if($act=="upgrade"){
echo'<b>'.$LANGUAGE['up107'].'</b><br><br>';


if(md5($password)==$provpar){
 
//------------------------------ Запись в профиль ----------------------------//
$ufile = file(BASEDIR."local/profil/$config_nikname.prof"); 
$udata = explode(":||:",$ufile[0]);
$count_udata=count($udata)-1;

$udata[7]=101;
$udata[10]++;
$udata[14]=$ip;

for ($u=0; $u<$count_udata; $u++){
$utext.=$udata[$u].':||:';}

if(!empty($udata[0]) && !empty($udata[1])){
$fp=fopen("local/profil/$config_nikname.prof","a+");  
flock($fp,LOCK_EX);         
ftruncate($fp,0);                                              
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
chmod($fp, 0666); 
chmod("local/profil/$config_nikname.prof", 0666); 
}

/////////////////////////////////////////////////////////
$mess= $LANGUAGE['up108'];

$mess=base64_encode($mess);
$pozdr='Vantuz|'.$mess.'|'.$currDate.'||';

$fp=fopen("local/privat/$config_nikname.$config_priv","a+");  
flock($fp,LOCK_EX);                                                     
fputs($fp,"$pozdr\r\n");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
chmod ($fp, 0666);
chmod ("local/privat/$config_nikname.$config_priv", 0666);


echo $LANGUAGE['up109'].'<br><br>';

echo'<img src="images/img/reload.gif" alt=""> <b><a href="input.php?log='.$config_nikname.'&amp;par='.$password.'&amp;'.SID.'">'.$LANGUAGE['up110'].'</a></b><br><br>';


} else {echo $LANGUAGE['up111'].'<br>';}
echo'<a href="UPGRADE.php?'.SID.'">'.$LANGUAGE['up112'].'</a><br>';
} 

}else{echo $LANGUAGE['up113'].' <a href="INSTALL.php?'.SID.'">INSTALL.php</a><br>';}

}else{echo $LANGUAGE['up114'].' local/profil/'.$config_nikname.'.prof<br>';}

include_once"themes/$config_themes/foot.php";
 ?>