Das Schließen der Tabelle echo '</table></div><br>'; muss innerhalb der if Abfrage eingebaut werden.
Hier der komplette angepasste Code:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* REFERENZ MODUL / ARTIKELLISTE
*
* Artikelliste mit Img 1, Head 1, Head 2
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* Author : Jan Lengowski
* Copyright : four for business AG
* Created : 15-08-2002
* Modified : 16-08-2002
* Modified : 10-06-2005 Florian Behrendt Fehler beseitigt
************************************************/
// second db class instance
$db2 = new DB_Contenido;
// selected category
$selcat = "CMS_VALUE[0]";
if($selcat!="0" && $selcat!=""){
// select all articles in category widthout start article
$query = "SELECT ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1' ORDER BY CATART.idart DESC";
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get id's of sub articles
while ($db->next_record()) {
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
} // end while
// loop through subarticles
echo '<div style="padding-top:10px; padding-left:10px;">
<table width="153" border="0" cellspacing="0" cellpadding="0">
<tr><td height="30" colspan="2"><img src="upload/bilder/navi_news.gif"></td></tr>
';
if (is_array($articleID)) {
foreach ($articleID as $key => $value) {
// select all CMS variables of the article
$sql = "SELECT * FROM ".$cfg["tab"]["content"]." WHERE idartlang = '$value' AND idtype = '1' AND typeid = '1'";
$db->query($sql);
$db->next_record();
$head = $db->f("value");
if ( strlen($head) > "CMS_VALUE[3]") {
$head = substr($head, 0, "CMS_VALUE[3]");
$head .= '..';
}
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
//
// ausgabe mit strip_tags modifiziert - keine html tags werden ausgegeben
//
echo '<tr><td style="padding-top:2px; padding-left:2px;" colspan="2" class="text" height="22" style="border: 0px; border-top:1px; border-bottom:0px; border-color: #000000; border-style: solid; background-color: #ffffff"><a href="'.$link.'"><font class=text>'.strip_tags(urldecode($db->f("value"))).'</font></a></td></tr>';
} // end foreach
unset($headline);
unset($text);
} //end if (is_array)
// folgende Zeile innerhalb der If Abfrage stehen, sonst wird Layout zerschossen wenn Liste leer!
echo '<!-- Ende Artikelliste --></table></div><br>';
} // end if($selcat!="0" && $selcat!""
//echo '</table></div><br>';
?>
Florian[/b]