-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.php
186 lines (171 loc) · 6.87 KB
/
registration.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php session_start(); ?>
<?php
if(!isset($_SESSION['user'])) { //Need to be authenticated to get to this page
header("Location: index.php");
exit();
}
require 'scripts/SQLUtils.php';
require 'scripts/index_utils.php';
$conn = getSQLConnectionFromConfig();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style/common.css">
<link rel="stylesheet" type="text/css" href="stylesheet2.css">
<script src="js/jquery-2.1.4.min.js"></script>
</head>
<body>
<div class="header">
<div class="top_bar">
<div class="title"><span>Club Registration</span></div>
</div>
<div class="nav">
<ul>
<a href="index.php"><li>Home</li></a>
<a href="resources/How_to_write_a_mission_statement.pdf" target="_blank"><li>How to Write a Mission Statement</li></a>
<a class="login_nav_bar"><li>
<?php
getInputToLoginMenu($conn);
?>
</li>
<ul class="login_menu_hoverable">
<li>My Clubs</li>
<li>Make A New Club</li>
<?php addAdminLink($conn); ?>
<li>Log Out</li>
</ul>
</a>
</ul>
</div>
</div>
<div id="restofpage">
<div id="main_body">
<div class= "text_line">
<form class="form" >Club Name:
<input id="club_name_in" type="text">
</form>
</div>
<div id="leaders_text_line">
<form id="leaders_form" >Club Leaders:
<input id="add_leader_text" list="students" name="add_leader" type="text">
<datalist id="students">
<?php
$result = $conn->query("SELECT preferred_name, last_name
FROM sgstudents.seniors_data
WHERE role = 'Student'
ORDER BY last_name");
if($result->num_rows > 0) {
while($item = $result->fetch_assoc()) {
echo '<option value="' .
$item['preferred_name'] . ' ' .
$item['last_name'] . '">';
}
} else {
echo 'SQL ERR: 0 Results';
}
?>
</datalist>
<input id="add_button" name="add_button" type="button" value="Add Leader">
</form>
<ul>
<?php
if(isset($_SESSION['name'])) {
?>
<li><?php echo $_SESSION['name']?><input class="X_button" type="button" Value="X" disabled></li>
<?php } ?>
</ul>
</div>
<div id="club_type_line">
<form><h3>Club Category:</h3>
<?php
$catResult = $conn->query("SELECT data FROM taftclubs.clubcategories ORDER BY id");
if($catResult->num_rows > 0) {
$first = 0;
while($cat = $catResult->fetch_assoc()) {
if($first == 0) {
?>
<input type='radio' name='category' value='<?php echo $cat["data"]; ?>' checked><?php echo $cat['data']; ?>
<?php
} else {
?>
<input type='radio' name='category' value='<?php echo $cat["data"]; ?>'><?php echo $cat['data']; ?>
<?php
}
$first += 1;
}
}
?>
</form>
</div>
<div class="text_line">
<form class="form">Faculty Advisor:
<input id="faculty_advisor_in" list="faculty" type="text">
<datalist id="faculty">
<?php
$result = $conn->query('SELECT preferred_name, last_name
FROM sgstudents.seniors_data
WHERE role="Faculty"
ORDER BY last_name');
if($result->num_rows > 0) {
while($item = $result->fetch_assoc()) {
echo '<option value="' .
$item['preferred_name'] . ' ' .
$item['last_name'] . '">';
}
} else {
echo 'SQL ERR: 0 Results';
}
?>
</datalist>
</form>
</div>
<div id= "mission_text_line">
<form > <p id="mission_text">Mission Statement:</p>
<textarea id="mission_box"> </textarea>
</form>
</div>
<div id = "event_text_line">
<p id = "mission_text">Planned Events:</p>
<table>
<tr>
<td> <form class="event_form" >Title:
<input id="event_title" class="event_box" type="text">
</form>
</td>
<td> <form class="event_form" >Location:
<input id="event_loc" class="event_box" type="text">
</form>
</td>
<td> <form class="event_form" >Date:
<input id="event_date" class="event_box" type="date">
</form>
</td>
<td> <form class="event_form" >Time:
<input id="event_time" class="event_box" type="time">
</form>
</td>
<td> <form>
<input id="add_event_button" type="button" value="Add">
</form>
</td>
</tr>
</table>
<ul id="event_list">
</ul>
</div>
<div id="save_button">
Save As Draft
</div>
<div id="submit_button">
Submit
</div>
</div>
</div>
<script src="js/common.js"></script>
<script src="registration.js"></script>
</body>
</html>
<?php $conn->close(); ?>