/** * * @package redaxo3 * @version $Id: index.php,v 1.30 2006/03/22 15:30:41 kristinus Exp $ */ include "../redaxo/include/functions/function_rex_mquotes.inc.php"; @ini_set( 'arg_separator.input', '&'); @ini_set( 'arg_separator.output', '&'); unset($REX); $REX['REDAXO'] = false; $REX['GG'] = true; $REX['HTDOCS_PATH'] = "../"; include "../redaxo/include/master.inc.php"; function get_aticle_params($article_id){ ## Check if unterpunkte $sql="SELECT id, catname FROM rex_article WHERE re_id=".$article_id." AND status=1 AND catprior<>0 ORDER BY catprior, prior"; $res=mysql_query($sql); if ($res===false) { $return['subs']=0; $return['subs_width']=0; }else{ $return['subs']=mysql_num_rows($res); $return['unternavi_height']=$return['subs']*19; $return['unternavi_width']=220; $i=0; while (list($id,$name)=mysql_fetch_row($res)){ $i++; $return['unternavi_elements'][$i]['id']=$id; $return['unternavi_elements'][$i]['name']=$name; } } return $return; } $s=new sql; echo " function initWebDDM(){ var menu = { 'position':'relative', 'top':0, 'left':0, 'width':'100%', 'height':200, 'expand_menu':'auto', 'items':{ 'top':0, 'left':0, 'width':340, 'height':200, 'background-item':{ 'width':'100%', 'height':200, 'left':0, 'top':0, 'class':'container' }, "; $sql="SELECT id, catname FROM rex_article WHERE re_id=0 AND status=1 AND catprior<>0 ORDER BY catprior, prior"; $res=mysql_query($sql); if ($res===false){ echo "return; }";exit; } $i=0; $all=mysql_num_rows($res); while (list($id, $name)=mysql_fetch_row($res)){ $i++; $parameters__=get_aticle_params($id); if ($parameters__['subs']){ echo " $i:{ 'content':'
', 'content_menuopen':'', 'cursor': 'hand', 'width':250, 'height':19, 'offsetLeft':0, 'offsetTop':".($i==1?"0":"20").", 'class':'first_level_off', 'class_menuopen':'first_level_on', 'items':{ 'top':0, 'left':70, 'width':{$parameters__['unternavi_width']}, 'height':{$parameters__['unternavi_height']}, 'background-item':{ 'width':{$parameters__['unternavi_width']}, 'height':".($parameters__['unternavi_height']+10).", 'left':0, 'top':0, 'class':'container_unternavigation' }, "; foreach ($parameters__['unternavi_elements'] as $sub_no=>$info__){ echo " $sub_no:{ 'content':'', 'content_rollover':'', 'cursor': 'hand', 'width':{$parameters__['unternavi_width']}, 'height':19, 'offsetLeft':0, 'offsetTop':".($sub_no==1?"6":"19").", 'class':'first_level_off', 'class_rollover':'first_level_on' }"; echo ($sub_no!=$parameters__['subs']?",":""); } echo " } }"; }else{ echo " $i:{ 'content':'', 'content_rollover':'', 'cursor': 'hand', 'width':250, 'height':19, 'offsetLeft':0, 'offsetTop':".($i==1?"0":"20").", 'class':'first_level_off', 'class_rollover':'first_level_on' }"; } echo ($i!=$all?",":""); } echo " } }; var WebDDM_mainmenu = new WebDDM('navigation', menu); } "; ?>