<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */




include_once '..' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'constants.php';

$sapi_type = php_sapi_name();
$isCgi = false;
if (StringOperations::substr($sapi_type, 0, 3) == 'cgi') {
  $isCgi = true;
}
?>
<html>
<head>
<title>Version</title>
</head>
<body>
<?php

  if ($_SERVER['REMOTE_ADDR'] != STATIC_IP && $_SERVER['REMOTE_ADDR'] != STATIC_IP2) {
    header('HTTP/1.1 403 Forbidden');
    die('<h2>Operation not permitted!</h2>');
  }

  echo '<p>' , VERSION , '</p>';
  echo '<p>PHP v.: ' , CleanOperations::cleanStringForHtml(phpversion()) , '</p>';
  echo '<p>Anbindung von PHP erfolgt ',($isCgi ? '' : 'nicht '),'per CGI.</p>';
?>
</body>
</html>