Файл: templates/run.php
Строк: 140
<?php
########################################
## WAP-ENGINE ##
########################################
## ##
## Автор : CHUMA (Токарев Владимир) ##
## e-mail : crazychuma@gmail.com ##
## WAP : http://wap-engine.ru ##
## ##
########################################
## ВЫ НЕ ИМЕЕТЕ ПРАВО ##
## ИЗМЕНЯТЬ КОД СКРИПТА ##
## ДЛЯ ДАЛЬНЕЙШЕГО РАСПРОСТРАНЕНИЯ! ##
########################################
#Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
session_name('SESID');
if(!preg_match("#^[-a-zA-Z0-9,]*$#", $_COOKIE['SESID']))
{
header ('Location: http://'.$_SERVER['HTTP_HOST'].'/modules/kabinet/exit.php?act=clear');
exit;
}
session_start();
header('expires: mon, 26 jul 1997 05:00:00 gmt');
header('cache-control: no-cache, must-revalidate');
header('pragma: no-cache');
header('last-modified: '.gmdate('d, d m y h:i:s').'gmt');
header('Content-type: text/html; charset=utf-8');
####################
if(strstr($_SERVER['SCRIPT_NAME'], 'modules'))
{
$dob_url = '../..';
}
else
{
$dob_url = '.';
}
####################
$nicks_file = file($dob_url.'/data/nicks.php');
$emails_file = file($dob_url.'/data/emails.php');
$nickadmina = trim($nicks_file[2]);
$emailadmina = trim($emails_file[2]);
$core = 'PHAgYWxpZ249ImNlbnRlciI+PGEgaHJlZj0iaHR0cDovL3dhcC1lbmdpbmUucnUiPsKpIFdBUC1FTkdJTkU8L2E+PGJyIC8+PC9wPg==';
####################
if(isset($_COOKIE['cologin']) && isset($_COOKIE['copass']))
{
$cook_login = $_COOKIE['cologin'];
if(!preg_match("#^[-a-zA-Z0-9]{3,20}$#", $cook_login))
{
header ('Location: '.$dob_url.'/modules/kabinet/exit.php?act=clear');
exit;
}
if(!isset($_SESSION['login']) && !isset($_SESSION['pass']))
{
$log_in_vhod = 1;
$count_nicks = count($nicks_file);
$count_nicks = $count_nicks - 2;
$user_in_est = 0;
for($i=2; $i <= $count_nicks; $i++)
{
if($cook_login == trim($nicks_file[$i]))
{
$user_in_est = 1;
break;
}
}
if($user_in_est == 0)
{
header ('Location: '.$dob_url.'/modules/kabinet/exit.php?act=clear');
exit;
}
else
{
$_SESSION['login'] = $_COOKIE['cologin'];
$_SESSION['pass'] = $_COOKIE['copass'];
}
}
}
if(isset($_SESSION['login']))
{
$ses_login = $_SESSION['login'];
if(!preg_match("#^[-a-zA-Z0-9]{3,20}$#", $ses_login))
{
header ('Location: '.$dob_url.'/modules/kabinet/exit.php?act=clear');
exit;
}
$user_data_file = $dob_url.'/data/users/'.$ses_login.'.php';
if(!file_exists($user_data_file))
{
header ('Location: '.$dob_url.'/modules/kabinet/exit.php?act=clear');
exit;
}
$user_f = file($user_data_file);
$login = trim($user_f[2]);
$email = trim($user_f[3]);
$passw = trim($user_f[4]);
$reg_date = trim($user_f[5]);
$last_visit = trim($user_f[6]);
$name = trim($user_f[7]);
$site = trim($user_f[8]);
$icq = trim($user_f[9]);
$pol = trim($user_f[10]);
$otkuda = trim($user_f[11]);
$modelphone = trim($user_f[12]);
$operator = trim($user_f[13]);
$show_mail = trim($user_f[14]);
$reputacia = trim($user_f[15]);
$status = trim($user_f[16]);
$data_rozhd = trim($user_f[17]);
$bantime = trim($user_f[18]);
$bantxt = trim($user_f[19]);
$banwho = trim($user_f[20]);
$mes_guest = trim($user_f[21]);
$mes_forum = trim($user_f[22]);
$mes_komm = trim($user_f[23]);
$new_ls = trim($user_f[24]);
$activ_account = trim($user_f[25]);
$izm_repu = trim($user_f[26]);
$plusov = trim($user_f[27]);
$minusov = trim($user_f[28]);
$o_sebe = trim($user_f[29]);
$rating = trim($user_f[30]);
$time_in_site = trim($user_f[31]);
$vhodov = trim($user_f[32]);
$all_temes = trim($user_f[33]);
$statey = trim($user_f[34]);
$mes_chat = trim($user_f[35]);
$status_name = trim($user_f[36]);
$nick_name = trim($user_f[37]);
if($log_in_vhod == 1)
{
$last_visit = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$str_to_user_file = "$loginrn$emailrn$passwrn$reg_datern$last_visitrn$namern$sitern$icqrn$polrn$otkudarn$modelphonern$operatorrn$show_mailrn$reputaciarn$statusrn$data_rozhdrn$bantimern$bantxtrn$banwhorn$mes_guestrn$mes_forumrn$mes_kommrn$new_lsrn$activ_accountrn$izm_repurn$plusovrn$minusovrn$o_sebern$ratingrn$time_in_sitern$vhodovrn$all_temesrn$stateyrn$mes_chatrn$status_namern$nick_name";
$user_file = fopen($user_data_file,'w');
flock ($user_file,LOCK_EX);
fputs($user_file,"<?phprn/*rn$str_to_user_filern*/rn?>");
fflush ($user_file);
flock ($user_file,LOCK_UN);
fclose($user_file);
}
}
if(isset($_SESSION['pass']) && isset($passw) && $_SESSION['pass'] == $passw)
{
$user_set_file = $dob_url.'/data/users/'.$login.'_settings.php';
if(file_exists($user_set_file))
{
$user_set_f = file($user_set_file);
$afor = trim($user_set_f[2]);
$themes = trim($user_set_f[3]);
$show_time = trim($user_set_f[4]);
$show_date = trim($user_set_f[5]);
if($mainlink == '1')
{
$mainlink = trim($user_set_f[6]);
}
else
{
$mainlink = 0;
$adm_set_link = 1;
}
$gzip = trim($user_set_f[7]);
$kolnews = trim($user_set_f[8]);
$kolfiles = trim($user_set_f[9]);
$kolbooks = trim($user_set_f[10]);
$guestmes = trim($user_set_f[11]);
$kolkommes = trim($user_set_f[12]);
$koltem = trim($user_set_f[13]);
$koltemmes = trim($user_set_f[14]);
$kolusers = trim($user_set_f[15]);
$kolmesbox = trim($user_set_f[16]);
}
}
####################
if ($gzip=='1')
{
@ob_start('ob_gzhandler');
}
else
{
@ob_start();
}
####################
if(!file_exists($dob_url.'/themes/'.$themes.'.php') && !empty($themes))
{
$themes = 'default';
}
####################
?>