for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
$row = pg_fetch_array ($sth, $nr);
- $body = ereg_replace ("<", "<",
- ereg_replace (">", ">",
- ereg_replace ("&", "&",
- str_replace ("\\\n", "",
- str_replace ("\r", "",
- $row['body'])))));
+ $body = str_replace(array('<','>','&',"\\\n","\r"),
+ array('<', '>', '&', '', ''),
+ $row['body']);
$date = explode (" ", $row['created']);
$time = explode (":", $date[1]);
$tz = substr($time[2], 2);
}
<protect>
- $adv_index = '<div align="center"><script type="text/javascript"><!-- google_ad_client = "pub-3134552371074068";
-/* InfoCon Log Index */
-google_ad_slot = "0940423249";
-google_ad_width = 728;
-google_ad_height = 90;
-//-->
-</script>
-<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script></div>';
-
- $adv_entry = '<div align="center"><script type="text/javascript"><!-- google_ad_client = "pub-3134552371074068";
-/* InfoCon Log Entry */
-google_ad_slot = "7571618571";
-google_ad_width = 728;
-google_ad_height = 90;
-//-->
-</script>
-<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script></div>';
-
$kontaktlink = '<p style="margin-left: -20px;"><strong><a href="../kontaktform.html">Zum Kontakformular</a></strong></p>';
</protect>
addslashes ($_SERVER[QUERY_STRING]));
} else {
$query = "SELECT * FROM <logbook> WHERE public = 1 " .
- "ORDER BY created DESC LIMIT 5";
+ "ORDER BY created DESC LIMIT 8";
}
$sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
printf ("<div id=\"logcontent\">%s</div>", str_replace ("\\\n", "", str_replace ("\r", "", $row['body'])));
echo ("\n<div class=\"logfoot\">");
echo ("<div class=\"logfootleft\">");
- echo add_social ("http://infocon.infodrom.org/logbook/".$url, $row['teaser']);
+# echo add_social ("http://infocon.infodrom.org/logbook/".$url, $row['teaser']);
echo ("</div>");
echo ("<div class=\"logfootright\">");
printf ("%s | %s | <a href=\"%s\">permanent link</a>", $date, $row['category'], $url);
echo ("</div></div>");
echo ("</div></div>");
- if ($nr == 1)
+ if ($nr == 0 || $nr == 4 || $nr == 7)
echo $adv_index;
if (strlen ($_SERVER[QUERY_STRING]) > 0)
echo $kontaktlink;