2003-12-12 22:17:19 +00:00
|
|
|
<?php
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
2005-01-31 20:35:12 +00:00
|
|
|
require_once("../inc/translation.inc");
|
2003-12-12 22:17:19 +00:00
|
|
|
|
|
|
|
function nresults($app, $state) {
|
|
|
|
$r = mysql_query("select count(*) as nresults from result where appid=$app->id and server_state=$state");
|
|
|
|
$foobar = mysql_fetch_object($r);
|
|
|
|
mysql_free_result($r);
|
|
|
|
return $foobar->nresults;
|
|
|
|
}
|
|
|
|
|
|
|
|
init_session();
|
|
|
|
db_init();
|
|
|
|
|
|
|
|
$platforms = array();
|
|
|
|
$r2 = mysql_query("select * from platform");
|
|
|
|
while ($platform = mysql_fetch_object($r2)) {
|
|
|
|
if ($platform->deprecated) continue;
|
|
|
|
array_push($platforms, $platform);
|
|
|
|
}
|
|
|
|
mysql_free_result($r2);
|
|
|
|
|
2005-01-31 20:35:12 +00:00
|
|
|
page_head(tr(APPS_TITLE));
|
|
|
|
echo tr(APPS_DESCRIPTION)."<br><br>
|
2003-12-12 22:17:19 +00:00
|
|
|
";
|
2006-12-18 21:15:51 +00:00
|
|
|
$result = mysql_query("select * from app where deprecated=0");
|
2003-12-12 22:17:19 +00:00
|
|
|
start_table();
|
|
|
|
|
|
|
|
|
|
|
|
while ($app = mysql_fetch_object($result)) {
|
|
|
|
echo "<tr><th colspan=3>$app->user_friendly_name</th></tr>\n";
|
|
|
|
if (0) { // this is too inefficient
|
|
|
|
$nunsent = nresults($app, 2);
|
|
|
|
$ninprogress = nresults($app, 4);
|
|
|
|
$ndone = nresults($app, 5);
|
|
|
|
echo "<tr><td colspan=3>
|
|
|
|
$nunsent results unsent
|
|
|
|
<br> $ninprogress results in progress
|
|
|
|
<br> $ndone results done
|
|
|
|
</td></tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2005-01-31 20:35:12 +00:00
|
|
|
echo "<tr><th>".tr(APPS_PLATFORM)."</th><th>".tr(APPS_VERSION)."</th><th>".tr(APPS_INSTALLTIME)."</th></tr>\n";
|
2003-12-12 22:17:19 +00:00
|
|
|
for ($i=0; $i<sizeof($platforms); $i++) {
|
|
|
|
$platform = $platforms[$i];
|
|
|
|
$newest = null;
|
|
|
|
$r2 = mysql_query("select * from app_version where appid=$app->id and platformid = $platform->id");
|
|
|
|
while ($av = mysql_fetch_object($r2)) {
|
2004-01-05 23:38:13 +00:00
|
|
|
if ($av->deprecated) continue;
|
2003-12-12 22:17:19 +00:00
|
|
|
if (!$newest || $av->version_num>$newest->version_num) {
|
|
|
|
$newest = $av;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($newest) {
|
|
|
|
$x = sprintf("%0.2f", $newest->version_num/100);
|
|
|
|
$y = pretty_time_str($newest->create_time);
|
|
|
|
echo "<tr>
|
|
|
|
<td>$platform->user_friendly_name</td>
|
|
|
|
<td>$x</td>
|
|
|
|
<td>$y</td>
|
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end_table();
|
|
|
|
mysql_free_result($result);
|
|
|
|
page_tail();
|
|
|
|
?>
|