Rev 1130 | Rev 1149 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1130 | Rev 1148 | ||
---|---|---|---|
Line 18... | Line 18... | ||
18 | */ |
18 | */ |
19 | 19 | ||
20 | use ViaThinkSoft\OIDplus\OIDplus; |
20 | use ViaThinkSoft\OIDplus\OIDplus; |
21 | use ViaThinkSoft\OIDplus\OIDplusGui; |
21 | use ViaThinkSoft\OIDplus\OIDplusGui; |
22 | use ViaThinkSoft\OIDplus\OIDplusException; |
22 | use ViaThinkSoft\OIDplus\OIDplusException; |
- | 23 | use ViaThinkSoft\OIDplus\OIDplusNaturalSortedQueryResult; |
|
23 | 24 | ||
24 | header('Content-Type:text/html; charset=UTF-8'); |
25 | header('Content-Type:text/html; charset=UTF-8'); |
25 | 26 | ||
26 | require_once __DIR__ . '/../../../../includes/oidplus.inc.php'; |
27 | require_once __DIR__ . '/../../../../includes/oidplus.inc.php'; |
27 | 28 | ||
Line 54... | Line 55... | ||
54 | $asn1[''] = array(); |
55 | $asn1[''] = array(); |
55 | $title[''] = 'OID Root'; |
56 | $title[''] = 'OID Root'; |
56 | $description[''] = 'Exported by OIDplus 2.0'; |
57 | $description[''] = 'Exported by OIDplus 2.0'; |
57 | 58 | ||
58 | // Now check all OIDs |
59 | // Now check all OIDs |
59 | $res = OIDplus::db()->query("select * from ###objects where id like 'oid:%' order by ".OIDplus::db()->natOrder('id')); |
60 | $res = OIDplus::db()->query("select * from ###objects where id like 'oid:%'"); |
- | 61 | $res = new OIDplusNaturalSortedQueryResult($res, 'id'); |
|
60 | while ($row = $res->fetch_object()) { |
62 | while ($row = $res->fetch_object()) { |
61 | $oid = substr($row->id, strlen('oid:')); |
63 | $oid = substr($row->id, strlen('oid:')); |
62 | $parent_oid = substr($row->parent, strlen('oid:')); |
64 | $parent_oid = substr($row->parent, strlen('oid:')); |
63 | 65 | ||
64 | $dos_ids[$oid] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT); |
66 | $dos_ids[$oid] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT); |