cvs: pearweb /include pear-format-html.php
| From: | Stig Bakken | Date: | Sat, 01 Sep 2001 23:06:41 +0000 |
| Subject: | cvs: pearweb /include pear-format-html.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-739@lists.php.net to get a copy of this message | ||
ssb Sat Sep 1 19:06:41 2001 EDT
Modified files:
/pearweb/include pear-format-html.php
Log:
* simple left navigation sidebar
Index: pearweb/include/pear-format-html.php
diff -u pearweb/include/pear-format-html.php:1.7 pearweb/include/pear-format-html.php:1.8
--- pearweb/include/pear-format-html.php:1.7 Tue Aug 7 17:18:37 2001
+++ pearweb/include/pear-format-html.php Sat Sep 1 19:06:41 2001
@@ -2,6 +2,16 @@
require_once 'layout.php';
+$GLOBALS['main_menu'] = array(
+ "index.php" => "Home",
+ "http://php.net/manual/en/pear.php" =>
"Documentation",
+ "account-request.php" => "Request Account",
+ "package-new.php" => "New Package",
+ "admin.php" => "Administrators",
+ "packages.php" => "Browse Packages",
+ "release-upload.php" => "Upload Release",
+);
+
$GLOBALS['_style'] = '';
function smarty_func_page_start($params)
@@ -23,12 +33,29 @@
function response_header($title = 'The PHP Extension and Application Repository', $style
= false)
{
- global $_style, $_header_done;
+ global $_style, $_header_done, $SIDEBAR_DATA;
if ($_header_done) {
return;
}
$_header_done = true;
$_style = $style;
+ $rts = rtrim($SIDEBAR_DATA);
+ if (substr($rts, -1) == '-') {
+ $SIDEBAR_DATA = substr($rts, 0, -1);
+ } else {
+ global $main_menu, $PHP_SELF;
+ $SIDEBAR_DATA .= "<br /><br />\n";
+ $me = basename($PHP_SELF);
+ foreach ($main_menu as $url => $title) {
+ $tt = str_replace(" ", " ", $title);
+ if ($url == $me) {
+ $SIDEBAR_DATA .= "<b>>>$tt<<</b><br
/>\n";
+ } else {
+ $SIDEBAR_DATA .= " <a
href=\"$url\">$tt</a><br />\n";
+ }
+ }
+ $SIDEBAR_DATA .= "<br /><br />\n";
+ }
commonHeader($title);
}
@@ -130,6 +157,9 @@
function border_box_start($title, $width = "90%", $indent = "")
{
+ if (is_array($title)) {
+ $title = implode("</th><th>", $title);
+ }
print "$indent<table cellpadding=\"0\" cellspacing=\"1\"
border=\"0\" width=\"$width\">\n";
print "$indent <tr>\n";
print "$indent <td bgcolor=\"#000000\">\n";