Solved

Advice on how to reduce manual hard-coding

Posted on 2008-06-23
8
224 Views
Last Modified: 2008-06-24
Hi guys hope u r all well.
Im calling on you nice kind gurus to lend a hand.
I have the following included funcions php file that works the way I want.
The problem I have is that for every case entry in this file, im having to hard code that particular entry.
So the problem is TIME...it is extremely time consuming to update this file with new additons and deletions of case entry statements.
Ideally, id love to be able to re-engineer this file so that I dont have to hard code as much, and that if i add any new additions or delete any, then the re-engineered version would cater for these.
Which is why im calling on you creative people to help me out.
Id like the SAME functionality as what I currently have, but just done in a more efficient, more automated way.
Any help greatly appreciated guys. Thank you :>)

My php file I have attached for your scrutiny as a code snippet. This is the entire file.
<?php
 
 
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//	BUILDING MENU 2: BUILDING MENU 2: BUILDING MENU 2: BUILDING MENU 2: 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
						/*	............................................................
							Based on User Selection when selecting a Menu 1 Item. We 
							will use a php function to read the contents of the current 
							directory. We will build menu 2 according to what link the 
							user clicked on in menu 1. Upon user selection, another php 
							function will match any files that contain part of the name 
							in the link selected from menu 1.
							..........................................................*/
 
						/*	............................................................	 
							Step 1: Set up the Links Array:
							..........................................................*/
 
/*
$menu2_it_pages = array (
	'Scripting' => 'menu2_it_scripting.php',
	'Microsoft' => 'menu2_it_microsoft.php',
	'Unix' => 'menu2_it_unix.php',
	'Virtual' => 'menu2_it_virtualization.php',
	'ThinClient' => 'menu2_it_thinclient.php',                
	'Networking' => 'menu2_it_networking.php',
	'Databases' => 'menu2_it_databases.php',
	'Service' => 'menu2_it_service.php',
	'Projects' => 'menu2_it_projectmanagement.php',
	'DRP' => 'menu2_it_drp.php',
	'SOE' => 'menu2_it_soe.php',                
	'Storage' => 'menu2_it_storage.php',
	'Packaging' => 'menu2_it_packaging.php',
	'Security' => 'menu2_it_security.php',
	'Performance' => 'menu2_it_performance.php', 
	'Auditing' => 'menu2_it_auditing.php',                    
	'Messaging' => 'menu2_it_messaging.php',   
	'CMSWiki' => 'menu2_it_cmswiki.php',  
	'Hware' => 'menu2_it_hware.php', 
	'Sware' => 'menu2_it_sware.php',                                                                                                 
	'Miscellaneous' => 'menu2_it_miscellaneous.php',                                               
);	
*/	
 
						/*	............................................................	 
							The following snippet has replaced the above, and thus 
							replaced the need to hard code filenames. The advantage now 
							is that you can add and remove files freely on disk and the 
							php will take care of it automatically.
							..........................................................*/
						/*	............................................................
							$dh2 = opendir('./menus/menu2/');
							Target this ('.') current directory.
							Open the current directory so you can then read in the 
							filenames...	
							..........................................................*/
							
$dh2 = opendir('.');	
if (!$dh2) die('Could not open dir.');
 
						/*	............................................................
							Create/define an array in order to hold the filenames...	
							..........................................................*/	
																										
$menu2_pages = array();
 
						/*	............................................................
							While reading a list of files into the array...and provided 
							there are files in the array...	
							..........................................................*/	
									
while (($f = readdir($dh2)) !== FALSE){			
		
						/*	............................................................
							Start conditional statements with switch:
							..........................................................*/		
																			
	// switch ($_SERVER['PHP_SELF']){					
							
						/*	............................................................			   	
							If the user selects the IT link, then create the filename 
							array for all IT files.
							Define the array as $menu2_pages
							While reading the directory and the variable that stores 
							filenames is not zero,If the filenames start with menu2_it, 
							then populate the $f variable with these filenames,
							Excluding the php extension and the menu2_it starting bit.
							..........................................................*/														
							
						/*	............................................................			   	
							Find all files in current directory that match following...
							Dump them in the $menu2_pages array for use by the
							function menu2_navlinks.
							..........................................................*/
	                       
 
	switch ($_SERVER['PHP_SELF']){
		
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
//	MENU 2: MENU 2: MENU 2: MENU 2: MENU 2: MENU 2: MENU 2:
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++			
		//	Build Menu 2: Selection is a link from menu 1.
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++			
		
		// _______________________________________________________________________
		case '/simeswiki/menu1_it.php':	     
//		case '/simeswiki/menu3_it_auditing_users':                  
 
			if (preg_match('#^menu2_it_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
			
		// _______________________________________________________________________
		case '/simeswiki/menu1_work.php':	                       
 
			if (preg_match('#^menu2_work_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
 
		// _______________________________________________________________________
		case '/simeswiki/menu1_art.php':	                       
 
			if (preg_match('#^menu2_art_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
			
		// _______________________________________________________________________
		case '/simeswiki/menu1_music.php':	                       
 
			if (preg_match('#^menu2_music_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
			
		// _______________________________________________________________________
		case '/simeswiki/menu1_personal.php':	                       
 
			if (preg_match('#^menu2_personal_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;				
										
			// _______________________________________________________________________
		case '/simeswiki/menu1_handy.php':	                       
 
			if (preg_match('#^menu2_handy_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;								
 
			// _______________________________________________________________________
		case '/simeswiki/menu1_scrap.php':	                       
 
			if (preg_match('#^menu2_scrap_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;
 
			// _______________________________________________________________________
		case '/simeswiki/menu1_about.php':	                       
 
			if (preg_match('#^menu2_about_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;											
 
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++
			//	Rebuild Menu 2: Selection is a link from menu 2 down.
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++		
			
			
							// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
							// IT: MenuX_it: If selection is menu2_it_ or menu3_it_
							// or menu3_it_, then rebuild menu2_it
							// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
		// 1 of 22: Auditing:
		// _______________________________________________________________________
 
		// menu2:
		case '/simeswiki/menu2_it_auditing.php':
 
		// menu3:
		case '/simeswiki/menu3_it_auditing_computers.php':	
		case '/simeswiki/menu3_it_auditing_disk.php':	
		case '/simeswiki/menu3_it_auditing_groups.php':	
		case '/simeswiki/menu3_it_auditing_networking.php':	
		case '/simeswiki/menu3_it_auditing_users.php':									
		case '/simeswiki/menu3_it_auditing_vmware.php':	
 
		// menu4:
		case '/simeswiki/menu4_it_auditing_computers_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_computers_documentswk.php':
		case '/simeswiki/menu4_it_auditing_computers_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_computers_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_computers_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_computers_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_computers_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_computers_webcasts.php':
		case '/simeswiki/menu4_it_auditing_computers_focusHERE.php':		
		case '/simeswiki/menu4_it_auditing_disk_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_disk_documentswk.php':
		case '/simeswiki/menu4_it_auditing_disk_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_disk_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_disk_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_disk_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_disk_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_disk_webcasts.php':	
		case '/simeswiki/menu4_it_auditing_disk_focusHERE.php':								
		case '/simeswiki/menu4_it_auditing_groups_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_groups_documentswk.php':
		case '/simeswiki/menu4_it_auditing_groups_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_groups_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_groups_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_groups_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_groups_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_groups_webcasts.php':		
		case '/simeswiki/menu4_it_auditing_groups_focusHERE.php':							
		case '/simeswiki/menu4_it_auditing_networking_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_networking_documentswk.php':
		case '/simeswiki/menu4_it_auditing_networking_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_networking_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_networking_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_networking_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_networking_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_networking_webcasts.php':	
		case '/simeswiki/menu4_it_auditing_networking_focusHERE.php':								
		case '/simeswiki/menu4_it_auditing_users_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_users_documentswk.php':
		case '/simeswiki/menu4_it_auditing_users_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_users_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_users_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_users_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_users_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_users_webcasts.php':		
		case '/simeswiki/menu4_it_auditing_users_focusHERE.php':							
		case '/simeswiki/menu4_it_auditing_vmware_documentskb.php':	
		case '/simeswiki/menu4_it_auditing_vmware_documentswk.php':
		case '/simeswiki/menu4_it_auditing_vmware_imageskb.php':	
		case '/simeswiki/menu4_it_auditing_vmware_imageswk.php':	
		case '/simeswiki/menu4_it_auditing_vmware_miscellaneous.php':	
		case '/simeswiki/menu4_it_auditing_vmware_scriptskb.php':	
		case '/simeswiki/menu4_it_auditing_vmware_scriptswk.php':	
		case '/simeswiki/menu4_it_auditing_vmware_webcasts.php':		
		case '/simeswiki/menu4_it_auditing_vmware_focusHERE.php':						
 
		
		// 2 of 22: CMSWiki:		
		// _______________________________________________________________________						
 
		// menu2:			
		case '/simeswiki/menu2_it_cmswiki.php':
		
		// menu3:		
		case '/simeswiki/menu3_it_cmswiki_joomla.php':
		case '/simeswiki/menu3_it_cmswiki_mediawiki.php':								
		
		// menu4:
		case '/simeswiki/menu4_it_cmswiki_joomla_documentskb.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_documentswk.php':
		case '/simeswiki/menu4_it_cmswiki_joomla_imageskb.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_imageswk.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_miscellaneous.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_scriptskb.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_scriptswk.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_webcasts.php':	
		case '/simeswiki/menu4_it_cmswiki_joomla_focusHERE.php':			
		case '/simeswiki/menu4_it_cmswiki_mediawiki_documentskb.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_documentswk.php':
		case '/simeswiki/menu4_it_cmswiki_mediawiki_imageskb.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_imageswk.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_miscellaneous.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_scriptskb.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_scriptswk.php':	
		case '/simeswiki/menu4_it_cmswiki_mediawiki_webcasts.php':
		case '/simeswiki/menu4_it_cmswiki_mediawiki_focusHERE.php':			
		
						
		// 3 of 22: Databases:	
		// _______________________________________________________________________											
 
		// menu2:	
		case '/simeswiki/menu2_it_databases.php':		
		
		// menu3:											                      
		case '/simeswiki/menu3_it_databases_mysql.php':	
		
		// menu4:		
		case '/simeswiki/menu4_it_databases_mysql_documentskb.php':	
		case '/simeswiki/menu4_it_databases_mysql_documentswk.php':
		case '/simeswiki/menu4_it_databases_mysql_imageskb.php':	
		case '/simeswiki/menu4_it_databases_mysql_imageswk.php':	
		case '/simeswiki/menu4_it_databases_mysql_miscellaneous.php':	
		case '/simeswiki/menu4_it_databases_mysql_scriptskb.php':	
		case '/simeswiki/menu4_it_databases_mysql_scriptswk.php':	
		case '/simeswiki/menu4_it_databases_mysql_webcasts.php':	
		case '/simeswiki/menu4_it_databases_mysql_focusHERE.php':		
										
		
		// 4 of 22: Drp:	
		// _______________________________________________________________________		
 
		// menu2:						
		case '/simeswiki/menu2_it_drp.php':		
		
		// menu3:
		case '/simeswiki/menu3_it_drp_livestaterecovery.php':		
		case '/simeswiki/menu3_it_drp_tivoli.php':						
									
		// menu4:
		case '/simeswiki/menu4_it_drp_livestaterecovery_documentskb.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_documentswk.php':
		case '/simeswiki/menu4_it_drp_livestaterecovery_imageskb.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_imageswk.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_miscellaneous.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_scriptskb.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_scriptswk.php':	
		case '/simeswiki/menu4_it_drp_livestaterecovery_webcasts.php':
		case '/simeswiki/menu4_it_drp_livestaterecovery_focusHERE.php':		
		case '/simeswiki/menu4_it_drp_tivoli_documentskb.php':	
		case '/simeswiki/menu4_it_drp_tivoli_documentswk.php':
		case '/simeswiki/menu4_it_drp_tivoli_imageskb.php':	
		case '/simeswiki/menu4_it_drp_tivoli_imageswk.php':	
		case '/simeswiki/menu4_it_drp_tivoli_miscellaneous.php':	
		case '/simeswiki/menu4_it_drp_tivoli_scriptskb.php':	
		case '/simeswiki/menu4_it_drp_tivoli_scriptswk.php':	
		case '/simeswiki/menu4_it_drp_tivoli_webcasts.php':	
		case '/simeswiki/menu4_it_drp_tivoli_focusHERE.php':								
		
			
		// 5 of 22: Hware:	
		// _______________________________________________________________________		
 
		// menu2:						
		case '/simeswiki/menu2_it_hware.php':				
		
		// menu3:			
		case '/simeswiki/menu3_it_hware_dell.php':			
		case '/simeswiki/menu3_it_hware_hp.php':			
		case '/simeswiki/menu3_it_hware_ibm.php':									
			
		// menu4:
		case '/simeswiki/menu4_it_hware_dell_documentskb.php':	
		case '/simeswiki/menu4_it_hware_dell_documentswk.php':
		case '/simeswiki/menu4_it_hware_dell_imageskb.php':	
		case '/simeswiki/menu4_it_hware_dell_imageswk.php':	
		case '/simeswiki/menu4_it_hware_dell_miscellaneous.php':	
		case '/simeswiki/menu4_it_hware_dell_scriptskb.php':	
		case '/simeswiki/menu4_it_hware_dell_scriptswk.php':	
		case '/simeswiki/menu4_it_hware_dell_webcasts.php':	
		case '/simeswiki/menu4_it_hware_dell_multipagekb.php':
		case '/simeswiki/menu4_it_hware_dell_popupskb.php':
		case '/simeswiki/menu4_it_hware_dell_focusHERE.php':
		case '/simeswiki/menu4_it_hware_ibm_documentskb.php':	
		case '/simeswiki/menu4_it_hware_ibm_documentswk.php':
		case '/simeswiki/menu4_it_hware_ibm_imageskb.php':	
		case '/simeswiki/menu4_it_hware_ibm_imageswk.php':	
		case '/simeswiki/menu4_it_hware_ibm_miscellaneous.php':	
		case '/simeswiki/menu4_it_hware_ibm_scriptskb.php':	
		case '/simeswiki/menu4_it_hware_ibm_scriptswk.php':	
		case '/simeswiki/menu4_it_hware_ibm_webcasts.php':	
		case '/simeswiki/menu4_it_hware_ibm_focusHERE.php':	
		case '/simeswiki/menu4_it_hware_hp_documentskb.php':	
		case '/simeswiki/menu4_it_hware_hp_documentswk.php':
		case '/simeswiki/menu4_it_hware_hp_imageskb.php':	
		case '/simeswiki/menu4_it_hware_hp_imageswk.php':	
		case '/simeswiki/menu4_it_hware_hp_miscellaneous.php':	
		case '/simeswiki/menu4_it_hware_hp_scriptskb.php':	
		case '/simeswiki/menu4_it_hware_hp_scriptswk.php':	
		case '/simeswiki/menu4_it_hware_hp_webcasts.php':	
		case '/simeswiki/menu4_it_hware_hp_focusHERE.php':											
					
			
		// 6 of 22: Infrastructure:	
		// _______________________________________________________________________		
 
		// menu2:						
		case '/simeswiki/menu2_it_infrastructure.php':
		
		// menu3:			
		case '/simeswiki/menu3_it_infrastructure_cml-swd.php':		
					
		// menu4:
		case '/simeswiki/menu4_it_infrastructure_cml-swd_documentskb.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_documentswk.php':
		case '/simeswiki/menu4_it_infrastructure_cml-swd_imageskb.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_imageswk.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_miscellaneous.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_scriptskb.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_scriptswk.php':	
		case '/simeswiki/menu4_it_infrastructure_cml-swd_webcasts.php':
		case '/simeswiki/menu4_it_infrastructure_cml-swd_focusHERE.php':		
							
		
		// 7 of 22: Messaging:	
		// _______________________________________________________________________		
					
		// menu2:						
		case '/simeswiki/menu2_it_messaging.php':		
		
		// menu3:			
		case '/simeswiki/menu3_it_messaging_im.php':		
		case '/simeswiki/menu3_it_messaging_outlook.php':											
		
		// menu4:	
		case '/simeswiki/menu4_it_messaging_im_documentswk.php':	
		case '/simeswiki/menu4_it_messaging_im_documentskb.php':
		case '/simeswiki/menu4_it_messaging_im_imageskb.php':	
		case '/simeswiki/menu4_it_messaging_im_imageswk.php':	
		case '/simeswiki/menu4_it_messaging_im_miscellaneous.php':	
		case '/simeswiki/menu4_it_messaging_im_scriptskb.php':	
		case '/simeswiki/menu4_it_messaging_im_scriptswk.php':	
		case '/simeswiki/menu4_it_messaging_im_webcasts.php':		
		case '/simeswiki/menu4_it_messaging_im_focusHERE.php':			
		case '/simeswiki/menu4_it_messaging_outlook_documentskb.php':	
		case '/simeswiki/menu4_it_messaging_outlook_documentswk.php':
		case '/simeswiki/menu4_it_messaging_outlook_imageskb.php':	
		case '/simeswiki/menu4_it_messaging_outlook_imageswk.php':	
		case '/simeswiki/menu4_it_messaging_outlook_miscellaneous.php':	
		case '/simeswiki/menu4_it_messaging_outlook_scriptskb.php':	
		case '/simeswiki/menu4_it_messaging_outlook_scriptswk.php':	
		case '/simeswiki/menu4_it_messaging_outlook_webcasts.php':	
		case '/simeswiki/menu4_it_messaging_outlook_focusHERE.php':		
										
 
		// 8 of 22: Microsoft:	
		// _______________________________________________________________________		
					
		// menu2:						
		case '/simeswiki/menu2_it_microsoft.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_microsoft_windowsxp.php':		
		case '/simeswiki/menu3_it_microsoft_windows2003.php':									
 
		// menu4:
		case '/simeswiki/menu4_it_microsoft_windows2003_documentskb.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_documentswk.php':
		case '/simeswiki/menu4_it_microsoft_windows2003_imageskb.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_imageswk.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_miscellaneous.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_scriptskb.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_scriptswk.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_webcasts.php':	
		case '/simeswiki/menu4_it_microsoft_windows2003_focusHERE.php':			
		case '/simeswiki/menu4_it_microsoft_windowsxp_documentskb.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_documentswk.php':
		case '/simeswiki/menu4_it_microsoft_windowsxp_imageskb.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_imageswk.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_miscellaneous.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_scriptskb.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_scriptswk.php':	
		case '/simeswiki/menu4_it_microsoft_windowsxp_webcasts.php':
		case '/simeswiki/menu4_it_microsoft_windowsxp_focusHERE.php':		
				
										
 
		// 9 of 22: Miscellaneous:	
		// _______________________________________________________________________		
					
		// menu2:						
		case '/simeswiki/menu2_it_miscellaneous.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_miscellaneous_notes.php':					
 
		// menu4:
		case '/simeswiki/menu4_it_miscellaneous_notes_documentskb.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_documentswk.php':
		case '/simeswiki/menu4_it_miscellaneous_notes_imageskb.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_imageswk.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_miscellaneous.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_scriptskb.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_scriptswk.php':	
		case '/simeswiki/menu4_it_miscellaneous_notes_webcasts.php':
		case '/simeswiki/menu4_it_miscellaneous_notes_focusHERE.php':		
														
 
		// 10 of 22: Network:	
		// _______________________________________________________________________		
					
		// menu2:						
		case '/simeswiki/menu2_it_network.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_network_cisco.php':					
		
		// menu4:	
		case '/simeswiki/menu4_it_network_cisco_documentskb.php':	
		case '/simeswiki/menu4_it_network_cisco_documentswk.php':
		case '/simeswiki/menu4_it_network_cisco_imageskb.php':	
		case '/simeswiki/menu4_it_network_cisco_imageswk.php':	
		case '/simeswiki/menu4_it_network_cisco_miscellaneous.php':	
		case '/simeswiki/menu4_it_network_cisco_scriptskb.php':	
		case '/simeswiki/menu4_it_network_cisco_scriptswk.php':	
		case '/simeswiki/menu4_it_network_cisco_webcasts.php':	
		case '/simeswiki/menu4_it_network_cisco_focusHERE.php':			
												
		
			
		// 11 of 22: Packaging:	
		// _______________________________________________________________________						
			
		// menu2:			
		case '/simeswiki/menu2_it_packaging.php':		
		
		// menu3:			
		case '/simeswiki/menu3_it_packaging_altiris.php':		
		case '/simeswiki/menu3_it_packaging_wise.php':													
 
		// menu4:
		case '/simeswiki/menu4_it_packaging_altiris_documentskb.php':	
		case '/simeswiki/menu4_it_packaging_altiris_documentswk.php':
		case '/simeswiki/menu4_it_packaging_altiris_imageskb.php':	
		case '/simeswiki/menu4_it_packaging_altiris_imageswk.php':	
		case '/simeswiki/menu4_it_packaging_altiris_miscellaneous.php':	
		case '/simeswiki/menu4_it_packaging_altiris_scriptskb.php':	
		case '/simeswiki/menu4_it_packaging_altiris_scriptswk.php':	
		case '/simeswiki/menu4_it_packaging_altiris_webcasts.php':	
		case '/simeswiki/menu4_it_packaging_altiris_focusHERE.php':			
		case '/simeswiki/menu4_it_packaging_wise_documentskb.php':	
		case '/simeswiki/menu4_it_packaging_wise_documentswk.php':
		case '/simeswiki/menu4_it_packaging_wise_imageskb.php':	
		case '/simeswiki/menu4_it_packaging_wise_imageswk.php':	
		case '/simeswiki/menu4_it_packaging_wise_miscellaneous.php':	
		case '/simeswiki/menu4_it_packaging_wise_scriptskb.php':	
		case '/simeswiki/menu4_it_packaging_wise_scriptswk.php':	
		case '/simeswiki/menu4_it_packaging_wise_webcasts.php':	
		case '/simeswiki/menu4_it_packaging_wise_focusHERE.php':		
										
 
		// 12 of 22: Performance:	
		// _______________________________________________________________________		
 
		// menu2:
		case '/simeswiki/menu2_it_performance.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_performance_disk.php':	
		case '/simeswiki/menu3_it_performance_memory.php':	
		case '/simeswiki/menu3_it_performance_network.php':	
		case '/simeswiki/menu3_it_performance_processor.php':									
 
		// menu4:
		case '/simeswiki/menu4_it_performance_disk_documentskb.php':	
		case '/simeswiki/menu4_it_performance_disk_documentswk.php':
		case '/simeswiki/menu4_it_performance_disk_imageskb.php':	
		case '/simeswiki/menu4_it_performance_disk_imageswk.php':	
		case '/simeswiki/menu4_it_performance_disk_miscellaneous.php':	
		case '/simeswiki/menu4_it_performance_disk_scriptskb.php':	
		case '/simeswiki/menu4_it_performance_disk_scriptswk.php':	
		case '/simeswiki/menu4_it_performance_disk_webcasts.php':	
		case '/simeswiki/menu4_it_performance_disk_focusHERE.php':		
		case '/simeswiki/menu4_it_performance_memory_documentskb.php':	
		case '/simeswiki/menu4_it_performance_memory_documentswk.php':
		case '/simeswiki/menu4_it_performance_memory_imageskb.php':	
		case '/simeswiki/menu4_it_performance_memory_imageswk.php':	
		case '/simeswiki/menu4_it_performance_memory_miscellaneous.php':	
		case '/simeswiki/menu4_it_performance_memory_scriptskb.php':	
		case '/simeswiki/menu4_it_performance_memory_scriptswk.php':	
		case '/simeswiki/menu4_it_performance_memory_webcasts.php':	
		case '/simeswiki/menu4_it_performance_memory_focusHERE.php':			
		case '/simeswiki/menu4_it_performance_network_documentskb.php':	
		case '/simeswiki/menu4_it_performance_network_documentswk.php':
		case '/simeswiki/menu4_it_performance_network_imageskb.php':	
		case '/simeswiki/menu4_it_performance_network_imageswk.php':	
		case '/simeswiki/menu4_it_performance_network_miscellaneous.php':	
		case '/simeswiki/menu4_it_performance_network_scriptskb.php':	
		case '/simeswiki/menu4_it_performance_network_scriptswk.php':	
		case '/simeswiki/menu4_it_performance_network_webcasts.php':	
		case '/simeswiki/menu4_it_performance_network_focusHERE.php':		
		case '/simeswiki/menu4_it_performance_processor_documentskb.php':	
		case '/simeswiki/menu4_it_performance_processor_documentswk.php':
		case '/simeswiki/menu4_it_performance_processor_imageskb.php':	
		case '/simeswiki/menu4_it_performance_processor_imageswk.php':	
		case '/simeswiki/menu4_it_performance_processor_miscellaneous.php':	
		case '/simeswiki/menu4_it_performance_processor_scriptskb.php':	
		case '/simeswiki/menu4_it_performance_processor_scriptswk.php':	
		case '/simeswiki/menu4_it_performance_processor_webcasts.php':
		case '/simeswiki/menu4_it_performance_processor_focusHERE.php':		
								
																															
 
		// 13 of 22: Projman:	
		// _______________________________________________________________________						
 
		// menu2:
		case '/simeswiki/menu2_it_projman.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_projman_myprojects.php':				
 
		// menu4:
		case '/simeswiki/menu4_it_projman_myprojects_documentskb.php':	
		case '/simeswiki/menu4_it_projman_myprojects_documentswk.php':
		case '/simeswiki/menu4_it_projman_myprojects_imageskb.php':	
		case '/simeswiki/menu4_it_projman_myprojects_imageswk.php':	
		case '/simeswiki/menu4_it_projman_myprojects_miscellaneous.php':	
		case '/simeswiki/menu4_it_projman_myprojects_scriptskb.php':	
		case '/simeswiki/menu4_it_projman_myprojects_scriptswk.php':	
		case '/simeswiki/menu4_it_projman_myprojects_webcasts.php':	
		case '/simeswiki/menu4_it_projman_myprojects_focusHERE.php':			
															
 
		// 14 of 22: Scripting:	
		// _______________________________________________________________________						
					
		// menu2:						
		case '/simeswiki/menu2_it_scripting.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_scripting_perl.php':	
		case '/simeswiki/menu3_it_scripting_php.php':	
		case '/simeswiki/menu3_it_scripting_vbscript.php':									
 
		// menu4:
		case '/simeswiki/menu4_it_scripting_perl_documentskb.php':	
		case '/simeswiki/menu4_it_scripting_perl_documentswk.php':
		case '/simeswiki/menu4_it_scripting_perl_imageskb.php':	
		case '/simeswiki/menu4_it_scripting_perl_imageswk.php':	
		case '/simeswiki/menu4_it_scripting_perl_miscellaneous.php':	
		case '/simeswiki/menu4_it_scripting_perl_scriptskb.php':	
		case '/simeswiki/menu4_it_scripting_perl_scriptswk.php':	
		case '/simeswiki/menu4_it_scripting_perl_webcasts.php':	
		case '/simeswiki/menu4_it_scripting_perl_focusHERE.php':			
		case '/simeswiki/menu4_it_scripting_php_documentskb.php':	
		case '/simeswiki/menu4_it_scripting_php_documentswk.php':
		case '/simeswiki/menu4_it_scripting_php_imageskb.php':	
		case '/simeswiki/menu4_it_scripting_php_imageswk.php':	
		case '/simeswiki/menu4_it_scripting_php_miscellaneous.php':	
		case '/simeswiki/menu4_it_scripting_php_scriptskb.php':	
		case '/simeswiki/menu4_it_scripting_php_scriptswk.php':	
		case '/simeswiki/menu4_it_scripting_php_webcasts.php':
		case '/simeswiki/menu4_it_scripting_php_focusHERE.php':		
		case '/simeswiki/menu4_it_scripting_vbscript_documentskb.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_documentswk.php':
		case '/simeswiki/menu4_it_scripting_vbscript_imageskb.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_imageswk.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_miscellaneous.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_scriptskb.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_scriptswk.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_webcasts.php':	
		case '/simeswiki/menu4_it_scripting_vbscript_focusHERE.php':			
											
					
 
		// 15 of 22: Security:	
		// _______________________________________________________________________						
 
		// menu2:
		case '/simeswiki/menu2_it_security.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_security_antivirus.php':	
		case '/simeswiki/menu3_it_security_contentfilterers.php':	
		case '/simeswiki/menu3_it_security_dmz.php':	
		case '/simeswiki/menu3_it_security_firewalls.php':	
		case '/simeswiki/menu3_it_security_proxies.php':													
 
		// menu4:
		case '/simeswiki/menu4_it_security_antivirus_documentskb.php':	
		case '/simeswiki/menu4_it_security_antivirus_documentswk.php':
		case '/simeswiki/menu4_it_security_antivirus_imageskb.php':	
		case '/simeswiki/menu4_it_security_antivirus_imageswk.php':	
		case '/simeswiki/menu4_it_security_antivirus_miscellaneous.php':	
		case '/simeswiki/menu4_it_security_antivirus_scriptskb.php':	
		case '/simeswiki/menu4_it_security_antivirus_scriptswk.php':	
		case '/simeswiki/menu4_it_security_antivirus_webcasts.php':	
		case '/simeswiki/menu4_it_security_antivirus_focusHERE.php':			
		case '/simeswiki/menu4_it_security_contentfilterers_documentskb.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_documentswk.php':
		case '/simeswiki/menu4_it_security_contentfilterers_imageskb.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_imageswk.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_miscellaneous.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_scriptskb.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_scriptswk.php':	
		case '/simeswiki/menu4_it_security_contentfilterers_webcasts.php':
		case '/simeswiki/menu4_it_security_contentfilterers_focusHERE.php':		
		case '/simeswiki/menu4_it_security_dmz_documentskb.php':	
		case '/simeswiki/menu4_it_security_dmz_documentswk.php':
		case '/simeswiki/menu4_it_security_dmz_imageskb.php':	
		case '/simeswiki/menu4_it_security_dmz_imageswk.php':	
		case '/simeswiki/menu4_it_security_dmz_miscellaneous.php':	
		case '/simeswiki/menu4_it_security_dmz_scriptskb.php':	
		case '/simeswiki/menu4_it_security_dmz_scriptswk.php':	
		case '/simeswiki/menu4_it_security_dmz_webcasts.php':	
		case '/simeswiki/menu4_it_security_dmz_focusHERE.php':			
		case '/simeswiki/menu4_it_security_firewalls_documentskb.php':	
		case '/simeswiki/menu4_it_security_firewalls_documentswk.php':
		case '/simeswiki/menu4_it_security_firewalls_imageskb.php':	
		case '/simeswiki/menu4_it_security_firewalls_imageswk.php':	
		case '/simeswiki/menu4_it_security_firewalls_miscellaneous.php':	
		case '/simeswiki/menu4_it_security_firewalls_scriptskb.php':	
		case '/simeswiki/menu4_it_security_firewalls_scriptswk.php':	
		case '/simeswiki/menu4_it_security_firewalls_webcasts.php':	
		case '/simeswiki/menu4_it_security_firewalls_focusHERE.php':			
		case '/simeswiki/menu4_it_security_proxies_documentskb.php':	
		case '/simeswiki/menu4_it_security_proxies_documentswk.php':
		case '/simeswiki/menu4_it_security_proxies_imageskb.php':	
		case '/simeswiki/menu4_it_security_proxies_imageswk.php':	
		case '/simeswiki/menu4_it_security_proxies_miscellaneous.php':	
		case '/simeswiki/menu4_it_security_proxies_scriptskb.php':	
		case '/simeswiki/menu4_it_security_proxies_scriptswk.php':	
		case '/simeswiki/menu4_it_security_proxies_webcasts.php':		
		case '/simeswiki/menu4_it_security_proxies_focusHERE.php':																	
								
 
		// 16 of 22: Service:	
		// _______________________________________________________________________						
									
		// menu2:
		case '/simeswiki/menu2_it_service.php':		
		
		// menu3:			
		case '/simeswiki/menu3_it_service_changemanagement.php':	
		case '/simeswiki/menu3_it_service_lifecyclemanagement.php':	
		case '/simeswiki/menu3_it_service_problemmanagement.php':	
		case '/simeswiki/menu3_it_service_releasemanagement.php':										
 
		// menu4:
		case '/simeswiki/menu4_it_service_changemanagement_documentskb.php':	
		case '/simeswiki/menu4_it_service_changemanagement_documentswk.php':
		case '/simeswiki/menu4_it_service_changemanagement_imageskb.php':	
		case '/simeswiki/menu4_it_service_changemanagement_imageswk.php':	
		case '/simeswiki/menu4_it_service_changemanagement_miscellaneous.php':	
		case '/simeswiki/menu4_it_service_changemanagement_scriptskb.php':	
		case '/simeswiki/menu4_it_service_changemanagement_scriptswk.php':	
		case '/simeswiki/menu4_it_service_changemanagement_webcasts.php':	
		case '/simeswiki/menu4_it_service_changemanagement_focusHERE.php':			
		case '/simeswiki/menu4_it_service_lifecyclemanagement_documentskb.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_documentswk.php':
		case '/simeswiki/menu4_it_service_lifecyclemanagement_imageskb.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_imageswk.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_miscellaneous.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_scriptskb.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_scriptswk.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_webcasts.php':	
		case '/simeswiki/menu4_it_service_lifecyclemanagement_focusHERE.php':		
		case '/simeswiki/menu4_it_service_problemmanagement_documentskb.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_documentswk.php':
		case '/simeswiki/menu4_it_service_problemmanagement_imageskb.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_imageswk.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_miscellaneous.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_scriptskb.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_scriptswk.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_webcasts.php':	
		case '/simeswiki/menu4_it_service_problemmanagement_focusHERE.php':			
		case '/simeswiki/menu4_it_service_releasemanagement_documentskb.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_documentswk.php':
		case '/simeswiki/menu4_it_service_releasemanagement_imageskb.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_imageswk.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_miscellaneous.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_scriptskb.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_scriptswk.php':	
		case '/simeswiki/menu4_it_service_releasemanagement_webcasts.php':		
		case '/simeswiki/menu4_it_service_releasemanagement_focusHERE.php':												
							
			
		// 17 of 22: Soe:	
		// _______________________________________________________________________						
 
		// menu2:		
		case '/simeswiki/menu2_it_soe.php':			
		
		// menu3:			
		case '/simeswiki/menu3_it_soe_xp.php':				
 
		// menu4:
		case '/simeswiki/menu4_it_soe_xp_documentskb.php':	
		case '/simeswiki/menu4_it_soe_xp_documentswk.php':
		case '/simeswiki/menu4_it_soe_xp_imageskb.php':	
		case '/simeswiki/menu4_it_soe_xp_imageswk.php':	
		case '/simeswiki/menu4_it_soe_xp_miscellaneous.php':	
		case '/simeswiki/menu4_it_soe_xp_scriptskb.php':	
		case '/simeswiki/menu4_it_soe_xp_scriptswk.php':	
		case '/simeswiki/menu4_it_soe_xp_webcasts.php':		
		case '/simeswiki/menu4_it_soe_xp_focusHERE.php':																
			
		// 18 of 22: Storage:	
		// _______________________________________________________________________						
			
		// menu2:
		case '/simeswiki/menu2_it_storage.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_storage_tivoli.php':	
		case '/simeswiki/menu3_it_storage_san.php':	
		case '/simeswiki/menu3_it_storage_ghost.php':									
		
		// menu4:
		case '/simeswiki/menu4_it_storage_ghost_documentskb.php':	
		case '/simeswiki/menu4_it_storage_ghost_documentswk.php':
		case '/simeswiki/menu4_it_storage_ghost_imageskb.php':	
		case '/simeswiki/menu4_it_storage_ghost_imageswk.php':	
		case '/simeswiki/menu4_it_storage_ghost_miscellaneous.php':	
		case '/simeswiki/menu4_it_storage_ghost_scriptskb.php':	
		case '/simeswiki/menu4_it_storage_ghost_scriptswk.php':	
		case '/simeswiki/menu4_it_storage_ghost_webcasts.php':
		case '/simeswiki/menu4_it_storage_ghost_focusHERE.php':		
		case '/simeswiki/menu4_it_storage_san_documentskb.php':	
		case '/simeswiki/menu4_it_storage_san_documentswk.php':
		case '/simeswiki/menu4_it_storage_san_imageskb.php':	
		case '/simeswiki/menu4_it_storage_san_imageswk.php':	
		case '/simeswiki/menu4_it_storage_san_miscellaneous.php':	
		case '/simeswiki/menu4_it_storage_san_scriptskb.php':	
		case '/simeswiki/menu4_it_storage_san_scriptswk.php':	
		case '/simeswiki/menu4_it_storage_san_webcasts.php':
		case '/simeswiki/menu4_it_storage_san_focusHERE.php':		
		case '/simeswiki/menu4_it_storage_tivoli_documentskb.php':	
		case '/simeswiki/menu4_it_storage_tivoli_documentswk.php':
		case '/simeswiki/menu4_it_storage_tivoli_imageskb.php':	
		case '/simeswiki/menu4_it_storage_tivoli_imageswk.php':	
		case '/simeswiki/menu4_it_storage_tivoli_miscellaneous.php':	
		case '/simeswiki/menu4_it_storage_tivoli_scriptskb.php':	
		case '/simeswiki/menu4_it_storage_tivoli_scriptswk.php':	
		case '/simeswiki/menu4_it_storage_tivoli_webcasts.php':			
		case '/simeswiki/menu4_it_storage_tivoli_focusHERE.php':			
											
 
		// 19 of 22: Sware:	
		// _______________________________________________________________________						
			
		// menu2:		
		case '/simeswiki/menu2_it_sware.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_sware_thumbnail.php':	
		case '/simeswiki/menu3_it_sware_imageeditors.php':	
		case '/simeswiki/menu3_it_sware_videogalleries.php':							
		
		// menu4:
		case '/simeswiki/menu4_it_sware_imageeditors_documentskb.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_documentswk.php':
		case '/simeswiki/menu4_it_sware_imageeditors_imageskb.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_imageswk.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_miscellaneous.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_scriptskb.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_scriptswk.php':	
		case '/simeswiki/menu4_it_sware_imageeditors_webcasts.php':		
		case '/simeswiki/menu4_it_sware_imageeditors_focusHERE.php':			
		case '/simeswiki/menu4_it_sware_thumbnail_documentskb.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_documentswk.php':
		case '/simeswiki/menu4_it_sware_thumbnail_imageskb.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_imageswk.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_miscellaneous.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_scriptskb.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_scriptswk.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_webcasts.php':	
		case '/simeswiki/menu4_it_sware_thumbnail_focusHERE.php':			
		case '/simeswiki/menu4_it_sware_videogalleries_documentskb.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_documentswk.php':
		case '/simeswiki/menu4_it_sware_videogalleries_imageskb.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_imageswk.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_miscellaneous.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_scriptskb.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_scriptswk.php':	
		case '/simeswiki/menu4_it_sware_videogalleries_webcasts.php':		
		case '/simeswiki/menu4_it_sware_videogalleries_focusHERE.php':											
				
			
		// 20 of 22: Thinclient:	
		// _______________________________________________________________________						
		
		// menu2:	
		case '/simeswiki/menu2_it_thinclient.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_thinclient_citrix.php':	
		case '/simeswiki/menu3_it_thinclient_wyse.php':							
								
		// menu4:	
		case '/simeswiki/menu4_it_thinclient_citrix_documentskb.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_documentswk.php':
		case '/simeswiki/menu4_it_thinclient_citrix_imageskb.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_imageswk.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_miscellaneous.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_scriptskb.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_scriptswk.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_webcasts.php':	
		case '/simeswiki/menu4_it_thinclient_citrix_focusHERE.php':			
		case '/simeswiki/menu4_it_thinclient_wyse_documentskb.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_documentswk.php':
		case '/simeswiki/menu4_it_thinclient_wyse_imageskb.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_imageswk.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_miscellaneous.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_scriptskb.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_scriptswk.php':	
		case '/simeswiki/menu4_it_thinclient_wyse_webcasts.php':		
		case '/simeswiki/menu4_it_thinclient_wyse_focusHERE.php':								
			
		// 21 of 22: Unix:	
		// _______________________________________________________________________						
		
		// menu2:					
		case '/simeswiki/menu2_it_unix.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_unix_redhatlinux.php':		
		case '/simeswiki/menu3_it_unix_suselinux.php':								
 
		// menu4:
		case '/simeswiki/menu4_it_unix_redhatlinux_documentskb.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_documentswk.php':
		case '/simeswiki/menu4_it_unix_redhatlinux_imageskb.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_imageswk.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_miscellaneous.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_scriptskb.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_scriptswk.php':	
		case '/simeswiki/menu4_it_unix_redhatlinux_webcasts.php':
		case '/simeswiki/menu4_it_unix_redhatlinux_focusHERE.php':		
		case '/simeswiki/menu4_it_unix_suselinux_documentskb.php':	
		case '/simeswiki/menu4_it_unix_suselinux_documentswk.php':
		case '/simeswiki/menu4_it_unix_suselinux_imageskb.php':	
		case '/simeswiki/menu4_it_unix_suselinux_imageswk.php':	
		case '/simeswiki/menu4_it_unix_suselinux_miscellaneous.php':	
		case '/simeswiki/menu4_it_unix_suselinux_scriptskb.php':	
		case '/simeswiki/menu4_it_unix_suselinux_scriptswk.php':	
		case '/simeswiki/menu4_it_unix_suselinux_webcasts.php':		
		case '/simeswiki/menu4_it_unix_suselinux_focusHERE.php':									
 
		// 22 of 22: Virtual:	
		// _______________________________________________________________________						
		
		// menu2:				
		case '/simeswiki/menu2_it_virtual.php':	
		
		// menu3:			
		case '/simeswiki/menu3_it_virtual_vmware.php':
		case '/simeswiki/menu3_it_virtual_vpc.php':								
 
		// menu4:	
		case '/simeswiki/menu4_it_virtual_vmware_documentskb.php':	
		case '/simeswiki/menu4_it_virtual_vmware_documentswk.php':
		case '/simeswiki/menu4_it_virtual_vmware_imageskb.php':	
		case '/simeswiki/menu4_it_virtual_vmware_imageswk.php':	
		case '/simeswiki/menu4_it_virtual_vmware_miscellaneous.php':	
		case '/simeswiki/menu4_it_virtual_vmware_scriptskb.php':	
		case '/simeswiki/menu4_it_virtual_vmware_scriptswk.php':	
		case '/simeswiki/menu4_it_virtual_vmware_webcasts.php':
		case '/simeswiki/menu4_it_virtual_vmware_focusHERE.php':		
		case '/simeswiki/menu4_it_virtual_vpc_documentskb.php':	
		case '/simeswiki/menu4_it_virtual_vpc_documentswk.php':
		case '/simeswiki/menu4_it_virtual_vpc_imageskb.php':	
		case '/simeswiki/menu4_it_virtual_vpc_imageswk.php':	
		case '/simeswiki/menu4_it_virtual_vpc_miscellaneous.php':	
		case '/simeswiki/menu4_it_virtual_vpc_scriptskb.php':	
		case '/simeswiki/menu4_it_virtual_vpc_scriptswk.php':	
		case '/simeswiki/menu4_it_virtual_vpc_webcasts.php':			
		case '/simeswiki/menu4_it_virtual_vpc_focusHERE.php':									
		
			// If any of the above links are selected, rebuild menu2_it...
			if (preg_match('#^menu2_it_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
 
 
						/*	__________________________________________________________
							ii)Selection is: files starting with menu2_work.
							__________________________________________________________*/
			
		// _______________________________________________________________________
		
		// menu2:
		case '/simeswiki/menu2_work_cml-layeredproducts.php':   
		case '/simeswiki/menu2_work_cml-platformservices.php':	
		case '/simeswiki/menu2_work_cml-storesystems.php':				
 
		//menu3:
		case '/simeswiki/menu3_work_cml-layeredproducts_department.php':
		
			if (preg_match('#^menu2_work_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;				
 
						/*	__________________________________________________________
							iii)Selection is: files starting with menu2_art.
							__________________________________________________________*/
			
		// _______________________________________________________________________
		case '/simeswiki/menu2_art_imagegalleries.php':   
		case '/simeswiki/menu2_art_mycompositions.php':		
 
			if (preg_match('#^menu2_art_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
 
 
						/*	__________________________________________________________
							iv)Selection is: files starting with menu2_music.
							__________________________________________________________*/
			
		// _______________________________________________________________________
		case '/simeswiki/menu2_music_mycompositions.php':   
		case '/simeswiki/menu2_music_mylyrics.php':		
 
			if (preg_match('#^menu2_music_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;	
			
 
						/*	__________________________________________________________
							v)Selection is: files starting with menu2_personal.
							__________________________________________________________*/
			
		// _______________________________________________________________________
		case '/simeswiki/menu2_personal_calendar.php':   	
 
			if (preg_match('#^menu2_personal_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;			
			
 
						/*	__________________________________________________________
							vi)Selection is: files starting with menu2_handy.
							__________________________________________________________*/
			
		// _______________________________________________________________________
		case '/simeswiki/menu2_handy_utilities.php':   	
 
			if (preg_match('#^menu2_handy_(.+?)\.php$#i', $f, $matches)){   
				$menu2_pages[$matches[1]] = $f;				
			}	
			break;		
			
			
						/*	__________________________________________________________
							ii)Selection is: files starting with menu2_work.
							__________________________________________________________*/
 
				
				
		
		// ........................................... Default if all else fails....		              
              
		default:
				      						// Insert default action here
		break;
				
												// .........................................
												// End conditional statements with switch:
												// .........................................				
	}																							     																				
				     			
						// End while reading the current directory...   	
								
}		
 
 
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//	FUNCTION: MENU2_NAVLINKS........
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
  							    							    		
						/*	............................................................
							 Step 2: Find the current page and load it into a variable
							..........................................................*/
 
$menu2_current_page=(htmlspecialchars(utf8_decode($_SERVER['PHP_SELF'])));
$menu2_current_page=explode('/', $menu2_current_page);		
		
						/*	............................................................
							 Numbers will change when directory is shifted.
							 Add a number for each directory deeper.
							..........................................................*/		
				
$menu2_current_page=$menu2_current_page[2];        
 
 
						/*	............................................................
							 Step 3: Loop through your links and test them 
							 against the current page.
							..........................................................*/
							
						// Start the function ... 								
 
function menu2_navlinks($menu2_pages, $menu2_current_page){
	asort($menu2_pages);   // this will sort the array and treat each item of the array as a string.
	foreach ($menu2_pages as $menu2_pagename=>$url) {
//$menu2_navlinks = '';
 
						/*	............................................................
							Test to see if the link's url is the same as the current 
							page variable against the current page.
							If they're the same - set the class to current_link
							..........................................................*/	
							
		if	($url==$menu2_current_page){
			$menu2_class='menu2_current_link';
			$menu2_style="<span class=\"$menu2_class\">";
			$menu2_end_style='</span>'; 
		}	
		else {  //otherwise leave the class blank
				$menu2_style='';
				$menu2_end_style='';
		}						 
						/*	............................................................
							As the loop runs, it will add each link based on whether or 
							not it's the current page
							..........................................................*/	
										
		$menu2_navlinks.="<li>$menu2_style<a href=\"$url\">$menu2_pagename</a>$menu2_end_style  | </li>\n";
	}
	return $menu2_navlinks;
	
							// End the function ... 		
}
 
		
							// Close the current directory... 	
			
closedir($dh2);
 
?>

Open in new window

0
Comment
Question by:Simon336697
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 1

Accepted Solution

by:
binarydesignnz earned 500 total points
ID: 21852545
Have you considered a database driven approach using perhaps mysql?
If you can start using queries instead of a switch-case you will make it much more efficient..
0
 
LVL 1

Author Comment

by:Simon336697
ID: 21853385
Hi binarydesignz..

Thanks so much for that advice.

I havent considered that.

Do you think in this case, this would be an ideal case for using a database?
0
 
LVL 1

Author Comment

by:Simon336697
ID: 21853492
I dont know where to start from integrating php with mysql in this scenario.
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 1

Expert Comment

by:binarydesignnz
ID: 21853560
For starters, Do you have mySQL and PHPMyAdmin running on your server?  
0
 
LVL 1

Author Comment

by:Simon336697
ID: 21853680
I do binary. (I really appreciate your help).
I have mysql 5.
0
 
LVL 1

Author Comment

by:Simon336697
ID: 21860651
Thanks binary.
Im going to work out what I actually do in terms of the tasks I perform to hard code, then try and work out a db design.
Thanks so much.
0
 
LVL 1

Expert Comment

by:binarydesignnz
ID: 21861068
Ok, well when you get it sorted post and i iwll help you with the syntax if you like.
0
 
LVL 1

Author Comment

by:Simon336697
ID: 21861341
Binary....thank you kind person...
Im going to write out a list of things in order of what I do to add new menu items, and the php files I use to do this.
Then from this, hopefully build some tables that can be populated automatically so I dont have to write out a million case statements, one for every new entry.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Force PDF to open inline as opposed to dowload 16 37
MySQL Persistent Connections 10 36
How do use '  ' within this code? 4 29
Get data from two MySQL tables 6 28
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question