2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
2004-07-15 18:54:17 +00:00
|
|
|
require_once("../inc/cache.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
2003-03-21 04:38:55 +00:00
|
|
|
$id = $_GET["userid"];
|
2004-07-15 18:54:17 +00:00
|
|
|
$format = $_GET["format"];
|
|
|
|
$cache_args = "userid=$id";
|
|
|
|
if ($format) {
|
|
|
|
$cache_args .= "&format=xml";
|
|
|
|
}
|
2004-07-22 23:42:50 +00:00
|
|
|
start_cache(USER_PAGE_TTL, $cache_args);
|
2004-07-15 18:54:17 +00:00
|
|
|
|
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/user.inc");
|
2004-09-20 21:58:47 +00:00
|
|
|
require_once("../inc/forum.inc");
|
2004-07-15 18:54:17 +00:00
|
|
|
db_init();
|
2002-12-06 21:37:30 +00:00
|
|
|
|
|
|
|
$result = mysql_query("select * from user where id = $id");
|
|
|
|
$user = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
|
|
|
|
2004-09-20 21:58:47 +00:00
|
|
|
$user = getForumPreferences($user);
|
|
|
|
|
2004-07-15 18:54:17 +00:00
|
|
|
if ($format == "xml") {
|
|
|
|
require_once("../inc/xml.inc");
|
|
|
|
if ($user) {
|
|
|
|
show_user_xml($user);
|
|
|
|
} else {
|
|
|
|
xml_error("no such user ID");
|
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
} else {
|
2004-07-15 18:54:17 +00:00
|
|
|
if ($user) {
|
|
|
|
page_head("Account data for $user->name");
|
|
|
|
start_table();
|
|
|
|
show_user_summary_public($user);
|
|
|
|
end_table();
|
2004-11-18 20:01:12 +00:00
|
|
|
page_tail(true);
|
2004-07-15 18:54:17 +00:00
|
|
|
} else {
|
|
|
|
page_head("Can't find user");
|
|
|
|
echo "There is no account with that ID.\n<p>";
|
2004-11-18 20:01:12 +00:00
|
|
|
page_tail(true);
|
2004-07-15 18:54:17 +00:00
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
}
|
2004-07-23 04:04:21 +00:00
|
|
|
end_cache(USER_PAGE_TTL,$cache_args);
|
2002-08-07 18:56:55 +00:00
|
|
|
?>
|