beginnings of NAA data import
[disclosr.git] / admin / agls.php
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
<?php
 
include_once('include/common.inc.php');
include_header('Webserver and Accessiblity');
 
echo "<table>
    <tr><th>name</th><th>function</th></tr>";
$db = $server->get_db('disclosr-agencies');
try {
     $agencies = $db->get_view("app", "byCanonicalName", null, true)->rows;
 
 
    if ($agencies) {
        foreach ($agencies as $row) {
 
            echo "<tr><td>" . $row->value->name . "</td>";
            if (isset($row->value->metaTags)) {
                if (is_array($row->value->metaTags)) {
                        $tags =$row->value->metaTags;
                } else {
                        $tags = object_to_array($row->value->metaTags);
                }
                if (isset($tags['AGLS.Function'])) {
                    echo "<td>" . $tags['AGLS.Function'] . "</td>";
                }
            }
            echo "</tr>";
        }
    }
} catch (SetteeRestClientException $e) {
    setteErrorHandler($e);
}
include_footer();
?>