/* NOTE: Only one level of submenus allowed // This is the main menu that will be shown in buttons $main_menu = array ('Home','Menu1','Menu2','Menu3','Menu4'); // This is the list of submenus $menu_arr[Home][submenu] = array(); $menu_arr[Menu1][submenu] = array('Menu11','Menu12','Menu13'); $menu_arr[Menu2][submenu] = array('Menu21','Menu22','Menu23'); $menu_arr[Menu3][submenu] = array('Menu31','Menu32','Menu33'); $menu_arr[Menu4][submenu] = array('Menu41','Menu42','Menu43'); // This is the link of the various menus $menu_link[Home] = 'index.php'; $menu_link[Menu1] = 'menu1.php'; $menu_link[Menu2] = 'menu2.php'; $menu_link[Menu3] = 'menu3.php'; $menu_link[Menu4] = 'menu4.php'; $menu_link[Menu11] = 'menu11.php'; $menu_link[Menu12] = 'menu12.php'; $menu_link[Menu13] = 'menu13.php'; $menu_link[Menu21] = 'menu21.php'; $menu_link[Menu22] = 'menu22.php'; $menu_link[Menu23] = 'menu23.php'; $menu_link[Menu31] = 'menu31.php'; $menu_link[Menu32] = 'menu32.php'; $menu_link[Menu33] = 'menu33.php'; $menu_link[Menu41] = 'menu41.php'; $menu_link[Menu42] = 'menu42.php'; $menu_link[Menu43] = 'menu43.php'; */ /**** Do not edit beyond this unless you are absolutely sure ****/ if(isset($_POST[menuColor]) && !empty($_POST[menuColor])){ $menuColor = $_POST[menuColor]; }elseif(isset($_GET[menuColor]) && !empty($_GET[menuColor])){ $menuColor = $_GET[menuColor]; }else{ $menuColor='fb0'; } if(isset($_POST[hoverColor]) && !empty($_POST[hoverColor])){ $hoverColor = $_POST[hoverColor]; }elseif(isset($_GET[hoverColor]) && !empty($_GET[hoverColor])){ $hoverColor = $_GET[hoverColor]; }else{ $hoverColor='26a'; } $menuImage_right = $menuColor.'-right.gif'; $menuImage_left = $menuColor.'-left.gif'; $hoverImage_right = $hoverColor.'-right.gif'; $hoverImage_left = $hoverColor.'-left.gif'; $var = ' body{ margin: 0px; } #navigation{ //margin: 5px; padding: 0px; } #navigation a { color: #000; background: #'.$menuColor.' url("../images/'.$menuImage_left.'") left top no-repeat; text-decoration: none; padding-left: 10px } #navigation a span { background: url("../images/'.$menuImage_right.'") right top no-repeat; padding-right: 10px } #navigation a, #navigation a span { display: block; float: left } /* Commented backslash hack hides rule from IE5-Mac \*/ #navigation a, #navigation a span { float: none } /* End IE5-Mac hack */ #navigation a:hover { color: #fff; background: #'.$hoverColor.' url("../images/'.$hoverImage_left.'") left top no-repeat; text-decoration: none; padding-left: 10px } #navigation a:hover span { background: url("../images/'.$hoverImage_right.'") right top no-repeat; padding-right: 10px } /* End */ #navigation ul { list-style: none; padding: 0; margin: 0; } #navigation li { list-style: none; /* Add to add this extra line --- Gayatri*/ float: left; margin: 0; padding: 0; } /* This section is hadded by Gayatri. This will mark the current link */ #navigation li#here a { color: #fff; background: #'.$hoverColor.' url("../images/'.$hoverImage_left.'") left top no-repeat; text-decoration: none; padding-left: 10px } #navigation li#here a span { background: url("../images/'.$hoverImage_right.'") right top no-repeat; padding-right: 10px } .submenu,.border { height:1.5em; background: #'.$hoverColor.'; color: #FFFFFF; //margin-left: 5px; padding: 0px; } .submenu a{ color: #'.$menuColor.'; font-weight: bold; } .submenu a:hover{ color: #ffffff; } '; if($_GET[cmd] == "design"){ show_example(); } if($_GET[cmd] == "css"){ print $var; } /***** FUNCTIONS *****/ // This will highlight according to the page where you are. function navigation($type="top"){ global $main_menu,$menu_arr,$menu_link; $current_link = $GLOBALS[PHP_SELF]; $current_link = preg_replace("/^.*\//","",$current_link); // if it is the design mode if($current_link == "menu.php") $current_link = "menu11.php"; // this line is only for the sreeBuilder generated appln // REMOVE this line for all other applns if($current_link == "manageTableMain.php") $current_link = $current_link.'?table_name='.$_GET[table_name]; $in_main_menu = 0; foreach($menu_link as $menu=>$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 = '