diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-05-22 14:51:15 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-05-22 14:51:15 +0200 |
commit | 1d9140560f969d4545e5b1ba762a90a5385f62f4 (patch) | |
tree | 9dce9dd2107e4669ff51db3562e3d66e872bfd16 /index.php | |
parent | f34b8b332def3600ef49feb1699fa9b1adb2369b (diff) |
import current version
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/index.php b/index.php new file mode 100644 index 0000000..77a6663 --- /dev/null +++ b/index.php @@ -0,0 +1,171 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> + <head> + <title>Packages in Fedora</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" type="text/css" media="print" href="http://docs.fedoraproject.org/css/print.css"> + <style type="text/css" media="screen"> + @import url("http://docs.fedoraproject.org/css/layout.css"); + @import url("http://docs.fedoraproject.org/css/content.css"); + @import url("http://docs.fedoraproject.org/css/docbook.css"); + +body { + background-image:none; +} +.error { + background:url(http://fedoraproject.org/wikidata/kindofblue/img/icon-error.png) no-repeat left; + padding-left: 21px; +} + +.info { + background:url(http://fedoraproject.org/wikidata/kindofblue/img/icon-info.png) no-repeat left; + padding-left: 21px; +} + +.attn { + background:url(http://fedoraproject.org/wikidata/kindofblue/img/attention.png) no-repeat left; + padding-left: 21px; +} + +.check { + background:url(http://fedoraproject.org/wikidata/kindofblue/img/checkmark.png) no-repeat left; + padding-left: 21px; +} + +.cpan { + background:url(http://www.perl.com/favicon.ico) no-repeat left; + padding-left: 18px; +} + +.rt { + background:url(/img/rt.png) no-repeat left; + padding-left: 18px; +} + +.bz { + background:url(/img/bz.png) no-repeat left; + padding-left: 18px; +} + +<?php + +require "config.inc.php"; + + +try { + $db = new PDO ("mysql:dbname=" . MYBASE . ";host=" . MYHOST, MYUSER, MYPASS); +?> + </style> + + <meta name="MSSmartTagsPreventParsing" content="TRUE"> + <link rel="shortcut icon" href="http://docs.fedoraproject.org//images/favicon.ico"> + <link rel="icon" href="http://docs.fedoraproject.org//images/favicon.ico"> + </head> + + <body> + <!-- header BEGIN --> + <div id="fedora-header"> + <div id="fedora-header-logo"> + + <a href="http://fedoraproject.org"><img src="http://docs.fedoraproject.org//images/header-fedora_logo01.png" alt="Fedora Project"></a> + </div> + + <div id="fedora-header-items"> + + </div> + + </div> + + <div id="fedora-nav"></div> + <img src='http://docs.fedoraproject.org/images/link-offsite-side.png' /> + Reports home + <!-- header END --> + + <!-- leftside BEGIN --> + <div id="fedora-side-left"> + </div> + + <!-- leftside END --> + + <!-- content BEGIN --> + <div id="fedora-middle-one"> + <div class="fedora-corner-tr"> </div> + <div class="fedora-corner-tl"> </div> + <div id="fedora-content"> + + <!-- document BEGIN --> + + <h1>Packages in Fedora repositories</h1> + <h2>Package reports</h2> + <ul> + <li><a href='rpm.php?type=pecl'>PECL Extensions in Fedora</a> with upstream information</li> + <li><a href='rpm.php?type=pear'>PEAR Extensions in Fedora</a> with upstream information</li> + <li><a href='rpm.php?type=R'>R Extensions in Fedora</a> with upstream information</li> + <li><a href='all.php'>All Packages in Fedora</a></li> + </ul> + <h2>Analysed repositories</h2> + + +<?php + echo "<table id='fedora-list-packages'>\n"; + echo "<tr class='odd'><th>Main</th><th>Active</th><th>Sub<th>Url</th><th>Last update</th></tr>\n"; + + $sql='SELECT * FROM repo ORDER BY ID'; + $res=$db->query($sql); + if ($res) for ($i=0, $prev="xx" ; $repo=$res->fetchObject() ; $i++, $prev=$repo->main) { + printf ("<tr class='%s'><td><strong>%s</strong></td><td>%s</td><td>%s</td><td><a href='%srepoview/' alt='Repoview'>%s</a></td><td>%s</td></tr>\n", + ($i%2 ? 'odd' : 'even'), + ($repo->main != $prev ? $repo->main : " "), + ($repo->main != $prev ? ($repo->active ? "<strong>Yes</strong>" : "no") : " "), + $repo->sub, $repo->url, $repo->url, date("r", $repo->stamp)); + } + echo "</table>\n"; + +} +catch(PDOException $e) { + printf("%s ERREUR : %s\n", date("r"), $e->getMessage()); +} + +?> + +<h2>Script sources</h2> +<table id='fedora-list-packages'><tr><th>Name</th><th>Description</th><th>Date</th></tr> +<?php + $pages=array( + "index.php" => "This page", + "all.php" => "All Packages in Fedora", + "rpm.php" => "PHP Extensions in Fedora", + "refresh.php" => "The metadata refresh script launch twice a day by cron", + "zoom.php" => "Package detail"); + + $i=0; + foreach ($pages as $page => $name) if (is_file($page) && is_link($page."s")) { + $stat=stat($page); + printf ("<tr class='%s'><td><a href='%ss'>%s</a></td><td>%s</td><td>%s</td></tr>\n", + ($i%2 ? 'odd' : 'even'), $page, $page, $name, date("r", $stat["mtime"])); + $i++; + } +?> +</table> +<p>Any feedback, RFE and patches are welcome.</p> + + <!-- document END --> + </div> + <div class="fedora-corner-br"> </div> + <div class="fedora-corner-bl"> </div> + </div> + + <!-- content END --> + + <!-- footer BEGIN --> + + <div id="fedora-footer"> + <br/>The Fedora Project is maintained and driven by the community and sponsored by Red Hat. + <br/><a href="http://fedoraproject.org/wiki/Legal">Legal</a> | <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a> + <br> + </div> + + <!-- footer END --> + </body> +</html> + |