<?
/**********************************************************************************
* *
* read_profile.php *
* ------------------ *
* *
* Program : EverQuest Roster/Gallery v1.7b1 *
* Copyright : (C) 2001 - 2002 BladeTek Internet Services & *
* The EQRG Developement Team *
* Website : http://eqcode.roleplayersinteraction.com *
* Support Website : http://www.sourceforge.net/projects/eqrostergallery *
* Email : hide@address.com *
* *
* For license information, please read the documents directory which *
* came with this edition *
* *
**********************************************************************************/
function read_user($id, &$chars, &$userpro) {
if (!$id) {
$err = ERR_ID_BLANK;
} elseif (eregi("[^[:digit:]]", $id)) {
$err = ERR_ID_INVALID;
} else {
$query = "select *";
$query .= " from users";
$query .= " where id = $id";
query_db($query, $userpro);
if (!$userpro["id"]) {
$err = ERR_ID_NOT_EXIST;
} else {
$query = "select id, name, surname";
$query .= " from chars";
$query .= " where owner = $id";
$chars["count"] = query_db($query, $chars, true);
}
}
return $err;
}
function user_check($id, &$check_user) {
global $SESSION;
$query = "select id, login";
$query .= " from users";
$query .= " where id = $id";
query_db($query, $check_user);
}
?>