--- a/documents/template.inc.php +++ b/documents/template.inc.php @@ -1,147 +1,175 @@ - - - - - - - - - + header('X-UA-Compatible: IE=edge,chrome=1'); + ?> + + + + + + + + + - - + Australian Disclosure Logs<?php if ($title != "") echo " - $title"; ?> + - Australian Disclosure Logs<?php if ($title != "") echo " - $title";?> - + + + + + - - + + + + - - + + + - - - - + + + - - - + + + -
- - - - - - - - $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 .= '

: " . truncate($row->value->title, 120) . ""; + $result .= '(' . $idtoname[$row->value->agencyID] . ')

'; + $result .= "

Title" . $row->value->title . "
"; + if (isset($row->value->description)) { + $result .= str_replace("\n", "
", $row->value->description); + } + if (isset($row->value->notes)) { + $result .= "
Note: " . $row->value->notes; + } + $result .= "

"; -if (isset($row->value->links)){ -echo "

Links/Documents

"; + return $result; } - echo ""; -} - echo "View original source... ID: ".$row->value->docID.""; -echo"
"; -} -