-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgroups.php
121 lines (119 loc) · 4.25 KB
/
groups.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
<?php
session_start();
include_once('db.php');
$query1 = "SELECT * FROM participants WHERE debate_group='A' GROUP BY name ASC;";
$query2 = "SELECT * FROM participants WHERE debate_group='B'GROUP BY name ASC;";
$query_run1 = mysqli_query($connect,$query1);
$query_run2 = mysqli_query($connect,$query2);
$index = 0;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>NACOSS debate groups</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="bootstrap.min.css" />
<script src="main.js"></script>
</head>
<body>
<header>
<nav>
<ul class="nav nav-tabs">
<li><a href="index.php">NACOSS Debate</a></li>
<li class="active"><a href="#">View group members</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<div class="row">
<div class=" success col-sm-12">
<?php
if(isset($_SESSION['registration_status']))
echo $_SESSION['registration_status'];
session_destroy();
?>
</div>
<div class="col-sm-12">
<h2> <center> Hackers are smarter, Intelligent and better than software developers</center></h2>
</div>
<div class="col-sm-6">
<h3>Group A <small><i>supporting the motion</i></small></h3>
<?php if($query_run1){
if(mysqli_num_rows($query_run1)!=0) {
?> <div class="table-responsive table-bordered table-striped">
<table class="table">
<thead>
<tr>
<th>SN</th>
<th>Name</th>
<th>Level</th>
<th>Phone Number</th>
</tr>
</thead>
<tbody>
<?php while($result = mysqli_fetch_assoc($query_run1)){
echo "<tr>
<td>".++$index."</td>
<td>".$result['name']."</td>
<td>".$result['level']."</td>
<td>".$result['phone_number']."</td>
</tr>
";
}
?>
</tbody>
</table>
</div>
<?php
}
else
echo "<h4>No member in group A yet...! </h4>";
$index =0;
}?>
</div>
<div class="col-sm-6">
<h3>Group B <small><i>Opposing the motion</i></small></h3>
<?php if($query_run1){
if(mysqli_num_rows($query_run2)!=0) {
?>
<div class="table-responsive table-bordered table-striped ">
<table class="table">
<thead>
<tr>
<th>SN</th>
<th>Name</th>
<th>Level</th>
<th>Phone Number</th>
</tr>
</thead>
<tbody>
<?php while($result = mysqli_fetch_assoc($query_run2)){
echo "<tr>
<td>".++$index."</td>
<td>".$result['name']."</td>
<td>".$result['level']."</td>
<td>".$result['phone_number']."</td>
</tr>
";
}
?>
</tbody>
</table>
</div>
<?php
}
else
echo "<h4>No member in group B yet...! </h4>";
$index =0;
}?>
</div>
</div>
</div>
</main>
<footer><center>NACOSS WEEK © 2018</center></footer>
</body>
</html>