Aktuelles
if ($shortNewsLimit >= "1")
{
$shortNewsLimitsql = "LIMIT ".$shortNewsLimit;
}
else
{
$shortNewsLimitsql = "";
}
$news_abfrage = "SELECT * FROM news WHERE kat = \"$newsKat\" ORDER BY datum desc ".$shortNewsLimitsql;
$news_ergebnis = $db->query($news_abfrage);
if ($news_ergebnis > "0")
{
foreach ($news_ergebnis as $row)
{
$news_id = $row['id'];
$news_titel = isnempty($row['titel']);
$news_text = isnempty($row['text']);
$news_text = strip_tags($news_text, '
'); $news_bild = isnempty_img($row['bild'], $row['bild_small'], $link_shortnews."?newsId=".$news_id, "uploadfiles/news/", "", "", "#wrap"); $news_datum = '
'); $news_bild = isnempty_img($row['bild'], $row['bild_small'], $link_shortnews."?newsId=".$news_id, "uploadfiles/news/", "", "", "#wrap"); $news_datum = '
Eingetragen am: '.date("d.m.Y", $row['datum']).'
'; // Nach xxx Zeichen Text abbrechen $maxlen = 200; if(strlen($news_text) > $maxlen){ $news_text = substr($news_text, 0, $maxlen); $news_text = preg_replace('#[^\s]*$#s', '', strip_tags($news_text)) . ''; $news_text = substr($news_text, 0, -1); $news_text = $news_text.'... » weiterlesen'; } // Template laden include("db/news_short_tmpl.php"); } } else { echo( 'Leider wurden bisher noch keine Texte hinterlegt!' ); } ?>