[Dehs-devel] r55 - trunk/www
atomo64-guest at alioth.debian.org
atomo64-guest at alioth.debian.org
Thu Nov 29 01:28:00 UTC 2007
Author: atomo64-guest
Date: 2007-11-29 01:28:00 +0000 (Thu, 29 Nov 2007)
New Revision: 55
Modified:
trunk/www/maintainer.php
Log:
Display accurate page title
Modified: trunk/www/maintainer.php
===================================================================
--- trunk/www/maintainer.php 2007-11-29 01:14:48 UTC (rev 54)
+++ trunk/www/maintainer.php 2007-11-29 01:28:00 UTC (rev 55)
@@ -1,41 +1,45 @@
-<?/*
-
+<?php /*
+
Originally written by Stefano Fabri <bluefuture at nospam@email.it>
Copyright 2004, Stefano Fabri
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/?>
+*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
- <title>Sources With No Watch</title>
+<?php
+if (isset($_GET['maint']) && !empty($_GET['maint'])) {
+ $title = 'DEHS report for ' . htmlentities($_GET['maint']);
+} else if (isset($_GET['name']) && !empty($_GET['name'])) {
+ $title = 'DEHS report for package ' . htmlentities($_GET['name']);
+} else {
+ $title = 'DEHS web query';
+}
+?>
+ <title><?=$title?></title>
</head>
<body>
<div style="text-align: center;">
<h1>Debian External Health Status</h1>
-<? if ($_GET['maint']) {?>
-Dehs Summary for <? print htmlentities($_GET['maint']);?><br>
-<? }
-elseif ($_GET['name']) {?>
-Dehs for Package: <? print htmlentities($_GET['name']);?><br>
-<? } ?>
+<?=$title?><br>
</div>
-<?include("menu.inc");?>
-<?
+<?php
+include("menu.inc");
require("config_www.inc");
$maint='%';
$name='%';
@@ -49,15 +53,15 @@
$name = pg_escape_string($name);
$sql=ARRAY(no_watch=>"SELECT id,mpop_inst,name,pkgs.version,pkgs.dist,tot_up_error, tot_avg_error_date,wwiz,wwiz_type,wwiz_version,maint,section,up_changes FROM pkgs INNER JOIN
-(Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
+(Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
WHERE (watch IS NULL OR watch='') AND (maint LIKE '$maint' OR uploaders LIKE '%$maint%') AND name LIKE '$name' ORDER BY mpop_inst DESC;",
no_upstream=>"select id,mpop_inst,name,section,version, tot_up_error, tot_avg_error_date, pkgs.dist,watch_warn,up_changes, up_version from pkgs INNER JOIN (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist)
as binpkgs using(name,dist) where up_version='' AND watch!='' AND (maint LIKE '%$maint%' OR uploaders LIKE '$maint') AND name LIKE '$name' order by mpop_inst desc;",
-no_updated=>"Select id,mpop_inst,name,section,version,tot_up_error,tot_avg_error_date,pkgs.dist,up_version,watch_warn, up_changes from pkgs
-INNER join (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist) as binpkgs using(name,dist)
+no_updated=>"Select id,mpop_inst,name,section,version,tot_up_error,tot_avg_error_date,pkgs.dist,up_version,watch_warn, up_changes from pkgs
+INNER join (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist) as binpkgs using(name,dist)
where updated='1' AND up_version!='' AND (maint LIKE '$maint' OR uploaders LIKE '%$maint%') AND name LIKE '$name'
-order by mpop_inst desc;",ok=>"Select id,mpop_inst,name,section,version,tot_up_error,tot_avg_error_date,pkgs.dist,up_version,watch_warn, up_changes from pkgs
-INNER join (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist) as binpkgs using(name,dist)
+order by mpop_inst desc;",ok=>"Select id,mpop_inst,name,section,version,tot_up_error,tot_avg_error_date,pkgs.dist,up_version,watch_warn, up_changes from pkgs
+INNER join (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist) as binpkgs using(name,dist)
where updated='0' AND (maint LIKE '$maint' OR uploaders LIKE '%$maint%') AND name LIKE '$name'
order by mpop_inst desc;");
foreach($sql as $key => $value) {
@@ -77,18 +81,18 @@
<b>Total packages:</b> $totpkgs[0] <b>Percentace: </b> " . number_format ( $totrs/$totpkgs[0] * 100, 2, ",",".") . "%<br>" ;
break;
case "no_updated":
- print "<b>Total Packages need Update</b>: $totrs
+ print "<b>Total Packages need Update</b>: $totrs
<b>Total packages:</b> $totpkgs[0] <b>Share: </b> " . number_format ( $totrs/$totpkgs[0] * 100, 2, ",",".") . "%<br>" ;
break;
case "ok":
- print "<b>Total Packages updated</b>: $totrs
+ print "<b>Total Packages updated</b>: $totrs
<b>Total packages:</b> $totpkgs[0] <b>Percentage: </b> " . number_format ( $totrs/$totpkgs[0] * 100, 2, ",",".") . "%<br>" ;
break;
} ?>
</div>
<?
while ($res_array=pg_fetch_array($rs)) {
-
+
?>
<hr>
<ul>
@@ -96,7 +100,7 @@
<ul>
<li><b>Pop Inst:</b> <? print $res_array["mpop_inst"]; ?></li>
<? if ($key=="no_watch") { ?>
-<li><b>WWiz Upstream Version:</b>
+<li><b>WWiz Upstream Version:</b>
<? if ($res_array["wwiz_version"]) {?>
<? if ($res_array[up_changes]!='') { ?>
<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=up_changes";?>">
@@ -124,42 +128,42 @@
<li><b>Avg days opened: </b><? print number_format($res_array["tot_avg_error_date"],0); ?></li>
<li><b>Distrib:</b><? print $res_array["dist"]; ?></li>
<? if ($key=="no_watch") { ?>
-<li><b>Watch Wiz:</b>
-<?
+<li><b>Watch Wiz:</b>
+<?
if ($res_array["wwiz_type"]!="no_cright") {
?>
<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=watch";?>">
<? print $res_array["wwiz_type"]; ?></a>
- <?}
+ <?}
else print "N/A";
?></li>
-<?}?>
+<?}?>
<? if ($key!="no_watch") { ?>
-<li><b>Watch: </b><a href="<? print "wwiz_detail.php?id=$res_array[id]&type=watch";?>">View</a></li>
+<li><b>Watch: </b><a href="<? print "wwiz_detail.php?id=$res_array[id]&type=watch";?>">View</a></li>
<?}?>
<li><b>Uscan Errors processing Watch File: </b><? $res_array["watch_warn"] ? print "<br>" . nl2br($res_array["watch_warn"]) : print "Nothing"; ?></li>
<li><b>Copyright: </b><? print "<a href=" . changelog($res_array) . ">" . "View</a>"; ?></li>
</ul>
</ul>
-<?
+<?
print "<!-- Machine-readable: " . $res_array['name'] . " " .
$res_array["version"] . " " .
$res_array["up_version"] . " " .
$res_array["wwiz_version"] . " -->";
} ?>
-<hr>
+<hr>
<?
}
}
pg_close($db);
-?>
+?>
<? function changelog($res_array) {
if (substr($res_array["name"],0,3)=='lib') $initial=substr($res_array["name"],0,4);
else $initial=substr($res_array["name"],0,1);
- $url="http://packages.debian.org/changelogs/pool/" .
+ $url="http://packages.debian.org/changelogs/pool/" .
$res_array["section"] . "/" .
- $initial . "/" .
- $res_array["name"] ."/" .
+ $initial . "/" .
+ $res_array["name"] ."/" .
$res_array["name"] . "_" .
$res_array["version"] . "/copyright";
return $url;
More information about the Dehs-devel
mailing list