28 lines
705 B
PHP
28 lines
705 B
PHP
|
<?php
|
||
|
if(!defined('GAME'))
|
||
|
{
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
if( function_exists('date_default_timezone_set') ) {
|
||
|
date_default_timezone_set('Europe/Moscow');
|
||
|
}
|
||
|
|
||
|
$dbgo = mysql_pconnect('localhost','newcom1_abk','4nWYsIM[c?}P');
|
||
|
mysql_select_db('newcom1_abk',$dbgo);
|
||
|
mysql_query('SET NAMES cp1251');
|
||
|
|
||
|
if(!function_exists('GetRealIp')) {
|
||
|
function GetRealIpTest(){
|
||
|
if (!empty($_SERVER['HTTP_CLIENT_IP']))
|
||
|
return $_SERVER['HTTP_CLIENT_IP'];
|
||
|
else if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||
|
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||
|
return $_SERVER['REMOTE_ADDR'];
|
||
|
}
|
||
|
$ipban = GetRealIpTest();
|
||
|
}else{
|
||
|
$ipban = GetRealIp();
|
||
|
}
|
||
|
|
||
|
$pdo = new PDO('mysql:host=localhost;dbname=newcom1_abk', 'newcom1_abk', '4nWYsIM[c?}P');
|