Den von mir hinzugefügten Code habe ich durch ### hervorgehoben.
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
************************************************/
// 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()) {
if (!isStartArticle($db->f("idartlang"), $selcat, $lang))
{
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
}
} // end while
// loop through subarticles
echo '
<table width="165" border="0" cellspacing="0" cellpadding="0">
<tr><td height="30" colspan="2" ></td></tr>
<tr><td height="21" width="22" style="border: 0px; border-top:1px; border-bottom:1px; border-color: #F7C473; border-style: solid; background-color: #FCF2D5"><img src="images/wuerfel.gif" width="22" height="21" border="0"></td>
<td width="143" style="border: 1px; border-left:0px; border-color: #F7C473; border-style: dashed; background-color: #FCF2D5; padding-left:10px" class="punkte">CMS_VALUE[2]</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 .= '..';
}
################################################################################
$sql2 = "SELECT * FROM ".$cfg["tab"]["con_art_lang"]." WHERE idart = '$value'";
$db2->query($sql2);
$art_title = $db2->f("title");
################################################################################
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
echo '<tr><td colspan="2" class="text" height="22" style="border: 1px; border-top:0px; border-color: #F7C473; border-style: dashed; background-color: #FCF2D5; padding-left:10px"><a href="'.$link.'">'.$art_title.'</a></td></tr>';
} // end while
unset($headline);
unset($text);
} // end foreach
} // end if (is_array)
echo '</table><br>';
?>