--- a/documents/template.inc.php
+++ b/documents/template.inc.php
@@ -1,167 +1,194 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
+
-
+ ";
+ }
+ ?>
-
+
-
-
+
+
$length) {
//limit hit!
- $string = substr($string,0,($length -3));
+ $string = substr($string, 0, ($length - 3));
if ($stopanywhere) {
//stop anywhere
$string .= '...';
- } else{
+ } else {
//stop on a word.
- $string = substr($string,0,strrpos($string,' ')).'...';
+ $string = substr($string, 0, strrpos($string, ' ')) . '...';
}
}
return $string;
}
-function displayLogEntry($row, $idtoname) {
+
+function displayLogEntry($row, $idtoname)
+{
$result = "";
- $result .= "
".$row->value->date.": ".truncate($row->value->title, 80)." (".$idtoname[$row->value->agencyID].")
";
- echo "
Title".$row->value->title."
".str_replace("\n","
",$row->value->description);
-if (isset($row->value->notes)) {
-$result .= "
Note: ".$row->value->notes;
-}
-$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)){
-$result .= "
Links/Documents
";
-foreach ($row->value->links as $link) {
- $result .= "- ".$link."
";
+ if (isset($row->value->links)) {
+ $result .= 'Links/Documents
";
+ }
+ $result .= "View original source... ID: " . strip_tags($row->value->docID) . "";
+ $result .= "
\n";
+ return $result;
}
- $result .= "";
-}
- $result .= "
View original source... ID: ".strip_tags($row->value->docID)."";
-$result .= "
";
-return $result;
-}
-