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-15 by Jan "Someone" Vales <someone@somenet.org>
12 $GLOBALS['db'] = new PDO('pgsql:host=localhost;port=5432;dbname=flagbot;user=flagbot;password=flagbotpw');
13 $GLOBALS['db']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
14 $query = "SELECT * FROM flags WHERE (received + INTERVAL '30 minute') > now() ORDER BY received DESC";
20 <link rel="stylesheet" type="text/css" href="styles.css"></link>
21 <meta http-equiv="refresh" content="10;">
24 <h1>Submission Board - Flags</h1>
25 <p><a href="./index.php">Flags</a>
26 <a href="./index_serviceflags.php">Service + Exploit flags</a> <a href="./index_serviceflags.php?all">Alltime Service + Exploit flags</a>
27 <a href="./index_flag_ids.php">Flag_IDs</a></p>
29 <p>Shows all submissions of the last 30 min. <b>Current Time: <?php echo ' '.date('Y-m-d H:i:s');?></b><br>
30 NUM ROWS: <?php echo sizeof($GLOBALS['db']->query($query)->fetchAll());?></p>
31 <table style="width: 100%">
47 $stmt = $GLOBALS['db']->query($query);
48 while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
50 <tr class="score-<?php echo $row['status']; ?>">
51 <td><?php echo $row['fid']; ?></td>
52 <td><?php echo $row['flag']; ?></td>
53 <td><?php echo $row['service']; ?> </td>
54 <td><?php echo $row['flag_id']; ?> </td>
55 <td><?php echo $row['submitter']; ?> </td>
56 <td><?php echo $row['received']; ?></td>
57 <td><?php echo $row['submitted']; ?> </td>
58 <td><?php echo $row['status']; ?></td>
59 <td><?php echo htmlentities($row['srvresponse']); ?> </td>
66 <p>Status: 0=submission pending; 1=submitted:OK; 2=submitted:Fail</p>