-
Notifications
You must be signed in to change notification settings - Fork 0
/
stud_page.php
107 lines (87 loc) · 3.7 KB
/
stud_page.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
<?php
//Include authentication
require("process/auth.php");
//Include database connection
require("config/db.php");
//Include class Voting
require("classes/Voting.php");
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Voting System</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/style_voter.css">
</head>
<body>
<!-- Header -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="stud_page.php"><span class="glyphicon glyphicon-home"></span> Voting Sytem</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="stud_page.php"><span class="glyphicon glyphicon-home"></span></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-user"></span> <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="process/logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- End Header -->
<?php
$readCampus = new Voting();
$rtnReadCamp = $readCampus->READ_CAMPUS();
?>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<h3 style="text-align: center;">Select Campus</h3><hr />
<h4>Welcome <?php echo $_SESSION['NAME']; ?></h4>
<?php if($rtnReadCamp) { ?>
<form action="voting_page.php" method="GET" role="form">
<div class="form-group">
<label for="campus">Campus</label>
<select required class="form-control" name="campus">
<option value="">*****Select Campus*****</option>
<?php while($rowCamp = $rtnReadCamp->fetch_assoc()) { ?>
<option value="<?php echo $rowCamp['camp']; ?>"><?php echo $rowCamp['camp']; ?></option>
<?php } //End while ?>
</select>
</div>
<div class="form-group">
<input type="submit" name="submit" value="Submit" class="btn btn-info">
</div>
</form>
<?php $rtnReadCamp->free(); ?>
<?php } //End if ?>
</div>
</div>
</div>
<!-- Footer -->
<nav class="navbar navbar-inverse navbar-fixed-bottom" role="navigation">
<div class="container">
<div class="navbar-text pull-left">
</div>
</div>
</nav>
<!-- End Footer -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>