Rev 830 | 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 |
||
511 | daniel-mar | 5 | * Copyright 2019 - 2021 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 | |||
32 | $sysid_oid = OIDplus::getSystemId(true); |
||
33 | if (!$sysid_oid) $sysid_oid = 'unknown'; // do not translate |
||
34 | $out['SystemID'] = $sysid_oid; |
||
35 | |||
830 | daniel-mar | 36 | $pubKey = OIDplus::getSystemPublicKey(); |
472 | daniel-mar | 37 | if (!$pubKey) $pubKey = 'unknown'; // do not translate |
38 | $out['PublicKey'] = $pubKey; |
||
39 | |||
40 | // Commented out due to security/privacy reasons |
||
41 | /* |
||
801 | daniel-mar | 42 | $sys_url = OIDplus::webpath(null,self::PATH_ABSOLUTE_CANONICAL); |
472 | daniel-mar | 43 | $out['SystemURL'] = $sys_url; |
44 | |||
45 | $sys_ver = OIDplus::getVersion(); |
||
46 | if (!$sys_ver) $sys_ver = 'unknown'; // do not translate |
||
47 | $out['SystemVersion'] = $sys_ver; |
||
48 | |||
49 | $sys_install_type = OIDplus::getInstallType(); |
||
50 | $out['SystemInstallType'] = $sys_install_type; |
||
51 | |||
52 | $sys_title = OIDplus::config()->getValue('system_title'); |
||
53 | $out['SystemTitle'] = $sys_title; |
||
54 | |||
55 | $admin_email = OIDplus::config()->getValue('admin_email'); |
||
56 | $out['AdminEMail'] = $admin_email; |
||
57 | */ |
||
58 | |||
639 | daniel-mar | 59 | OIDplus::invoke_shutdown(); |
60 | |||
472 | daniel-mar | 61 | echo json_encode($out); |