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

include_once '..' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'constants.php';
setcookie('cookietest', 'erfolgreich');
if (defined('INDEXSCRIPT')) {
  $target = INDEXSCRIPT;
} else {
  $target = 'index.php';
}

$part = '';
foreach ($_GET as $key => $value) {
  $part .= '&' . $key . '=' . $value;
}
if ($part != '') {
  $part = '?' . StringOperations::substr($part, 1);
}

$target .= $part;

echo '<html><head>';
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=" . CleanOperations::cleanStringForHtml($target) . "'>";
echo '</head><body>'
    . 'Falls Ihr Browser keine automatische Weiterleitung unterst&uuml;tzt, '
    . 'klicken Sie bitte <a href="' . CleanOperations::cleanStringForHtml($target) . '">hier</a>'
    . '</body></html>';