Ich habe diese Liste von Kategroien erstellt:
Code: Alles auswählen
<?php
$user_typ = 1;
if ($FORM['USR_TYP'] != 0) {
$user_typ = $FORM['USR_TYP'];
}
echo '<table width="583px">';
$cat = OOCategory::getCategoryById($this->getValue(category_id));
foreach ($cats = $cat->getChildren() as $lev1):
$catId = $lev1->getId();
if ($user_typ >= $lev1->getTypeId()) {
$lev1Size = sizeof($lev1->getChildren());
print '<tr ><td colspan="4" valign="middle" height="30px"><h1>'.$lev1->getName().'</h1></td></tr>';
$lev1Size = sizeof($lev1->getChildren());
if($lev1Size != "0"):
foreach ($lev1->getChildren() as $lev2):
if ($lev2->getValue("file") == "") // wenn kein bild "kein bild" anzeigen
{
if ($lev2->getDescription() != "") // wenn kein Text dann weiter
{
echo '<tr bgcolor="#ffeeaa" >';
if ("REX_VALUE[1]" != "")
{
print '<td width="1px" style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px" valign="middle"><a href="'.$lev2->getUrl().'"><img src="'.$REX['HTDOCS_PATH'].'index.php?rex_resize=REX_VALUE[1]w__keinbild.gif" style="border: 0px none" /></a> </td>';
}
print '<td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; margin-left: 5px"><a href="'.$lev2->getUrl().'"><strong>'.$lev2->getName("file").'</strong></a></td><td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; margin-left: 5px" ><a href="'.$lev2->getUrl().'"> '.$lev2->getDescription().'</a></td><td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; text-align: center"><a href="'.$lev2->getUrl().'"><h6>'."REX_VALUE[2]".'</h6></a></td>';
echo '</tr>';
}
}
else
{
if ($lev2->getDescription() != "") // wenn kein text dann weiter und nicht anzeigen
{
echo '<tr bgcolor="#ffeeaa" valign="middle">';
if ("REX_VALUE[1]" != "")
{
print '<td width="1px" style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px" valign="middle"><a href="'.$lev2->getUrl().'"><img src="'.$REX['HTDOCS_PATH'].'index.php?rex_resize=REX_VALUE[1]w__'.$lev2->getValue("file").'" style="border: 0px none" /></a> </td>';
}
// print '<td><a href="'.$lev2->getUrl().'"><strong>'.$lev2->getName("file").'</strong> '.$lev2->getDescription().' <h6>...mehr Infos</h6></a></td>';
print '<td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; margin-left: 5px"><a href="'.$lev2->getUrl().'"><strong>'.$lev2->getName("file").'</strong></a></td><td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; margin-left: 5px"><a href="'.$lev2->getUrl().'"> '.$lev2->getDescription().'</a></td><td style="border-bottom-color: #ffffcc; border-bottom-style: solid; border-bottom-width: 7px; text-align: center" ><a href="'.$lev2->getUrl().'"><h6>'."REX_VALUE[2]".'</h6></a></td>';
echo '</tr>';
}
}
endforeach;
endif;
}
endforeach;
echo '</table>';
?>
VIELEN DANK!!!!!!
NetAble