-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
53 lines (46 loc) · 1.44 KB
/
index.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
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.RegisterPage.php');
$page = new SecurePage('Burning Flipside - Registration');
$manage_add = '<li><a href="add.php">Add a new registration</a></li>';
if($page->user)
{
$data_set = DataSetFactory::getDataSetByName('registration');
$vars_data_table = $data_set['vars'];
$camps_data_table = $data_set['camps'];
$art_data_table = $data_set['art'];
$dmv_data_table = $data_set['dmv'];
$event_data_table = $data_set['event'];
$vars = $vars_data_table->read(new \Data\Filter('name eq year'));
$year = $vars[0]['value'];
$filter = array('year'=>intval($year), 'registrars'=>$page->user->uid);
$count = $camps_data_table->count($filter);
if($count === 0)
{
$count = $art_data_table->count($filter);
if($count === 0)
{
$count = $dmv_data_table->count($filter);
if($count === 0)
{
$count = $event_data_table->count($filter);
}
}
}
if($count !== 0)
{
$manage_add = '<li><a href="add.php">Manage Your Registrations</a></li>';
}
}
$page->body .= '
<div id="content">
<h1>Welcome to the Burning Flipside Registration System</h1>
<p></p>
<h1>What would you like to do?</h1>
<ul>
<li><a href="view.php">View Existing Registrations</a></li>
'.$manage_add.'
</ul>
</div>';
$page->printPage();