get update versions from /statics/
This commit is contained in:
@@ -2,17 +2,14 @@
|
||||
global $OPTIONS;
|
||||
|
||||
require_once (__DIR__ . '/../internals/base.php');
|
||||
require_once (__DIR__ . '/../internals/database.php');
|
||||
require_once (__DIR__ . '/../internals/programs.php');
|
||||
|
||||
$name = $OPTIONS['name'];
|
||||
|
||||
Database::connect();
|
||||
$updatedata = listUpdateData();
|
||||
|
||||
$data = Database::sql_query_single_prep('SELECT * FROM ms4_updates WHERE Name = :n',
|
||||
[
|
||||
[':n', $name, PDO::PARAM_STR],
|
||||
]);
|
||||
if (! array_key_exists($name, $updatedata)) httpError(404, 'Invalid Request - [Name] not found');
|
||||
|
||||
if ($data == NULL) httpError(404, 'Invalid Request - [Name] not found');
|
||||
$data = $updatedata[$name];
|
||||
|
||||
print($data['Name']."<hr>".$data['Version']."<hr>".$data['Link']);
|
||||
Reference in New Issue
Block a user