<?php
/* setup includes */
require_once('includes/master.inc.php');

/* setup page */
define("PAGE_NAME", t("access_restricted_page_name"));
define("PAGE_DESCRIPTION", t("access_restricted_meta_description"));
define("PAGE_KEYWORDS", t("access_restricted_meta_keywords"));

if ($e = $_REQUEST['e'])
{
    $e = strip_tags($e);
    setError($e);
}

$u = $_REQUEST['u'];
if (!(int) $u)
{
    redirect(WEB_ROOT . "/error." . SITE_CONFIG_PAGE_EXTENSION);
}

require_once('_header.php');
?>

<div class="searchBoxWrapper">

<?php
if (isErrors())
{
    echo outputErrors();
}
?>

    <!-- password form -->
    <div class="passwordBox" id="passwordBox">
        <form method="POST" action="url_redirector.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>">
            <div class="passwordContainer" id="passwordContainer">
                <div class="shortUrlPassword">
                    <div style="padding-bottom:12px;">
                        <label for="accessPass"><?php echo t("access_restricted_enter_password"); ?></label>
                    </div>
                    <div style="padding-bottom:12px;">
                        <input name="accessPass" id="accessPass" type="password" title="short url access password" value="<?php echo $_REQUEST['accessPass']; ?>"/>
                    </div>
                </div>
                <div class="clear"><!-- --></div>

                <input name="u" id="u" type="hidden" value="<?php echo (int) $u; ?>"/>
                <input name="submit" value="go" name="submitme" type="submit"/>
            </div>
        </form>
    </div>
</div>

<?php
require_once('_footer.php');
?>