PHP if defined qwerty123 exit else agent _SERVER HTTP_USER_AGENT if _S

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?PHP
if (!defined('qwerty123')){exit;}else
{
$agent=$_SERVER['HTTP_USER_AGENT'];
if ($_SERVER['HTTP_X_FORWARDED_FOR']!=NULL)
{$ipin=$_SERVER['HTTP_X_FORWARDED_FOR'];}else{$ipin=$_SERVER['REMOTE_ADDR'];}
if(mysql_fetch_assoc(mysql_query('SELECT * FROM sess WHERE ip = "'.$ipin.'"'))!=NULL
&&
mysql_fetch_assoc(mysql_query('SELECT * FROM sess WHERE uagent = "'.$agent.'"'))!=NULL)
{
define('activeuser',FALSE);
$row2=mysql_fetch_assoc(mysql_query('SELECT * FROM sess WHERE ip = "'.$ipin.'"'));
$row=mysql_fetch_assoc(mysql_query('SELECT * FROM names WHERE id = "'.$row2['id'].'"'));
$id=$row['id'];
$firstname=$row['firstname'];
$lastname=$row['lastname'];
$nickname=$row['nickname'];
$age=$row['age'];
$sity=$row['sity'];
$mail=$row['mail'];
$icq=$row['icq'];
$site=$row['site'];
$tel=$row['tel'];
}
}
?>