This commit is contained in:
Latif Khalifa
2013-10-16 09:44:25 +00:00
parent 2b20d28a92
commit 7823469e20
2 changed files with 18 additions and 4 deletions

View File

@@ -1,8 +1,4 @@
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
define("TARGET", ' target="_blank" ');
define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php";

18
latest_alpha.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php";
$builds = array();
$res = $DB->query("select chan, nr as build_nr, version, hash, modified from builds where chan='SingularityAlpha' order by nr desc, chan asc limit 1");
$row = $DB->fetchRow($res);
$build = new stdClass;
foreach($row as $key=>$val) {
if (false === filter_var($key, FILTER_VALIDATE_INT)) {
$build->$key = $val;
}
}
header("Content-Type: application/json");
print json_encode($build);