--- a/documents/template.inc.php
+++ b/documents/template.inc.php
@@ -1,147 +1,183 @@
-
-
-
-
-
-
-
-
-
+ header('X-UA-Compatible: IE=edge,chrome=1');
+ ?>
+
+
+
+
+
+
+
+
+
-
-
+ Australian Disclosure Logs
+
- Australian Disclosure Logs
-
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-12341040-4']);
+ _gaq.push(['_setDomainName', 'disclosurelo.gs']);
+ _gaq.push(['_setAllowLinker', true]);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script');
+ ga.type = 'text/javascript';
+ ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(ga, s);
+ })();
+
+ ";
+ }
+ ?>
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- $length) {
+ //limit hit!
+ $string = substr($string, 0, ($length - 3));
+ if ($stopanywhere) {
+ //stop anywhere
+ $string .= '...';
+ } else {
+ //stop on a word.
+ $string = substr($string, 0, strrpos($string, ' ')) . '...';
+ }
+ }
+ return $string;
}
function displayLogEntry($row, $idtoname) {
- echo "".$row->value->date.": ".$row->value->title." (".$idtoname[$row->value->agencyID].")
".$row->value->description;
-if (isset($row->value->notes)) {
-echo "
Note: ".$row->value->notes;
-}
-echo "
";
+ $result = "";
+ $result .= '
';
+ $result .= '
';
+ $result .= "
Title: " . $row->value->title . "
";
+ if (isset($row->value->description)) {
+ $result .= str_replace("\n", "
", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "",trim($row->value->description)));
+ }
+ if (isset($row->value->notes)) {
+ $result .= "
Note: " . $row->value->notes;
+ }
+ $result .= "
";
-if (isset($row->value->links)){
-echo "
Links/Documents
";
-foreach ($row->value->links as $link) {
- echo "- ".$link."
";
+ if (isset($row->value->links)) {
+ $result .= 'Links/Documents
";
+ }
+ $result .= "View original source... ID: " . strip_tags($row->value->docID) . "";
+ $result .= "
\n";
+ return $result;
}
- echo "";
-}
- echo "
View original source... ID: ".$row->value->docID."";
-echo"
";
-}
-