} $link_changelog = "<small>[" . make_link("/package-changelog.php?package=" . $pkg['name'] . "&release=" . $r_version, "Changelog") . "]</small>"; $href_release = "/package/" . $pkg['name'] . "/" . $r_version; $bb->horizHeadRow(make_link($href_release, $r_version), $r['state'], $r['releasedate'], $downloads_html, $link_changelog); } } $bb->end(); print "<br /><br />\n"; } // }}} // {{{ "Dependencies" $title = "Dependencies"; if ($relid) { $title .= " for release {$version}"; } $bb = new Borderbox($title, "90%", "", 2, true); $rels =& $pkg['releases']; // Check if there are too much things to show $too_much = false; if (count($rels) > 3) { $too_much = true; $rels = array_slice($rels, 0, 3); } if ($sth->numRows() == 0) { print "<i>No releases yet.</i>"; } else { $rel_trans = array('lt' => 'older than %s', 'le' => 'version %s or older', 'eq' => 'version %s', 'ne' => 'any version but %s', 'gt' => 'newer than %s', 'ge' => '%s or newer'); $dep_type_desc = array('pkg' => 'PEAR Package', 'pkg_pecl' => 'PECL Package', 'ext' => 'PHP Extension', 'php' => 'PHP Version', 'prog' => 'Program', 'ldlib' => 'Development Library', 'rtlib' => 'Runtime Library', 'os' => 'Operating System', 'websrv' => 'Web Server', 'sapi' => 'SAPI Backend'); // Loop per version foreach ($rels as $r_version => $rel) { $dep_text = "";
function manualHeader($title, $id = "") { 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("Download"); echo "<div align=\"left\">\n"; print_link("/package-info.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(); } } response_header('Manual: ' . $title); # create links to plain html and other languages if (!$HTDIG) { navigationBar($title, $id, "top"); } }
<tr> <td> </td> <td><input type="submit" name="submit" value="Save changes" /> <input type="reset" name="cancel" value="Cancel" onClick="javascript:window.location.href='/package-info.php?pacid=<?php echo $_GET['id']; ?> '; return false" /> </td> </tr> </table> </form> <?php $bb->end(); echo "<br /><br />\n"; $bb = new Borderbox("Manage releases"); echo "<table border=\"0\">\n"; echo "<tr><th>Version</th><th>Releasedate</th><th>Actions</th></tr>\n"; foreach ($row['releases'] as $version => $release) { echo "<tr>\n"; echo " <td>" . $version . "</td>\n"; echo " <td>" . $release['releasedate'] . "</td>\n"; echo " <td>\n"; $url = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES) . "?id=" . (int) $_GET['id'] . "&release=" . $release['id'] . "&action=release_remove"; $msg = "Are you sure that you want to delete the release?"; echo "<a href=\"javascript:confirmed_goto('{$url}', '{$msg}')\">" . make_image("delete.gif") . "</a>\n"; echo "</td>\n"; echo "</tr>\n"; } echo "</table>\n"; $bb->end();
if (isset($_GET['package']) && empty($_GET['pacid'])) { $pacid = $_GET['package']; } else { $pacid = isset($_GET['pacid']) ? (int) $_GET['pacid'] : null; } $pkg = package::info($pacid); if (empty($pkg['name'])) { response_header("Error"); PEAR::raiseError('Invalid package'); response_footer(); exit; } $name = $pkg['name']; response_header("{$name} Changelog"); print '<p>' . make_link("/" . $name, 'Return') . '</p>'; $bb = new Borderbox("Changelog for " . $name, "90%", "", 2, true); if (count($pkg['releases']) == 0) { $bb->fullRow('There are no releases for ' . $name . ' yet.'); } else { $bb->headRow("Release", "What has changed?"); foreach ($pkg['releases'] as $version => $release) { $link = make_link("package-info.php?package=" . $pkg['name'] . "&version=" . urlencode($version), $version); if (!empty($_GET['release']) && $version == $_GET['release']) { $bb->horizHeadRow($link, nl2br($release['releasenotes'])); } else { $bb->plainRow($link, nl2br($release['releasenotes'])); } } } $bb->end(); print '<p>' . make_link("/" . $name, 'Return') . '</p>';