Бд здесь?
http://profiwm.com/zc/file4704
Добавлено 13.11.13 в 09:51:33:
Код файла
<?php
$HeadTime=microtime(1);
error_reporting(0);
// Подключаем к базе
mysql_connect($host_db,$user_db,
$pass_db) or die(\'Сервер MySQL не
доступен!\');
mysql_select_db($name_db) or die
(\'База данных не доступна!\');
mysql_query(\'SET NAMES utf8\');
$act = isset($_GET[\'act\']) ? $_GET[\'act\'] :
\'\';
// Cookie
if (isset($_COOKIE[\'e_mail\']) and isset
($_COOKIE[\'pass\'])){
$us = mysql_query(\"SELECT * FROM `us`
WHERE `e_mail` =
\'\".mysql_real_escape_string($_COOKIE
[\'e_mail\']).\"\' AND `pass` =
\'\".mysql_real_escape_string($_COOKIE
[\'pass\']).\"\'\" ;
if(mysql_num_rows($us) == 1){
$us = mysql_fetch_assoc($us);
}else{
$us = array();
}
}else{
$us = array();
}
// Определение онлайна
if (isset($_SERVER
[\'HTTP_X_FORWARDED_FOR\']) and
preg_match(\'|^d{1,3}.d{1,3}.d{1,3}.d
{1,3}$|\',$_SERVER
[\'HTTP_X_FORWARDED_FOR\'])){
$ip = trim(htmlspecialchars
(mysql_real_escape_string($_SERVER
[\'HTTP_X_FORWARDED_FOR\'])));
}
elseif(isset($_SERVER
[\'HTTP_CLIENT_IP\']) and preg_match(\'|
^d{1,3}.d{1,3}.d{1,3}.d{1,3}$|\',$_SERVER
[\'HTTP_CLIENT_IP\'])){
$ip = trim(htmlspecialchars
(mysql_real_escape_string($_SERVER
[\'HTTP_CLIENT_IP\'])));
}
elseif(isset($_SERVER[\'REMOTE_ADDR\'])
and preg_match(\'|^d{1,3}.d{1,3}.d
{1,3}.d{1,3}$|\',$_SERVER
[\'REMOTE_ADDR\'])){
$ip = trim(htmlspecialchars
(mysql_real_escape_string($_SERVER
[\'REMOTE_ADDR\'])));
}else{
$ip = \'скрыт\';
}
if (isset($_SERVER
[\'HTTP_X_OPERAMINI_PHONE_UA\']))$ua=stripcslashes
(htmlspecialchars($_SERVER
[\'HTTP_X_OPERAMINI_PHONE_UA\']));
elseif (isset($_SERVER
[\'HTTP_USER_AGENT\']))$ua=stripcslashes
(htmlspecialchars($_SERVER
[\'HTTP_USER_AGENT\']));
else $ua = \'скрыт\';
$ua=strtok($ua, \'/\');
$ua=strtok($ua, \' \');
// Определяем бан
if (isset($us[\'pid\'])){
if ($us[\'ban\'] == 1){
header(\"Location: http:///
ban_site.php\" ;
exit;
}
}
?>