Add bootstrap css
[disclosr.git] / documents / disclogsList.php
blob:a/documents/disclogsList.php -> blob:b/documents/disclogsList.php
<?php <?php
  include('template.inc.php');
  include_header_documents("");
include_once('../include/common.inc.php'); include_once('../include/common.inc.php');
include_header('Webserver and Accessiblity');  
   
echo "<table> echo "<table>
<tr><th>name</th><th>disclog</th><th>scraper?</th></tr>"; <tr><th>Agency Name</th><th>Disclosure Log URL recorded?</th><th>Do we monitor this URL?</th></tr>";
$agenciesdb = $server->get_db('disclosr-agencies'); $agenciesdb = $server->get_db('disclosr-agencies');
$docsdb = $server->get_db('disclosr-documents'); $docsdb = $server->get_db('disclosr-documents');
try { try {
$rows = $agenciesdb->get_view("app", "byCanonicalName", null, true)->rows; $rows = $agenciesdb->get_view("app", "byCanonicalName", null, true)->rows;
   
   
if ($rows) { if ($rows) {
foreach ($rows as $row) { foreach ($rows as $row) {
   
echo "<tr><td>" . $row->value->name . " (".$row->id.")</td>\n"; echo "<tr><td><b>" . $row->value->name . "</b> (".$row->id.")</td>\n";
   
echo "<td>"; echo "<td>";
if (isset($row->value->FOIDocumentsURL)) { if (isset($row->value->FOIDocumentsURL)) {
echo '<a href="viewDocument.php?hash='.md5($row->value->FOIDocumentsURL).'">' echo '<a href="viewDocument.php?hash='.md5($row->value->FOIDocumentsURL).'">'
.$row->value->FOIDocumentsURL.'</a>'; .$row->value->FOIDocumentsURL.'</a>';
} else { } else {
echo "<font color='red'>✘</font>"; echo "<font color='red'>✘</font>";
} }
echo "</td>\n<td>"; echo "</td>\n<td>";
if (isset($row->value->FOIDocumentsURL)) { if (isset($row->value->FOIDocumentsURL)) {
if (file_exists("./scrapers/".$row->id.'.py')) { if (file_exists("./scrapers/".$row->id.'.py')) {
echo "<font color='green'>✔</font>"; echo "<font color='green'>✔</font>";
} else if (file_exists("./scrapers/".$row->id.'.txt')){ } else if (file_exists("./scrapers/".$row->id.'.txt')){
echo "pass"; echo "<font color='blue'><b>▬</b></font>";
} else { } else {
echo "<font color='red'>✘</font>"; echo "<font color='red'>✘</font>";
} }
} }
echo "</td></tr>\n"; echo "</td></tr>\n";
} }
} }
} catch (SetteeRestClientException $e) { } catch (SetteeRestClientException $e) {
setteErrorHandler($e); setteErrorHandler($e);
} }
include_footer(); echo "</table>";
  include_footer_documents();
?> ?>