Erase login IP addresses after seven days
[aur.git] / web / html / tos.php
blobfc5d87658120cdc78ca084b5dbbf3e9a82fe55d3
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
4 include_once("aur.inc.php");
6 $uid = uid_from_sid($_COOKIE["AURSID"]);
8 if (isset($_POST["accept"]) && $_POST["accept"]) {
9 accept_terms($uid, $_POST["rev"]);
10 header("Location: " . get_uri('/'));
13 $terms = fetch_updated_terms($uid);
14 if (!$terms) {
15 header("Location: " . get_uri('/'));
18 html_header('AUR ' . __("Terms of Service"));
20 <div id="dev-login" class="box">
21 <h2>AUR <?= __('Terms of Service') ?></h2>
22 <?php if (isset($_COOKIE["AURSID"])): ?>
23 <form method="post" action="<?= get_uri('/tos') ?>">
24 <fieldset>
25 <p>
26 <?= __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?>
27 </p>
28 <p>
29 <?= __("The following documents have been updated. Please review them carefully:"); ?>
30 </p>
31 <ul>
32 <?php foreach($terms as $row): ?>
33 <li><a href="<?= htmlspecialchars(sprintf($row["URL"], $row["Revision"]), ENT_QUOTES) ?>"><?= htmlspecialchars($row["Description"]) ?></a> (<?= __('revision %d', $row["Revision"]) ?>)</li>
34 <?php endforeach; ?>
35 </ul>
36 <p>
37 <?php foreach($terms as $row): ?>
38 <input type="hidden" name="rev[<?= $row["ID"] ?>]" value="<?= $row["Revision"] ?>" />
39 <?php endforeach; ?>
40 <input type="checkbox" name="accept" /> <?= __("I accept the terms and conditions above."); ?>
41 </p>
42 <p>
43 <input type="submit" name="submit" value="<?= __("Continue") ?>" />
44 </p>
45 </fieldset>
46 </form>
47 <?php endif; ?>
48 </div>
49 <?php
50 html_footer(AURWEB_VERSION);