Размер файла: 7.24Kb
<?php
########################################
## WAP-ENGINE ##
########################################
## ##
## Автор : CHUMA (Токарев Владимир) ##
## e-mail : [email protected] ##
## 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']) && !empty($_COOKIE['SESID']))
{
header ('Location: http://'.$_SERVER['HTTP_HOST'].'/modules/kabinet/exit.php?act=clear');
exit;
}
session_start();
session_regenerate_id(true);
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 = '.';
}
####################
$h_ua = str_replace('windows ce', '', strtolower($_SERVER['HTTP_USER_AGENT']));
if (
!$h_ua ||
strpos($h_ua, 'windows') !== false ||
strpos($h_ua, 'linux') !== false ||
strpos($h_ua, 'bsd') !== false ||
strpos($h_ua, 'x11') !== false ||
strpos($h_ua, 'unix') !== false ||
strpos($h_ua, 'macintosh') !== false ||
strpos($h_ua, 'macos') !== false)
{
$themes = 'web_grey_blue';
}
else
{
$themes = $themes;
}
####################
$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+PGEgaHJlZj0iaHR0cDovL3dhcC1lbmdpbmUucnUiPsKpIFdBUC1F
TkdJTkU8L2E+IGFuZCA8YSBocmVmPSJodHRwOi8vZHllay5ydSI+RFlFSzwvYT48YnIgLz48L3A+';
####################
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['seslogin']) && !isset($_SESSION['sespass']))
{
$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['seslogin'] = $_COOKIE['cologin'];
$_SESSION['sespass'] = $_COOKIE['copass'];
}
}
}
if(isset($_SESSION['seslogin']))
{
$ses_login = $_SESSION['seslogin'];
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]);
$nickname = trim($user_f[34]);
$mes_chat = trim($user_f[35]);
$status_name = trim($user_f[36]);
$nick_name = trim($user_f[37]);
$podpis = trim($user_f[38]);
$strana = trim($user_f[39]);
$numbertel = trim($user_f[40]);
$time_site = trim($user_f[41]);
$interesy = trim($user_f[42]);
$lybmusic = trim($user_f[43]);
$lybfilm = trim($user_f[44]);
$lybbook = trim($user_f[45]);
$browser_soft = trim($user_f[46]);
$ip_ip = trim($user_f[47]);
$show_numbertel = trim($user_f[48]);
$monet = trim($user_f[49]);
if(isset($_SESSION['moves']))
{
$_SESSION['moves']++;
$time_site = $_SESSION['show_time'] = time() - $_SESSION['start_time'];
}
else
{
$time_in_site = $time_in_site + $time_site;
$_SESSION['start_time'] = time();
$_SESSION['show_time'] = $_SESSION['moves'] = 0;
}
if($log_in_vhod == 1)
{
$last_visit = date('d.m.Y / H:i:s', time() + ($sdvigclock*3600));
$vhodov = $vhodov + 1;
$str_to_user_file = "$login\r\n$email\r\n$passw\r\n$reg_date\r\n$last_visit\r\n$name\r\n$site\r\n$icq\r\n$pol\r\n$otkuda\r\n$modelphone\r\n$operator\r\n$show_mail\r\n$reputacia\r\n$status\r\n$data_rozhd\r\n$bantime\r\n$bantxt\r\n$banwho\r\n$mes_guest\r\n$mes_forum\r\n$mes_komm\r\n$new_ls\r\n$activ_account\r\n$izm_repu\r\n$plusov\r\n$minusov\r\n$o_sebe\r\n$rating\r\n$time_in_site\r\n$vhodov\r\n$all_temes\r\n$nickname\r\n$mes_chat\r\n$status_name\r\n$nick_name\r\n$podpis\r\n$strana\r\n$numbertel\r\n$online\r\n$interesy\r\n$lybmusic\r\n$lybfilm\r\n$lybbook\r\n$browser_soft\r\n$ip_ip\r\n$show_numbertel\r\n$monet";
$user_file = fopen($user_data_file,'w');
flock ($user_file,LOCK_EX);
fputs($user_file,"<?php\r\n/*\r\n$str_to_user_file\r\n*/\r\n?>");
fflush ($user_file);
flock ($user_file,LOCK_UN);
fclose($user_file);
}
}
if(isset($_SESSION['sespass']) && isset($passw) && $_SESSION['sespass'] == $passw)
{
$user_set_file = $dob_url.'/data/users/'.$login.'_settings.php';
if(file_exists($user_set_file))
{
$user_set_f = file($user_set_file);
$trans = 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]);
$nevidim_admins = trim($user_set_f[17]);
$autoupdate_gl = trim($user_set_f[18]);
$autoupdate_ch = trim($user_set_f[19]);
$icon_text = trim($user_set_f[20]);
}
}
####################
if ($gzip=='1')
{
@ob_start('ob_gzhandler');
}
else
{
@ob_start();
}
####################
if(!file_exists($dob_url.'/themes/'.$themes.'.php') && !empty($themes))
{
$themes = 'default';
}
####################
?>