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);
page_head(tr(APPS_TITLE));
echo tr(APPS_DESCRIPTION)."
";
$result = mysql_query("select * from app");
start_table();
while ($app = mysql_fetch_object($result)) {
echo "
$app->user_friendly_name |
\n";
if (0) { // this is too inefficient
$nunsent = nresults($app, 2);
$ninprogress = nresults($app, 4);
$ndone = nresults($app, 5);
echo "
$nunsent results unsent
$ninprogress results in progress
$ndone results done
|
";
}
echo "".tr(APPS_PLATFORM)." | ".tr(APPS_VERSION)." | ".tr(APPS_INSTALLTIME)." |
\n";
for ($i=0; $iid and platformid = $platform->id");
while ($av = mysql_fetch_object($r2)) {
if ($av->deprecated) continue;
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 "
$platform->user_friendly_name |
$x |
$y |
";
}
}
}
end_table();
mysql_free_result($result);
page_tail();
?>