modified: submitbot_tcp.py
[ctf/pub/submit_bot.git] / index.php
index 2fcd25f21c3ff9faa8bc7f76167e6c07be2f50d2..1b4e9515ffd3a88caf9e6a6002bea2f520ee293d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,17 +1,17 @@
 <?php
 /** board script
-* Displayes the submitted flowIDs of the 
-* last X time with meta information 
+* Displayes the submitted flowIDs of the
+* last X time with meta information
 * If the submission to gameserver was successfull (submitsuccess)
 * and we got points for it (scoresuccess) it should be green bg
 *
-* 2014 by Jan "Someone" Vales <someone@somenet.org>
+* 2014-15 by Jan "Someone" Vales <someone@somenet.org>
 * do not publish!
 */
 
-$GLOBALS['db'] = new PDO('pgsql:host=localhost;port=5432;dbname=postgres;user=postgres;password=dba');                                                                                                              
-$GLOBALS['db']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);                                                                                            
-$query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() ORDER BY received DESC";
+$GLOBALS['db'] = new PDO('pgsql:host=localhost;port=5432;dbname=flagbot;user=flagbot;password=flagbotpw');
+$GLOBALS['db']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+$query = "SELECT * FROM flags WHERE (received + INTERVAL '30 minute') > now() ORDER BY received DESC";
 
 ?>
 <!DOCTYPE html>
@@ -20,8 +20,9 @@ $query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() OR
     <link rel="stylesheet" type="text/css" href="styles.css"></link>
   </head>
   <body>
-    <h1>Submission Board</h1>
-    <p>Shows all submissions of the last 90 min<br>
+    <h1>Submission Board - Flags</h1>
+    <p><a href="./index_serviceflags.php">Service + Exploit flags</a> <a href="./index_serviceflags.php?all">Alltime Service + Exploit flags</a> <a href="./index.php">Flaglist</a> <a href="./index_flag_ids.php">go to flag_ids</a></p>
+    <p>Shows all submissions of the last 30 min<br>
     NUM ROWS: <?php echo sizeof($GLOBALS['db']->query($query)->fetchAll()); ?></p>
     <table style="width: 100%">
       <thead>
@@ -29,6 +30,8 @@ $query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() OR
             <th>fid</th>
             <th>flag</th>
             <th>service</th>
+            <th>flag_id</th>
+            <th>submitter</th>
             <th>received</th>
             <th>submitted</th>
             <th>status</th>
@@ -44,6 +47,8 @@ $query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() OR
               <td><?php echo $row['fid']; ?></td>
               <td><?php echo $row['flag']; ?></td>
               <td><?php echo $row['service']; ?>&nbsp;</td>
+              <td><?php echo $row['flag_id']; ?>&nbsp;</td>
+              <td><?php echo $row['submitter']; ?>&nbsp;</td>
               <td><?php echo $row['received']; ?></td>
               <td><?php echo $row['submitted']; ?>&nbsp;</td>
               <td><?php echo $row['status']; ?></td>
@@ -54,5 +59,6 @@ $query = "SELECT * FROM flags WHERE (received + INTERVAL '90 minute') > now() OR
           ?>
         </tbody>
       </table>
+    <p>Status: 0=submission pending; 1=submitted:OK; 2=submitted:Fail</p>
     </body>
     </html>