mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-10 15:22:13 +00:00
29d34a6894
seems to work now.
37 lines
1,018 B
PHP
37 lines
1,018 B
PHP
<? // Preamble
|
|
$pageName = "Developer Plans";
|
|
$currPage = "plans"; // Name of the page, for the menu
|
|
$modules = "plan_search";
|
|
require "parts/preamble.php"; // Load most of document
|
|
|
|
$user = $_SERVER['PATH_INFO'];
|
|
|
|
need ('plan');
|
|
|
|
if (strlen ($user) > 1) {
|
|
$user = substr ($user, 1); // strip off the starting slash
|
|
if (($pos = strpos ($user, '/')) !== false) { // and all others
|
|
$user = substr ($user, 0, $pos);
|
|
}
|
|
|
|
if (is_array ($plans = latestPlans ($user, 5))) {
|
|
newsBoxOpen ("Latest Plans for " . $plans[0]['p_user']);
|
|
foreach ($plans as $plan) {
|
|
printPlanArray ($plan);
|
|
}
|
|
newsBoxClose ();
|
|
} else {
|
|
newsBoxOpen ("Latest Plans for " . $user);
|
|
printPlan ("Now", "Web Server", "Sorry", "<P>I don't know any user named "$user".</P>");
|
|
newsBoxClose ();
|
|
}
|
|
} else {
|
|
if (is_array ($plans = latestPlans (null, 5))) {
|
|
newsBoxOpen ("Latest Plans for All Users");
|
|
foreach ($plans as $plan) {
|
|
printPlanArray ($plan);
|
|
}
|
|
newsBoxClose ();
|
|
}
|
|
}
|
|
?>
|