Subversion Repositories oidplus

Rev

Rev 496 | Rev 639 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. /*
  4.  * OIDplus 2.0
  5.  * Copyright 2019 - 2021 Daniel Marschall, ViaThinkSoft
  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.  
  20. require_once __DIR__ . '/includes/oidplus.inc.php';
  21.  
  22. header('Content-Type:application/json; charset=UTF-8');
  23.  
  24. OIDplus::init(false);
  25.  
  26. # ---
  27.  
  28. $out = array();
  29.  
  30. $sysid_oid = OIDplus::getSystemId(true);
  31. if (!$sysid_oid) $sysid_oid = 'unknown'; // do not translate
  32. $out['SystemID'] = $sysid_oid;
  33.  
  34. $pubKey = OIDplus::config()->getValue('oidplus_public_key');
  35. if (!$pubKey) $pubKey = 'unknown'; // do not translate
  36. $out['PublicKey'] = $pubKey;
  37.  
  38. // Commented out due to security/privacy reasons
  39. /*
  40. $sys_url = OIDplus::webpath();
  41. $out['SystemURL'] = $sys_url;
  42.  
  43. $sys_ver = OIDplus::getVersion();
  44. if (!$sys_ver) $sys_ver = 'unknown'; // do not translate
  45. $out['SystemVersion'] = $sys_ver;
  46.  
  47. $sys_install_type = OIDplus::getInstallType();
  48. $out['SystemInstallType'] = $sys_install_type;
  49.  
  50. $sys_title = OIDplus::config()->getValue('system_title');
  51. $out['SystemTitle'] = $sys_title;
  52.  
  53. $admin_email = OIDplus::config()->getValue('admin_email');
  54. $out['AdminEMail'] = $admin_email;
  55. */
  56.  
  57. echo json_encode($out);
  58.  
  59.