--- a/licensing.php
+++ b/licensing.php
@@ -1,1 +1,54 @@
+
+
name | licencing terms |
";
+$agenciesdb = $server->get_db('disclosr-agencies');
+try {
+ $rows = $agenciesdb->get_view("app", "all", null, true)->rows;
+
+
+ if ($rows) {
+
+ foreach ($rows as $row) {
+ $rowArray = object_to_array($row->value);
+ if (isset($rowArray['name'])&& isset($rowArray['website']) && !isset($rowArray['status'])) {
+ echo "". $rowArray['name'] . " | ";
+
+
+
+ $licences = Array(
+ "hasCrownCopyright"=>"Crown Copyright",
+ "hasCCBY"=>"Creative Commons Attribution",
+ "hasCCBYND" =>"Creative Commons No Derivatives",
+"hasCCBYNCND" =>"Creative Commons No Derivatives Non-Commercial",
+ "hasRestrictiveLicense" => "ERRRRRRRRRRRRRRRRRRR",
+"hasRestrictiveLicence" => "Bespoke restrictive (permission for reuse) licences",
+"hasRestricitiveLicence"=>"ERRRRRRRRRRRR");
+ $websiteLicences = Array();
+ foreach ($rowArray as $fieldName => $rowField) {
+ foreach($licences as $licenceID => $licenceName) {
+ if (strstr($fieldName,$licenceID)) {
+ $websiteLicences[$licenceName] = $rowField[0];
+ }
+ }
+ }
+ echo "";
+ foreach ($websiteLicences as $name => $url) {
+ echo ''.$name.' ';
+ }
+
+ echo " |
";
+ }
+ }
+ }
+
+} catch (SetteeRestClientException $e) {
+ setteErrorHandler($e);
+}
+include_footer();
+?>
+
+