Browse Source

crash fix

koellenberger 2 years ago
parent
commit
080ca0290d
1 changed files with 1 additions and 79 deletions
  1. 1 79
      public/index.php

+ 1 - 79
public/index.php

@@ -59,85 +59,7 @@
         <br><br>
         <hr>
         <br><br>
-
-        <style type="text/css">
-          table th#normal {font-weight:normal}
-          table th#red {font-weight:normal; background-color:#ffbdce;}
-          table th#green {font-weight:normal; background-color:#bdffce;}
-        </style>
-
-        <?php
-          $file = "recentSQLName.txt";
-          $f = fopen($file, 'r');
-          $tableName = fgets($f);
-          fclose($f);
-          echo "<h1>Checklist history - $tableName</h1>";
-
-          $db= new SQLite3("../data/mydb.sqlite");
-          #$db->exec("CREATE TABLE IF NOT EXISTS $tableName(id INTEGER PRIMARY KEY NOT NULL, Run_Range Text, Mode Text, Submitted Text, Author Text, HV_K65 Text, HV_TankPotential Text, BIXS Text, LARA Text, LARA_crosscheck Text, FBM Text, RW Text, Run_Length Text, Data_Size Text, FPD_Energy Text, Grid_sync Text, Rate_300 Text, Rate_90 Text, Tritium_Purity Text, Summary Text )");
-          $sql_select="SELECT * FROM $tableName ORDER BY ID DESC";
-          $result=$db->query($sql_select);
-          echo "<table width='100%'>";
-          echo "<tr>";
-          $numColumns=$result->numColumns();
-          for ($i = 1; $i < $numColumns; $i++)
-          {
-              $colname=$result->columnName($i);
-              $colname = str_replace('_', ' ', $colname);
-              if ($i < 5){
-                echo "<th>$colname</th>";
-              }
-              else {
-                echo "<th class='vertical'><div class='vertical'>$colname</div></th>";
-              }
-
-          }
-          echo "</tr>";
-          $rowCount = 0;
-          $lastChecked = '';
-
-          while($row = $result->fetchArray(SQLITE3_NUM))
-          {
-              echo "<tr>";
-              for ($i = 1; $i < $numColumns-1; $i++)
-              {
-                  $value=$row[$i];
-                  if ($rowCount == 0 && $i == 1){
-                    $lastChecked = "runs ($value); at";
-                  }
-                  if($rowCount == 0 && $i == 3){
-                    $lastChecked = "$lastChecked $value (UTC)";
-                    echo "<script>localStorage.setItem('lastChecked', '$lastChecked')</script>";
-                  }
-
-                  if ($value == "good"){
-                    echo "<th id='green'>$value</th>";
-                  }
-                  elseif ($value == "bad") {
-                    echo "<th id='red'>$value</th>";
-                  }
-                  else {
-                    echo "<th id='normal'>$value</th>";
-                  }
-              }
-              $value=$row[$numColumns-1];
-              echo "<th><button type='submit' onclick='detailedInfo(\"$value\")' id='details'>details</button><th>";
-              #echo "<th id='normal'>$value</th>";
-              echo "</tr>";
-              $rowCount += 1;
-          }
-          echo "</table>";
-        ?>
-
-        <script type="text/javascript">
-            function detailedInfo(message) {
-                var str = message;
-                var alert_string = str.replace(/<br?>/gi, "\n").replace(/<pre?>/gi, "").replace(/<\/pre?>/gi, "");
-                alert(alert_string)
-            }
-        </script>
-
-      </p>
+        
     </center>
   </body>
 </html>