Rev 1050 | Rev 1115 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
472 | daniel-mar | 1 | <?php |
2 | |||
3 | /* |
||
4 | * OIDplus 2.0 |
||
1074 | daniel-mar | 5 | * Copyright 2019 - 2023 Daniel Marschall, ViaThinkSoft |
472 | daniel-mar | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
8 | * you may not use this file except in compliance with the License. |
||
9 | * You may obtain a copy of the License at |
||
10 | * |
||
11 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
12 | * |
||
13 | * Unless required by applicable law or agreed to in writing, software |
||
14 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
16 | * See the License for the specific language governing permissions and |
||
17 | * limitations under the License. |
||
18 | */ |
||
19 | |||
1050 | daniel-mar | 20 | use ViaThinkSoft\OIDplus\OIDplus; |
21 | |||
472 | daniel-mar | 22 | require_once __DIR__ . '/includes/oidplus.inc.php'; |
23 | |||
24 | header('Content-Type:application/json; charset=UTF-8'); |
||
25 | |||
26 | OIDplus::init(false); |
||
27 | |||
28 | # --- |
||
29 | |||
30 | $out = array(); |
||
31 | |||
1074 | daniel-mar | 32 | $sysid_id = OIDplus::getSystemId(false); |
33 | if (!$sysid_id) $sysid_id = 'unknown'; // do not translate |
||
34 | $out['SystemID'] = $sysid_id; |
||
35 | |||
472 | daniel-mar | 36 | $sysid_oid = OIDplus::getSystemId(true); |
37 | if (!$sysid_oid) $sysid_oid = 'unknown'; // do not translate |
||
1074 | daniel-mar | 38 | $out['SystemOID'] = $sysid_oid; |
472 | daniel-mar | 39 | |
1074 | daniel-mar | 40 | $sysid_guid = OIDplus::getSystemGuid(); |
41 | if (!$sysid_guid) $sysid_guid = 'unknown'; // do not translate |
||
42 | $out['SystemGUID'] = $sysid_guid; |
||
43 | |||
830 | daniel-mar | 44 | $pubKey = OIDplus::getSystemPublicKey(); |
472 | daniel-mar | 45 | if (!$pubKey) $pubKey = 'unknown'; // do not translate |
46 | $out['PublicKey'] = $pubKey; |
||
47 | |||
1074 | daniel-mar | 48 | $sys_url = OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL); |
472 | daniel-mar | 49 | $out['SystemURL'] = $sys_url; |
50 | |||
1074 | daniel-mar | 51 | $sys_title = OIDplus::config()->getValue('system_title'); |
52 | $out['SystemTitle'] = $sys_title; |
||
53 | |||
54 | // commented out because of privacy |
||
55 | /* |
||
472 | daniel-mar | 56 | $sys_ver = OIDplus::getVersion(); |
57 | if (!$sys_ver) $sys_ver = 'unknown'; // do not translate |
||
58 | $out['SystemVersion'] = $sys_ver; |
||
1074 | daniel-mar | 59 | */ |
472 | daniel-mar | 60 | |
1074 | daniel-mar | 61 | // commented out because of privacy |
62 | /* |
||
472 | daniel-mar | 63 | $sys_install_type = OIDplus::getInstallType(); |
64 | $out['SystemInstallType'] = $sys_install_type; |
||
1074 | daniel-mar | 65 | */ |
472 | daniel-mar | 66 | |
1074 | daniel-mar | 67 | // commented out because of privacy |
68 | /* |
||
472 | daniel-mar | 69 | $admin_email = OIDplus::config()->getValue('admin_email'); |
70 | $out['AdminEMail'] = $admin_email; |
||
71 | */ |
||
72 | |||
639 | daniel-mar | 73 | OIDplus::invoke_shutdown(); |
74 | |||
472 | daniel-mar | 75 | echo json_encode($out); |