1
0

get update versions from /statics/

This commit is contained in:
Mike Schwörer 2017-11-20 17:15:12 +01:00
parent cd4a6414fc
commit 0efeb3afeb
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
3 changed files with 24 additions and 7 deletions

View File

@ -14,4 +14,10 @@ class Programs
return array_map(readSingle, $files);
}
public static function listUpdateData()
{
$a = require (__DIR__ . '/../statics/updates/programupdates.php');
return $a;
}
}

View File

@ -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']);

View File

@ -0,0 +1,14 @@
<?php
return
[
'H²O' => [ 'version' => '3.4', 'url' => 'http://www.mikescher.com/programs/view/H2O', ],
'LAN-Control' => [ 'version' => '2.0', 'url' => 'http://www.mikescher.com/programs/view/LAN-Control', ],
'WTG' => [ 'version' => '1.3.3', 'url' => 'http://www.mikescher.com/programs/view/Wikipedia - The Game', ],
'ClipCorn' => [ 'version' => '1.5.6', 'url' => 'http://www.mikescher.com/programs/view/ClipCorn', ],
'DLF' => [ 'version' => '1.0.2', 'url' => 'http://www.mikescher.com/programs/view/Dynamic Link Fighters', ],
'InfinityTournament' => [ 'version' => '1.5', 'url' => 'http://www.mikescher.com/programs/view/Infinity Tournament', ],
'absCanvas' => [ 'version' => '0.64', 'url' => 'http://www.mikescher.com/programs/view/absCanvas', ],
'CrystalGrid' => [ 'version' => '1.2', 'url' => 'http://www.mikescher.com/programs/view/Crystal Grid', ],
'jClipCorn' => [ 'version' => '1.10.3', 'url' => 'https://github.com/Mikescher/jClipCorn/releases', ],
];