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
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
$id = get_int("userid");
|
|
|
|
$format = get_str("format", true);
|
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
|
|
|
|
2005-02-15 22:29:32 +00:00
|
|
|
$user = lookup_user_id($id);
|
|
|
|
if (!$user) {
|
|
|
|
error_page("no such user");
|
|
|
|
}
|
|
|
|
|
|
|
|
$cache_args = "userid=$id";
|
|
|
|
if ($format=="xml") {
|
|
|
|
$cache_args .= "&format=xml";
|
|
|
|
}
|
|
|
|
start_cache(USER_PAGE_TTL, $cache_args);
|
2002-12-06 21:37:30 +00:00
|
|
|
|
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);
|
2005-04-08 00:06:52 +00:00
|
|
|
show_profile_link($user);
|
2004-07-15 18:54:17 +00:00
|
|
|
end_table();
|
2005-03-09 01:02:36 +00:00
|
|
|
project_user_summary($user);
|
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
|
|
|
?>
|