2022-04-27 16:59:31 +00:00
|
|
|
<?php // Preamble
|
2007-03-24 07:42:32 +00:00
|
|
|
$pageName = "Developer Plans";
|
|
|
|
$currPage = "plans"; // Name of the page, for the menu
|
|
|
|
$modules = "plan_search";
|
|
|
|
require "parts/preamble.php"; // Load most of document
|
|
|
|
|
2022-04-27 16:59:31 +00:00
|
|
|
$user='';
|
|
|
|
if (isset($_SERVER['PATH_INFO']))
|
|
|
|
$user = $_SERVER['PATH_INFO'];
|
2007-03-24 07:42:32 +00:00
|
|
|
|
|
|
|
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 ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|