-
- if (!empty ($key))
- {
- if (!isset ($_POST['key']))
- {
- require (JIRAFEAU_ROOT.'lib/template/header.php');
- ?><div id = "upload">
- <form action =
- "<?php echo $_SERVER['REQUEST_URI']; ?>" method =
- "post"> <input type = "hidden" name = "jirafeau" value =
- "<?php echo JIRAFEAU_VERSION; ?>" /><fieldset>
- <legend><?php echo _('Key protection');
- ?></legend> <table> <tr>
- <td><?php echo _('Give the key of this file:');
- ?><input type = "password" name =
- "key" /></td> </tr> <tr> <td><input type =
- "submit" value =
- "<?php echo _('I have the right to download this file'); ?>"
- /></td> </tr> </table> </fieldset> </form> </div>
- <?php require (JIRAFEAU_ROOT.'lib/template/footer.php');
- exit;
- }
- else
- {
- if ($key != md5 ($_POST['key']))
- {
- header ("HTTP/1.0 403 Forbidden");
-
- require (JIRAFEAU_ROOT.'lib/template/header.php');
- echo '<div class="error"><p>Error 403: Forbidden</p></div>';
- require (JIRAFEAU_ROOT.'lib/template/footer.php');
- exit;
- }
- }