EscapeString($_SESSION['username']);
if(!$users->UserPermission('hk_chatlog', $username))
{
header("Location: nopermission.php");
die;
}
if(isset($_GET['start'])){
$start=$core->EscapeString($_GET['start']);
}
else $start=0;
if(!isset($_GET['uname'])){
$chatlogq = mysql_query("SELECT * FROM chatlogs ORDER BY id DESC LIMIT ".$start.",20");
}
else {
$chatlogq = mysql_query("SELECT * FROM chatlogs WHERE user_name='".$core->EscapeString($_GET['uname'])."' ORDER BY id DESC LIMIT ".$start.",20");
}
?>