Файл: user/link.php
Строк: 14
<?php
require_once '../incfiles/core.php';
require_once '../incfiles/func.php';
require_once '../incfiles/auth.php';
require_once '../incfiles/user.php';
if (!empty($_GET['u']))
{
$u = check($_GET['u']);
$result = mysql_query("SELECT * FROM `users` WHERE `mylink` = '".$u."' LIMIT 1");
$result_groups = mysql_query("SELECT * FROM `groups` WHERE `mylink` = '".$u."' LIMIT 1");
if (mysql_num_rows($result) == true){
$arr_user = mysql_fetch_array($result);
go('/?id='.$arr_user['id'].'');
}elseif (mysql_num_rows($result_groups) == true){
$arr_groups = mysql_fetch_array($result_groups);
go('/groups/?id='.$arr_groups['id'].'');
}else{ go(URL);}
}
else go(URL);
?>