$link){ if($current_link == $link){ $found_menu = $menu; if(in_array($found_menu,$main_menu)) $in_main_menu = 1; } } if($in_main_menu == 1){ $top = ''; if(sizeof($menu_arr[$found_menu][submenu])>0){ for($i=0;$i'.$menu_arr[$found_menu][submenu][$i].'|'."\n"; } $bottom = preg_replace("/\|$/",'',$bottom); $bottom = preg_replace("/\|/",'» ',$bottom); } }else{ $top = ''; for($i=0;$i'.$menu_arr[$main_menu_name][submenu][$i].'|'."\n"; } } $bottom = preg_replace("/\|$/",'',$bottom); $bottom = preg_replace("/\|/",'» ',$bottom); } switch($type){ case "bottom": return $bottom; default: return $top; } } function show_menu(){ return'
'; } function show_example(){ global $var,$menuColor,$hoverColor; require_once('/usr/local/lib/php/Smarty/Smarty.class.php'); // Smarty Template Engine $tpl =& new Smarty; $tpl->template_dir = '.'; $tpl->compile_dir = '/tmp'; $tpl->debugging = false; $tpl->assign('menuColor',$menuColor); $tpl->assign('hoverColor',$hoverColor); $tpl->assign('MENU',show_menu()); $tpl->assign('URL','http://www.projects.ptp/css-menu/menu.php?menuColor='.$menuColor.'&hoverColor='.$hoverColor); $tpl->assign('HTML_CODE',htmlentities(show_menu())); $tpl->assign('CSS',$var); $tpl->assign('STYLESHEET',htmlentities($var)); $tpl->display('web-safe-colors.htm'); } ?>