forked from mitchellg/CSC212-Group-Maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
students.php
executable file
·162 lines (116 loc) · 4.99 KB
/
students.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
<?php
$classID = $_GET["projectID"];
$db = new PDO('mysql:host=localhost;dbname=group_maker', 'root', 'password',array(PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); //From: http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
$classesMadeQuery = $db->prepare("select groupsMade from classes where classId='$classID'");
$classesMadeQuery->execute();
$classesMade = $classesMadeQuery->fetchAll();
$isMade = $classesMade[0][0];
if($isMade == 1){
header( 'Location: http://ec2-54-205-135-226.compute-1.amazonaws.com/GroupMaker/studentSubmit.php?projectID='.$classID ) ;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"></meta>
<title>
Student Entry
</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"></meta>
<meta content="" name="description"></meta>
<meta content="" name="author"></meta>
<!--
CSS
-->
<link rel="stylesheet" href="css/bootstrap.css"></link>
<link rel="stylesheet" href="css/footer.css"></link>
<link rel="stylesheet" href="css/bootstrap-responsive.css"></link>
<!--
HTML5 shim, for IE6-8 support of HTML5 elements
-->
<!--
[if lt IE 9]>
<script src="../assets/js/html5shiv.js"></script>
<![endif]
-->
<!--
Fav and touch icons
-->
<link href="../assets/ico/apple-touch-icon-144-precomposed.png" sizes="144x144" rel="apple-touch-icon-precomposed"></link>
<link href="../assets/ico/apple-touch-icon-114-precomposed.png" sizes="114x114" rel="apple-touch-icon-precomposed"></link>
<link href="../assets/ico/apple-touch-icon-72-precomposed.png" sizes="72x72" rel="apple-touch-icon-precomposed"></link>
<link href="../assets/ico/apple-touch-icon-57-precomposed.png" rel="apple-touch-icon-precomposed"></link>
<link href="../assets/ico/favicon.png" rel="shortcut icon"></link>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="attributeList.js" type="text/javascript"></script>
<link rel="icon" type="image/png" href="img/GMfavicon.png">
</head>
<body>
<!--
Part 1: Wrap all page content here
-->
<div id="wrap">
<!--
Begin page content
-->
<div class="container">
<div class="page-header">
<h1>
Student Entry
</h1>
</div>
<?php
$classID = $_GET["projectID"];
?>
<form name="input" action="studentSubmit.php?projectID=<?php echo $classID ?>" method="post">
<p class="lead">
Select your name from the list:
</p>
<input type="hidden" name="projectID" value="<?php echo $classID ?>"<br>
<p>
<?php
include 'studentList.php';
?>
</p>
<p class="lead">
Enter the email you would like to use for this project:
<p><input type="text" name="studentEmail" placeholder="[email protected]"></p>
</p>
<p class="lead">
Select skills that you are proficient in:
</p>
<p>
<?php
include 'attributeList.php';
?>
</p>
<p class="lead">
<input id="submit" class="btn btn-default" type="submit" value="Submit">
</p>
</form>
</div>
<div id="push"></div>
</div>
<!--
Le javascript
==================================================
-->
<!--
Placed at the end of the document so the pages load faster
-->
<script src="../assets/js/jquery.js"></script>
<script src="../assets/js/bootstrap-transition.js"></script>
<script src="../assets/js/bootstrap-alert.js"></script>
<script src="../assets/js/bootstrap-modal.js"></script>
<script src="../assets/js/bootstrap-dropdown.js"></script>
<script src="../assets/js/bootstrap-scrollspy.js"></script>
<script src="../assets/js/bootstrap-tab.js"></script>
<script src="../assets/js/bootstrap-tooltip.js"></script>
<script src="../assets/js/bootstrap-popover.js"></script>
<script src="../assets/js/bootstrap-button.js"></script>
<script src="../assets/js/bootstrap-collapse.js"></script>
<script src="../assets/js/bootstrap-carousel.js"></script>
<script src="../assets/js/bootstrap-typeahead.js"></script>
</body>
</html>