-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexam.php
63 lines (55 loc) · 1.52 KB
/
exam.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
include_once "/home2/jjprogra/public_html/pray/prayer.php";
$PE = new PrayerEng();
$virtues = $PE->GetVirtueAndViceList(1);
$vices = $PE->GetVirtueAndViceList(0);
$UserId = 1;
$timezone = new DateTimeZone(timezone_name_from_abbr("EST"));
$dateObj = new DateTime("now", $timezone);
$date = $dateObj->format("Y-m-d");
?>
<html>
<head>
<title>Examination of Conscience</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {},
tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
}
var $_GET = getQueryParams(document.location.search);
</script>
</head>
<body>
<form action="exam.php" method="get">
<h2>Vice List</h2>
<?php
foreach($vices as $vice){
echo "<div class=vice>";
echo '<input type=checkbox class=viceitem id="'.$vice["Name"].'" value="'.$vice["Id"].'">';
echo '<label for="'.$vice["Name"].'">'.$vice["Name"].'</label>';
echo "</div>";
}
?>
<h2>Virtue List</h2>
<?php
foreach($virtues as $virtue){
echo "<div class=virtue>";
echo '<input type=checkbox class=virtueitem id="'.$virtue["Name"].'" value="'.$virtue["Id"].'">';
echo '<label for="'.$virtue["Name"].'">'.$virtue["Name"].'</label>';
echo "</div>";
}
?>
<input type=Submit>
</form>
</body>
</html>