cvs: php-master-web /manage mirrors.php
| From: | Philip Olson | Date: | Wed, 08 Apr 2009 23:53:42 +0000 |
| Subject: | cvs: php-master-web /manage mirrors.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-4357@lists.php.net to get a copy of this message | ||
philip Wed Apr 8 23:53:42 2009 UTC
Modified files:
/php-master-web/manage mirrors.php
Log:
Added ability to see more info on the main page
http://cvs.php.net/viewvc.cgi/php-master-web/manage/mirrors.php?r1=1.105&r2=1.106&diff_format=u
Index: php-master-web/manage/mirrors.php
diff -u php-master-web/manage/mirrors.php:1.105 php-master-web/manage/mirrors.php:1.106
--- php-master-web/manage/mirrors.php:1.105 Tue Apr 7 17:10:25 2009
+++ php-master-web/manage/mirrors.php Wed Apr 8 23:53:42 2009
@@ -10,6 +10,7 @@
// Get boolean values from form
$active = isset($active) ? 1 : 0;
$has_stats = isset($has_stats) ? 1 : 0;
+$moreinfo = empty($_GET['mi']) ? 0 : 1;
// Select last mirror check time from table
$lct = db_query("SELECT UNIX_TIMESTAMP(lastchecked) FROM mirrors ORDER BY lastchecked DESC
LIMIT 1");
@@ -247,14 +248,14 @@
exit();
}
-page_mirror_list();
+page_mirror_list($moreinfo);
foot();
// =============================================================================
// Mirror listing page function
-function page_mirror_list()
+function page_mirror_list($moreinfo = false)
{
global $checktime;
@@ -419,6 +420,13 @@
"<td colspan=\"7\"><img
src=\"/images/mirror_info.png\" /> " .
nl2br($errorinfo) . "</td></tr>";
}
+ // If additional details are desired
+ if ($moreinfo) {
+ $summary .= '<tr><tr bgcolor="#e0e0e0"><td
bgcolor="#ffffff"> </td>' .
+ '<td colspan="7">' .
+ "Last -- Update: $row[ulastupdated] Check:
$row[ulastchecked]" .
+ '</td></tr>';
+ }
}
$summary .= '</table></div>';
@@ -438,6 +446,7 @@
$stats['has_stats_percent'] = sprintf('%.1f%%',
$stats['has_stats'] / $stats['mirrors'] * 100);
$last_check_time = get_print_date($checktime);
+ $current_time = get_print_date(time());
$stats['ok'] = $stats['mirrors'] - $stats['autodisabled'] -
$stats['disabled'];
@@ -484,11 +493,14 @@
</tr>
</table>
<h1>Resources</h1>
+ <a href="/manage/mirrors.php?mi=1">See more info</a><br />
<a href="http://php.net/mirroring.php"
target="_blank">Guidelines</a><br />
<a href="mailto:mirrors@php.net">Mailing list</a><br
/>
<a href="http://www.iana.org/cctld/cctld-whois.htm"
target="_blank">Country TLDs</a>
<h1>Last check time</h1>
{$last_check_time}
+ <h1>Current time</h1>
+ {$current_time}
</div>
<p>