--- a/documents/disclogsList.php +++ b/documents/disclogsList.php @@ -19,47 +19,50 @@ if ($rows) { foreach ($rows as $row) { -if (!isset($row->value->status) || $row->value->status != "suspended") { - echo "<tr><td><a href='" . $row->value->website ."'><b>". $row->value->name . "</b></a>"; - if ($ENV == "DEV") - echo "<br>(" . $row->id . ")"; - echo "</td>\n"; -$agencies++; + if ((!isset($row->value->status) || $row->value->status != "suspended") && isset($row->value->foiEmail)) { + echo "<tr><td>"; + if (isset($row->value->website)) echo "<a href='" . $row->value->website . "'>"; + echo "<b>" . $row->value->name . "</b>"; + if (isset($row->value->website)) echo "</a>"; + if ($ENV == "DEV") + echo "<br>(" . $row->id . ")"; + echo "</td>\n"; + $agencies++; - echo "<td>"; - if (isset($row->value->FOIDocumentsURL)) { - $disclogs++; - 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'><abbr title='No'>✘</abbr></font>"; - } - echo "</td>\n<td>"; - if (isset($row->value->FOIDocumentsURL)) { - if (file_exists("./scrapers/" . $row->id . '.py')) { - echo "<font color='green'><abbr title='Yes'>✔</abbr></font>"; - $green++; - } else if (file_exists("./scrapers/" . $row->id . '.txt')) { - echo "<font color='orange'><abbr title='Work in progress'><b>▬</b></abbr></font>"; - $orange++; + echo "<td>"; + if (isset($row->value->FOIDocumentsURL)) { + $disclogs++; + 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'><abbr title='No'>✘</abbr></font>"; - $red++; } + echo "</td>\n<td>"; + if (isset($row->value->FOIDocumentsURL)) { + if (file_exists("./scrapers/" . $row->id . '.py')) { + echo "<font color='green'><abbr title='Yes'>✔</abbr></font>"; + $green++; + } else if (file_exists("./scrapers/" . $row->id . '.txt')) { + echo "<font color='orange'><abbr title='Work in progress'><b>▬</b></abbr></font>"; + $orange++; + } else { + echo "<font color='red'><abbr title='No'>✘</abbr></font>"; + $red++; + } + } + echo "</td></tr>\n"; } - echo "</td></tr>\n"; } } -} } catch (SetteeRestClientException $e) { setteErrorHandler($e); } echo "</table>"; -echo $agencies." agencies, ".round(($disclogs/$agencies)*100)."% with disclosure logs; " -.round(($green/$disclogs)*100)."% logs with scrapers ".round(($red/$disclogs)*100)."% logs without scrapers ".round(($orange/$disclogs)*100)."% logs Work-In-Progress scrapers "; +echo $agencies . " agencies, " . round(($disclogs / $agencies) * 100) . "% with disclosure logs; " + . round(($green / $disclogs) * 100) . "% logs with scrapers " . round(($red / $disclogs) * 100) . "% logs without scrapers " . round(($orange / $disclogs) * 100) . "% logs Work-In-Progress scrapers "; include_footer_documents(); ?>