HomeAbout MeResumeKnowledgeProgrammingPHPClasses

Classes

Experience - 1yr (Int)

As with the Functions page, I am just going to post some source code rather than talk about something that can explain itself. This is actually the first class that I ever wrote. The Class that runs the layout for the entire nolanfyfe.com website. Below is the usage of the class for the homepage. Please select "Page Source" above, to see the actuall class itself, and the complete source code.
#####################
# START SAMPLE CLASS USAGE #
#####################

# START SETTING UP OBJECT
	$template = &New template;
	
# SETUP TEMPLATE DEFAULTS
	$template->root = $root;
	$template->url = $url;
	
	$_SESSION[bgcolor] = "#D4F1FF";
	
# SETUP SHOW/HIDE LEFT MODULES
	$template->left1 = "1";
	$template->left_module1 = "index";
	$template->left2 = "0";
	$template->left_module2 = "index";
	
# SETUP SHOW/HIDE MAIN MODULES
	$template->main1 = "1"; 
	$template->main_module1 = "index";
	$template->main_module_text = "Welcome to Nolan Fyfe's home on the internet";
	
	$template->main2 = "1";
	$template->main_module2 = "index";
	
	$template->main3 = "1";
	$template->main_module3 = "index";

# SETUP HORIZONTAL RULES
	
	$template->h2 = "1";
	$template->h3 = "1";

# INCLUDE HEADER/FOOTER
	$template->head = 1;
	$template->footer = 1;
	
# PARSE BODY
	$template->body();

####################
# END SAMPLE CLASS USAGE #
####################