|
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 | <?php include_once('common.inc.php'); include_header(); $db = $server->get_db('disclosr-agencies'); //get an agency record as json/html, search by name/abn/id // by name = startkey="Ham"&endkey="Ham\ufff0" // edit? $rows = $db->get_view("app","byABN")->rows; //print_r($rows); foreach ($rows as $row) { echo "<table>"; echo '<tr> <td colspan="2"><h3>' . $row->value->name . "</h3></td></tr>"; echo "<tr><th>Field Name</th><th>Field Value</th></tr>"; foreach ($row->value as $key => $value) { if (is_a($value, 'stdClass')) { echo "<tr><td>$key</td><td>".var_dump($value,true)."</td></tr>"; } else echo "<tr><td>$key</td><td>$value</td></tr>"; } // also show documents/URLs available echo "</table>"; } include_footer(); |