Skip to content
Newer
Older
100644 21 lines (19 sloc) 806 Bytes
1c92f2b @tlhunter Initial Commit of 2009 code
authored
1 <?php
2 # This script displays per-user progress, in the right column
3 require_once('_config.php');
4 require_once('_functions.php');
5
6 $reported_progress_ids = array();
7
8 $sql = "SELECT * FROM progress ORDER BY id";
9 $result = runQuery($sql);
10 if (mysql_num_rows($result)) {
11 while ($row = mysql_fetch_assoc($result)) {
12 $reported_progress_ids[] = $row['id'];
13 $created = date("H:i:s", strtotime($row['created']));
14 echo "<div class=\"subunit level{$row['level']}\"><b>$created:</b> {$row['content']}</div>\n";
15 }
16 } else {
17 $created = date("H:i:s");
18 echo "<div class=\"subunit level0\"><b>$created:</b> Nothing to report this iteration.</div>\n";
19 }
20 $reported_progress_ids_sql = implode(',', $reported_progress_ids);
21 runQuery("DELETE FROM progress WHERE id IN ($reported_progress_ids_sql)");
Something went wrong with that request. Please try again.