website/plan.php
2007-03-24 07:42:32 +00:00

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 &quot;$user&quot;.</P>");
newsBoxClose ();
}
} else {
if (is_array ($plans = latestPlans (null, 5))) {
newsBoxOpen ("Latest Plans for All Users");
foreach ($plans as $plan) {
printPlanArray ($plan);
}
newsBoxClose ();
}
}
?>