Размер файла: 3.21Kb
<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS WebMod ********* #
#-----------------------------------------------------#
# Original Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
#-----------------------------------------------------#
# WebMod Made by : X-ray (Юрий) #
# E-mail : [email protected] #
# Site : http://city.zugdidi.us #
# WAP-Site : http://zugdidi.us #
#-----------------------------------------------------#
# Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
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/gzip.php";
require_once"template/header.php";
$log = check($log);
$par = check($par);
/////////////////////////////////////////////////////
$inform = file("local/profil/$log.prof");
if ($inform!=""){
$info = explode(":||:",$inform[0]);}
if (md5($par)==$info[1] && $log==$info[0] && $log!=="" && md5($par)!=="") {
if(!isset($action)){
if($cookietrue==1){
$apar=base64_encode($par);
$alog=base64_encode($info[0]);
SetCookie("cookpar", $apar, time()+3600*24*365);
SetCookie("cooklog", $alog, time()+3600*24*365);
}
SetCookie("cookname", $log, time()+3600*24*365);
$log=$info[0];
$currs=time();
$ip = preg_replace("/[^0-9.]/", "", $ip);
$pr_ip = explode(".",$ip);
$my_ip=$pr_ip[0].$pr_ip[1].$pr_ip[2];
$_SESSION['log']=$log;
$_SESSION['par']=$par;
$_SESSION['counton']=0;
$_SESSION['currs']=$currs;
$_SESSION['my_ip']=$my_ip;
$_SESSION['my_brow']=$brow;
//------------------------------ Запись в профиль ----------------------------//
$ufile = file(BASEDIR."local/profil/$log.prof");
$udata = explode(":||:",$ufile[0]);
$udata[11]++;
$udata[14]=$ip;
$udata[44]="$currDate/$currTime2";
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}
if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/$log.prof","a+");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
}
if($currs>$udata[53] && $udata[54]>0){
header ("Location: ".BASEDIR."games/kredit.php?".SID); exit;} //если просрочен кредит
header ("Location: index.php?".SID);
}
if($action=="exit"){
unset($_SESSION['log']);
unset($_SESSION['par']);
setcookie('cookpar', '');
setcookie('cooklog', '');
session_unset();
setcookie(session_name(), '');
session_destroy();
header ("Location: index.php?isset=exit");
}
}
else {
header ("Location: index.php?isset=inputoff"); exit;
}
?>