3 * Displayes the submitted flowIDs of the
4 * last X time with meta information
5 * If the submission to gameserver was successfull (submitsuccess)
6 * and we got points for it (scoresuccess) it should be green bg
8 * 2014 by Jan "Someone" Vales <someone@somenet.org>
12 $GLOBALS['db'] = new PDO('pgsql:host=localhost;port=5432;dbname=postgres;user=postgres;password=dba');
13 $GLOBALS['db']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
14 $query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() ORDER BY received DESC";
20 <link rel="stylesheet" type="text/css" href="styles.css"></link>
23 <h1>Submission Board</h1>
24 <p>Shows all submissions of the last 90 min<br>
25 NUM ROWS: <?php echo sizeof($GLOBALS['db']->query($query)->fetchAll()); ?></p>
26 <table style="width: 100%">
40 $stmt = $GLOBALS['db']->query($query);
41 while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
43 <tr class="score-<?php echo $row['status']; ?>">
44 <td><?php echo $row['fid']; ?></td>
45 <td><?php echo $row['flag']; ?></td>
46 <td><?php echo $row['service']; ?> </td>
47 <td><?php echo $row['received']; ?></td>
48 <td><?php echo $row['submitted']; ?> </td>
49 <td><?php echo $row['status']; ?></td>
50 <td><?php echo htmlentities($row['srvresponse']); ?> </td>