SITEMAP



"; //print_r($GLOBALS); //echo ""; /*********************************************** * CONTENIDO MODUL - OUTPUT * * Modulname : Sitemap * Author(s) : Nik Wyss * Copyright : None * Created : 14-01-2003 * Modified : 14-01-2003 ************************************************/ // Variablendeklarationen // Das Modul ist für eine ältere Contenido-VErsion - offensichtlich hießen Variablen damals anders... $cfgTab_cat_tree = $cfg['tab']['cat_tree']; $cfgTab_cat = $cfg['tab']['cat']; $cfgTab_cat_lang = $cfg['tab']['cat_lang']; $amountLevel = "-2"; $newcat = "1"; $color = array("#FFFFFF", "#FFFFFF","#FFFFFF","#ddddff"); function sitemap($newcat=0){ global $lang, $client, $amountLevel, $color, $startLevel, $cfgTab_cat, $cfgTab_cat_tree, $cfgTab_cat_lang; $db = new DB_Contenido; $sql = "SELECT * FROM $cfgTab_cat_tree AS A, $cfgTab_cat AS B, $cfgTab_cat_lang AS C WHERE A.idcat=B.idcat AND B.idcat=C.idcat AND C.idlang='$lang' AND B.idclient='$client' AND B.parentid =$newcat AND C.visible=1 ORDER by A.idtree"; $db->query($sql); $result = ""; while ($db->next_record()){ $lvl = $db->f("level"); if ($lvl==1){$result.="";} $colorID=$lvl-$startLevel; if ($colorID > count($color)-1){$colorID=count($color)-1;} $result.= ""; } $result.= "
".$db->f("name")."".sitemap($db->f("idcat"))."
"; return($result); } $sql = "SELECT level FROM $cfgTab_cat_tree WHERE idcat=$newcat"; $db->query($sql); $db->next_record(); $startLevel = $db->f("level"); $amountLevel += $startLevel; if ($newcat==0){$amountLevel--;} echo sitemap($newcat); ?>