forked from InfoSeeking/Coagmento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistration_stats.php
40 lines (40 loc) · 1.39 KB
/
registration_stats.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
<?php
require("core/Connection.class.php");
$cxn = Connection::getInstance();
?>
<div style="float:left;width:50%">
<h2>People who are assigned to groups</h2>
<table>
<tr><th>First Name</th><th>Last Name</th><th>Username</th><th>User ID</th><th>Project ID</th></tr>
<?php
$q = "select r.firstName, r.lastName, u.username, u.userID, u.projectID FROM recruits r, users u WHERE u.projectID!=0 AND r.userID=u.userID";
$res = $cxn->commit($q);
while($row = mysql_fetch_assoc($res)){
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>", $row["firstName"], $row["lastName"], $row["username"], $row["userID"], $row["projectID"]);
}
?>
</table>
</div>
<?php
if(mysql_num_rows($res) == 0){
printf("There are no users assigned");
}
?>
<div style="float:left; margin-left: 1%; width:49%">
<h2>People who need to be assigned to groups</h2>
<table>
<tr><th>First Name</th><th>Last Name</th><th>Username</th><th>User ID</th><th>Project ID</th></tr>
<?php
$q = "select r.firstName, r.lastName, u.username, u.userID, u.projectID FROM recruits r, users u WHERE u.projectID=0 AND r.userID=u.userID";
$res = $cxn->commit($q);
while($row = mysql_fetch_assoc($res)){
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>", $row["firstName"], $row["lastName"], $row["username"], $row["userID"], $row["projectID"]);
}
?>
</table>
<?php
if(mysql_num_rows($res) == 0){
printf("Everybody is assigned");
}
?>
</div>