get update versions from /statics/
This commit is contained in:
parent
cd4a6414fc
commit
0efeb3afeb
@ -14,4 +14,10 @@ class Programs
|
|||||||
|
|
||||||
return array_map(readSingle, $files);
|
return array_map(readSingle, $files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function listUpdateData()
|
||||||
|
{
|
||||||
|
$a = require (__DIR__ . '/../statics/updates/programupdates.php');
|
||||||
|
return $a;
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,17 +2,14 @@
|
|||||||
global $OPTIONS;
|
global $OPTIONS;
|
||||||
|
|
||||||
require_once (__DIR__ . '/../internals/base.php');
|
require_once (__DIR__ . '/../internals/base.php');
|
||||||
require_once (__DIR__ . '/../internals/database.php');
|
require_once (__DIR__ . '/../internals/programs.php');
|
||||||
|
|
||||||
$name = $OPTIONS['name'];
|
$name = $OPTIONS['name'];
|
||||||
|
|
||||||
Database::connect();
|
$updatedata = listUpdateData();
|
||||||
|
|
||||||
$data = Database::sql_query_single_prep('SELECT * FROM ms4_updates WHERE Name = :n',
|
if (! array_key_exists($name, $updatedata)) httpError(404, 'Invalid Request - [Name] not found');
|
||||||
[
|
|
||||||
[':n', $name, PDO::PARAM_STR],
|
|
||||||
]);
|
|
||||||
|
|
||||||
if ($data == NULL) httpError(404, 'Invalid Request - [Name] not found');
|
$data = $updatedata[$name];
|
||||||
|
|
||||||
print($data['Name']."<hr>".$data['Version']."<hr>".$data['Link']);
|
print($data['Name']."<hr>".$data['Version']."<hr>".$data['Link']);
|
14
www/statics/updates/programupdates.php
Normal file
14
www/statics/updates/programupdates.php
Normal 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', ],
|
||||||
|
];
|
Loading…
Reference in New Issue
Block a user