cvs: pearweb /public_html pkginfo.php
| From: | Thomas V.V.Cox | Date: | Wed, 22 Aug 2001 12:32:33 +0000 |
| Subject: | cvs: pearweb /public_html pkginfo.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-618@lists.php.net to get a copy of this message | ||
cox Wed Aug 22 08:32:33 2001 EDT
Modified files:
/pearweb/public_html pkginfo.php
Log:
new template for package detail (try it with pkginfo.php?idpack=33)
Index: pearweb/public_html/pkginfo.php
diff -u pearweb/public_html/pkginfo.php:1.2 pearweb/public_html/pkginfo.php:1.3
--- pearweb/public_html/pkginfo.php:1.2 Sun Jul 8 10:39:10 2001
+++ pearweb/public_html/pkginfo.php Wed Aug 22 08:32:33 2001
@@ -1,12 +1,19 @@
<?php
-
+//error_reporting(E_ALL);
response_header("Package :: $package");
+// expected url vars: idpack
+$idpack = (isset($idpack)) ? (int) $idpack : null;
+if (empty($idpack)) {
+ die ('No package selected');
+}
+// ** expected
+
$dbh = DB::Connect("mysql://pear:pear@localhost/pear");
if (DB::isError($dbh)) {
die("DB::Factory failed: ".DB::errorMessage($dbh)."<BR>\n");
}
-
+/*
$descriptions = array(
"name" => "Package Name",
"stablerelease" => "Latest Stable Release",
@@ -14,26 +21,94 @@
"copyright" => "License",
"summary" => "Package Description"
);
-
-$row = $dbh->getRow("SELECT * FROM packages WHERE name = '$package'",
+*/
+$row = $dbh->getRow("SELECT * FROM packages WHERE id = $idpack",
DB_FETCHMODE_ASSOC);
-print "<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=1>";
-print "<TR><TD BGCOLOR=\"#000000\">\n";
-print "<TABLE CELLSPACING=1 BORDER=0 CELLPADDING=3>\n";
-foreach ($row as $field => $value) {
- if (empty($descriptions[$field])) {
- continue;
- }
- if (empty($value)) {
- $value = " ";
- }
- print " <TR BGCOLOR=\"#ffffff\">\n";
- print " <TH ALIGN=\"left\">$descriptions[$field]</TH>\n";
- print " <TD>$value</TD>\n";
- print " </TR>\n";
+if (!$row) {
+ //die ('No package selected (db)'); // XXX Uncomment me!
}
-print "</TABLE></TD></TR></TABLE>\n";
-
-response_footer();
-
+$release = '1.3';
+$name = 'Net_Ping';
+$maturity = 'stable';
+$summary = 'This is the Pear Ping Class';
+$authors = '';
+// foreach ($maintainers as $key => $values) {
+$authors .= '<tr><td>$name <<a href="mailto:$mail">$mail</a>>
($role)</td></tr>';
+// }
+$release_date = '2000-01-34';
+$release_notes = 'Bug fix release';
+?>
+<center><h2><?php echo "$name $release
($maturity)";?></h2></center>
+<table border="1" cellspacing="3" cellpadding="3"
height="48" width="100%">
+<tr>
+ <th class="pack" bgcolor="#009933"
width="20%">Summary</th>
+ <td><?php echo $summary;?></td>
+</tr>
+<tr>
+ <th class="pack" bgcolor="#009933"
width="20%">Authors</th>
+ <td>
+ <!-- Authors -->
+ <table border="0" cellspacing="1" cellpadding="1"
width="100%">
+ <?php echo $authors;?>
+ </table>
+ </td>
+ <tr>
+ <th class="pack" bgcolor="#009933" width="20%">Release
Date</th>
+ <td><?php echo $release_date;?></td>
+ </tr>
+ <tr>
+ <th class="pack" bgcolor="#009933" width="20%">Release
Notes</th>
+ <td><?php echo $release_notes;?></td>
+</tr>
+</table>
+<br>
+<table border="0" cellspacing="3" cellpadding="3"
height="48"
+width="100%" align="center">
+<tr>
+ <td width="33%" align="center">| View Source Code &<br>
Doc On-line |</td>
+ <td width="33%" align="center">| View ChangeLog |</td>
+ <td width="33%" align="center">| Download Now |</td>
+</tr>
+</table>
+<br>
+<!-- PAckage Dependencies -->
+<table border="0" cellspacing="3" cellpadding="3"
width="100%">
+<tr>
+ <th class="others" colspan="3" bgcolor="#DDDDDD">Net_Ping
dependencies:</th>
+</tr>
+<tr>
+ <td colspan="3">PHP > 4.0.5</td>
+</tr>
+<tr>
+ <td>_Net_Foo-1.5_</td>
+ <td>| Download |</td>
+ <td>| View Source Code / Doc On-line |</td>
+</tr>
+<tr>
+ <td colspan="3" align="center"> <br>| Download All
Packages |</td>
+</tr>
+</table>
+<br>
+<!-- Related Links -->
+<table border="0" cellspacing="3" cellpadding="3"
width="100%">
+<tr>
+ <th class="others" colspan="3" bgcolor="#DDDDDD">Related
Links:</th>
+</tr>
+<tr>
+ <td>_Home Page_</td>
+</tr>
+</table>
+<br>
+<!-- Other releases download -->
+<table border="0" cellspacing="3" cellpadding="3"
width="100%">
+<tr>
+ <th class="others" colspan="3" bgcolor="#DDDDDD">Other
releases download:</th>
+</tr>
+<tr>
+ <td>_Last CVS version_</td>
+</tr>
+</table>
+<br>
+<?php
+//response_footer();
?>