cvs: php-master-web /manage mirrors.php
| From: | Gabor Hojtsy | Date: | Fri, 01 Aug 2003 17:00:59 +0000 |
| Subject: | cvs: php-master-web /manage mirrors.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-19724@lists.php.net to get a copy of this message | ||
goba Fri Aug 1 13:00:59 2003 EDT
Modified files:
/php-master-web/manage mirrors.php
Log:
Provide last updated and last checked time information
in case of errors where this information will help in a
decision.
Swap the edit and the status image for usability reasons
(better overview)
Index: php-master-web/manage/mirrors.php
diff -u php-master-web/manage/mirrors.php:1.61 php-master-web/manage/mirrors.php:1.62
--- php-master-web/manage/mirrors.php:1.61 Fri Aug 1 12:44:00 2003
+++ php-master-web/manage/mirrors.php Fri Aug 1 13:00:59 2003
@@ -256,6 +256,8 @@
// status data to show colors and need to order by country too to make
// still non-officially named mirrors show in the right place
$res = mysql_query("SELECT mirrors.*, " .
+ "UNIX_TIMESTAMP(lastupdated) AS ulastupdated, " .
+ "UNIX_TIMESTAMP(lastchecked) AS ulastchecked, " .
"(DATE_SUB(FROM_UNIXTIME($checktime), INTERVAL 3 DAY) <
mirrors.lastchecked) AS up, " .
"(DATE_SUB(FROM_UNIXTIME($checktime), INTERVAL 7 DAY) <
mirrors.lastupdated) AS current, " .
"country.name as countryname " .
@@ -325,9 +327,11 @@
$siteimage = "error";
$row['ocmt'] = trim($row['ocmt']);
if (!empty($row['ocmt'])) {
- $errorinfo = $row['ocmt'];
+ $errorinfo = $row['ocmt'] . " (last accessed: " .
+ print_date($row['ulastchecked']) . ")";
} elseif (!$row['current']) {
- $errorinfo = "content on site is out of date";
+ $errorinfo = "content out of date (last updated: " .
+ print_date($row['ulastupdated']) . ")";
}
}
// Up to date and current
@@ -374,8 +378,7 @@
// Mirror edit link
echo "<tr bgcolor=\"#e0e0e0\">\n" .
"<td bgcolor=\"#ffffff\" align=\"right\">\n" .
- "<a href=\"mirrors.php?id=" . $row['id'] .
- "\"><img
src=\"/images/mirror_edit.png\"></a></td>\n";
+ "<img src=\"/images/mirror_{$siteimage}.png\" /></td>\n";
// Print out mirror site link
echo '<td><a href="http://' .
$row['hostname'] . '/" target="_blank">' .
@@ -395,7 +398,8 @@
echo '<td align="right">' . $statscell . '</td>' .
"\n";
// Print out mirror status information
- echo '<td align="right"><img src="/images/mirror_' .
$siteimage . '.png" /></td>' . "\n";
+ echo '<td align="right"><a href="mirrors.php?id=' .
$row['id'] .
+ '"><img
src="/images/mirror_edit.png"></a></td>' . "\n";
// End of row
echo '</tr>';