-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwaiver.php
More file actions
41 lines (37 loc) · 1.08 KB
/
waiver.php
File metadata and controls
41 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php session_start(); ?>
<?php
require_once("require/secure.php");
require_once("require/basic.php");
require_once("require/config.php");
Secure( false, NULL, true );
if( isset($_REQUEST["action"]) )
{
$action = $_REQUEST["action"];
if( $action == "Accept" )
{
$sql->query("UPDATE `hvz_players` SET `waiver`=1 WHERE `id`='" . ID() . "'");
to_panel();
}
elseif( $action == "Reject" )
{
header("Location: login.php?logout=&reason=" . urlencode("You must accept the waiver to play."));
exit();
}
}
if( HasSignedWaiver() )
{
to_panel();
}
page_head();
$waiver = file_get_contents( $templates_dir . "waiver.txt" );
echo "<h2>Sign the Waiver</h2>";
echo "<p>You <strong>must</strong> agree to the following waiver before you are allowed to play the game. Please read it carefully and click accept below.</p>";
echo "<p>$waiver</p>";
?>
<form method="post" action="">
<input class="btn btn-default" type="submit" name="action" value="Accept" />
<input class="btn btn-default" type="submit" name="action" value="Reject" />
</form>
<?php
page_foot();
?>