cvs: pearweb /include pear-manual.php
| From: | Martin Jansen | Date: | Sat, 19 Jan 2002 16:57:02 +0000 |
| Subject: | cvs: pearweb /include pear-manual.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-2007@lists.php.net to get a copy of this message | ||
mj Sat Jan 19 11:57:02 2002 EDT
Modified files:
/pearweb/include pear-manual.php
Log:
* Add link to the package info site for all package documentations.
Index: pearweb/include/pear-manual.php
diff -u pearweb/include/pear-manual.php:1.1 pearweb/include/pear-manual.php:1.2
--- pearweb/include/pear-manual.php:1.1 Sun Oct 14 11:15:50 2001
+++ pearweb/include/pear-manual.php Sat Jan 19 11:57:02 2002
@@ -263,8 +263,42 @@
}
function manualHeader($title,$id="") {
- global $HTDIG, $LANGUAGES, $LANG, $SIDEBAR_DATA;
+ global $HTDIG, $LANGUAGES, $LANG, $SIDEBAR_DATA, $dbh;
+
makeBorderTOC($title);
+
+ /**
+ * Show link to the package info file?
+ */
+ if (strstr(basename($_SERVER['PHP_SELF']), "packages.")
+ && substr_count($_SERVER['PHP_SELF'], ".") > 2) {
+
+ $package = substr(basename($_SERVER['PHP_SELF']), 0,
(strlen(basename($_SERVER['PHP_SELF'])) - 4));
+ $package = preg_replace("/(.*)\./", "", $package);
+
+ $query = "SELECT id FROM packages WHERE LCASE(name) = LCASE('" . $package .
"')";
+ $sth = $dbh->query($query);
+ $row = $sth->fetchRow();
+
+ if (is_array($row)) {
+ ob_start();
+
+ echo "<div align=\"center\"><br /><br />\n";
+
+ $bb = new Borderbox("Information");
+
+ echo "<div align=\"left\">\n";
+ print_link("/pkginfo.php?pacid=" . $row[0], make_image("box-0.gif")
. " Package info");
+ echo "</div>\n";
+ $bb->end();
+
+ echo "</div>\n";
+
+ $SIDEBAR_DATA .= ob_get_contents();
+ ob_end_clean();
+ }
+ }
+
commonHeader('Manual: '.$title);
# create links to plain html and other languages
if (!$HTDIG) {