--- a/getAgency.php
+++ b/getAgency.php
@@ -4,12 +4,13 @@
function displayValue($key, $value, $mode) {
global $db, $schemas;
+ $ignoreKeys = Array("metadata" ,"metaTags", "statistics","rtkURLs","rtkDescriptions");
if ($mode == "view") {
- if (strpos($key, "_") === 0 || $key == "metadata")
+ if (strpos($key, "_") === 0 || in_array($key,$ignoreKeys))
return;
echo "
";
- echo "";
+ echo " | ";
if (isset($schemas['agency']["properties"][$key])) {
echo $schemas['agency']["properties"][$key]['x-title'] . " " . $schemas['agency']["properties"][$key]['description'] . "";
}
@@ -119,7 +120,7 @@
// edit?
$obj = $db->get($_REQUEST['id']);
- include_header($obj->name);
+ include_header(isset($obj->name) ? $obj->name : "");
//print_r($row);
if (sizeof($_POST) > 0) {
//print_r($_POST);
@@ -159,8 +160,38 @@
}
if ($mode == "view") {
- echo '';
- echo ' ' . $row['name'] . " | ";
+ echo '
+
+
+
+
+ ';
+ echo ' ';
+ echo '
+ ' . $row['name'] . '';
+ if (isset($row['description'])) {
+ echo ' '.$row['description'].' ';
+ }
+ echo ' ';
echo "Field Name | Field Value | ";
}
if ($mode == "edit") {
@@ -192,6 +223,10 @@
}
if ($mode == "view") {
echo " ";
+ echo '
+
+
+ ';
}
if ($mode == "edit") {
echo '';
@@ -199,30 +234,45 @@
} else {
// show all list
include_header('Agencies');
+ echo '
+
+
+
+
+
+
+ Australian Government Agencies
+ Explore collected information about Australian Government Agencies below.
+
+
+
+ ';
// print_r($row);
- echo '
+ echo '
' .
- $row->value->name
- . '';
- }
- echo "";
+ (isset($row->value->name) ? $row->value->name : "ERROR NAME MISSING")
+ . ' ';
+ }
+
} catch (SetteeRestClientException $e) {
setteErrorHandler($e);
}
+ echo '
+
+
+ ';
}
+
include_footer();
?>
|