1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | <?php include('template.inc.php'); include_header_documents(""); include_once('../include/common.inc.php'); echo "<table> <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'); $docsdb = $server->get_db('disclosr-documents'); try { $rows = $agenciesdb->get_view("app", "byCanonicalName", null, true)->rows; if ($rows) { foreach ($rows as $row) { echo "<tr><td><b>" . $row->value->name . "</b>"; if ($ENV == "DEV") echo "<br>(" . $row->id . ")"; echo "</td>\n"; echo "<td>"; if (isset($row->value->FOIDocumentsURL)) { echo '<a href="' . $row->value->FOIDocumentsURL . '">' . $row->value->FOIDocumentsURL . '</a>'; if ($ENV == "DEV") echo '<br><small>(<a href="viewDocument.php?hash=' . md5($row->value->FOIDocumentsURL) . '">' . 'view local copy</a>)</small>'; } else { echo "<font color='red'>✘</font>"; } echo "</td>\n<td>"; if (isset($row->value->FOIDocumentsURL)) { if (file_exists("./scrapers/" . $row->id . '.py')) { echo "<font color='green'>✔</font>"; } else if (file_exists("./scrapers/" . $row->id . '.txt')) { echo "<font color='orange'><b>▬</b></font>"; } else { echo "<font color='red'>✘</font>"; } } echo "</td></tr>\n"; } } } catch (SetteeRestClientException $e) { setteErrorHandler($e); } echo "</table>"; include_footer_documents(); ?> |