-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_reg.php
147 lines (144 loc) · 3.41 KB
/
event_reg.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
<?php
if(session_id()=='') {
session_start();
}
?><!DOCTYPE html>
<html>
<head>
<title>Event Registration</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/layout.css">
<style type="text/css">
<!--
table {
border-collapse: collapse;
width: 100%;
border: 2px solid grey;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
tr:nth-child(odd){background-color: #CCCCCC}
#apDiv9 {
position:absolute;
top:120px;
margin: 10px;
text-align: center;
width:100%;
font-size: 50px;
font-style: italic;
color: inherit;
}
#apDiv10 {
position: absolute;
top: 200px;
left: 30px;
width: 80%;
}
#btn2{
position: fixed;
top: 50%;
left: 90%;
float: right;
}
-->
</style>
</head>
<header>
<h1>TECH LAND</h1>
</header>
<nav>
<div class="dropdown">
<div align="right"><img src="images/burger_menu.png" alt="menu" height="30" width="50"></div>
<div class="dropdown-content">
<div align="center">
<ul>
<li><a class="active" href="homepage1.php">Home</a></li>
</ul>
</div>
<li><a href="schedule.php">Schedule</a></li>
<li><a href="aboutus.php">About Us</a></li>
<?php
if(isset($_SESSION["tech_name"])){
echo '<li>
<a href="profile.php">Profile</a>
</li>
<li>
<a href="php/logout.php">Log Out</a>
</li>';
} else {
echo '<li>
<a href="login.php">Log In/ Register</a>
</li>';
}?>
</ul>
</div>
</div>
</nav>
<section>
<body>
<form name="form1" method="post" action="php/event_reg_action.php">
<?php
include 'php/config.php';
$id=$_SESSION["tech_name"][username];
$query="SELECT event_no FROM stud_event WHERE username='$id'";
$result=mysql_query($query);
$query3="SELECT COUNT(*) FROM events";
$result3=mysql_query($query3);
?>
<div id="apDiv9">Events</div>
<div id="apDiv10">
<table width="100%">
<tr>
<th width="10%">EVENT No.</th>
<th width="10%" height="30">TIME</th>
<th width="30%">EVENT</th>
<th width="20%">DAY</th>
<th width="10%">CHECK</th>
</tr>
<?php
$i=0;
$valu=mysql_fetch_array($result3);
while ($info=mysql_fetch_array($result,MYSQL_ASSOC)) {
$t[]=$info[event_no];
}
for($v=1;$v<=$valu['COUNT(*)'];$v++) {
$in[]=$v;
}
if(isset($t)) {
$in=array_diff($in,$t);
}
foreach($in as $event) {
$query2="SELECT * FROM events WHERE event_no='$event'" ;
$result2=mysql_query($query2);
$info2[]=mysql_fetch_array($result2,MYSQL_ASSOC);
?>
<tr>
<td><?php echo $info2[$i][event_no] ?></td>
<td><?php echo $info2[$i][tym] ?></td>
<td><?php echo $info2[$i][event_name] ?></td>
<td><?php echo $info2[$i][day] ?></td>
<td><label>
<?php
echo '<input name="verified[]" type="checkbox" id="'.$info2[$i][username].'" value="'.$info2[$i][event_no].'" />';
?>
</label></td>
</tr>
<?php
$i++;
}
?>
</table>
</div>
<label>
<button type="submit" id="btn2" name="submit" class="btn btn-success">Register</button>
</label>
</section>
<footer>
Copyright © techland.com
</footer>
</form>
</body>
</html>