Rev 130 | Rev 236 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 130 | Rev 150 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | 3 | ||
4 | require_once __DIR__ . '/../includes/oidplus.inc.php'; |
4 | require_once __DIR__ . '/../includes/oidplus.inc.php'; |
5 | 5 | ||
6 | OIDplus::init(true); |
6 | OIDplus::init(true); |
7 | 7 | ||
8 | OIDplus::db()->set_charset("UTF8"); |
- | |
9 | OIDplus::db()->query("SET NAMES 'utf8'"); |
- | |
10 | - | ||
11 | define('ALL_OID_LIST', '/home/oidplus/all_oids.txt'); // contains all OIDs (non-public file) |
8 | define('ALL_OID_LIST', '/home/oidplus/all_oids.txt'); // contains all OIDs (non-public file) |
12 | define('DESIRED_ROOT', '1.3.6.1.4.1.37476'); |
9 | define('DESIRED_ROOT', '1.3.6.1.4.1.37476'); |
13 | 10 | ||
14 | # --- |
11 | # --- |
15 | 12 | ||
Line 22... | Line 19... | ||
22 | if (strpos($oid, '1.3.6.1.4.1.37476.30.9.') !== 0) check_oid($oid); |
19 | if (strpos($oid, '1.3.6.1.4.1.37476.30.9.') !== 0) check_oid($oid); |
23 | } |
20 | } |
24 | 21 | ||
25 | function check_oid($oid) { |
22 | function check_oid($oid) { |
26 | 23 | ||
27 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = '".OIDplus::db()->real_escape_string("oid:$oid")."'"); |
24 | $res = OIDplus::db()->query("select * from ".OIDPLUS_TABLENAME_PREFIX."objects where id = ?", array("oid:$oid")); |
28 | $ok = OIDplus::db()->num_rows($res) > 0; |
25 | $ok = OIDplus::db()->num_rows($res) > 0; |
29 | 26 | ||
30 | if (!$ok) { |
27 | if (!$ok) { |
31 | echo "Missing at OIDplus: $oid\n"; |
28 | echo "Missing at OIDplus: $oid\n"; |
32 | } |
29 | } |