From 6eff099c73db8d293a9e0e433f66bcfddee7ee3f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 7 Jun 2011 17:13:50 +0300 Subject: added asd2nb --- asd2nb/server.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 asd2nb/server.php (limited to 'asd2nb/server.php') diff --git a/asd2nb/server.php b/asd2nb/server.php new file mode 100644 index 0000000..26aaf1a --- /dev/null +++ b/asd2nb/server.php @@ -0,0 +1,33 @@ + + * @package mtk + */ + + header('Content-Type: text/plain'); + + if (!isset($_REQUEST['m'])) { + exit("Sorry, have to know who you are first..."); + } + + $imgdir = '/data/nb/asd'; // edit this + + $model = $_REQUEST['m']; + + require "plist.php"; + + foreach(glob("${imgdir}/*.nbi") as $nbi) + { + $p = new PropertyList("{$nbi}/NBImageInfo.plist"); + $a = $p->toArray(); + $ids = $a['EnabledSystemIdentifiers']; + if (in_array($model, $ids)) { + exit(basename($nbi).'/'.$a['RootPath']); + } + } + +?> -- cgit v1.2.3