\n"; foreach ($links as $link) { $link_desc = explode ("|", chop ($link)); print "" . $link_desc[1] . "
\n"; } // foreach print "\n"; } // menu function search_box () { print <<
Search my site

END; } // search_box function navigation_bar ($validated = "no") { print "
\n"; search_box (); menu (); print <<
Can you email me? Type in your email address and hit enter to see.
END; } // navigation_bar function copyright ($start_year = "", $author = "Andrew DeFaria", $email = "Andrew@DeFaria.com", $home = "") { $today = getdate (); $current_year = $today ["year"]; $this_file = $_SERVER['PHP_SELF']; // Handle user home web pages if (preg_match ("/\/\~/", $this_file)) { $this_file= preg_replace ("/\/\~(\w+)\/(\s*)/", "/home/$1/web$2/", $this_file); } else { $this_file = "/web" . $this_file; } // if $mod_time = date ("F d Y @ g:i a", filemtime ($this_file)); print << Last modified: $mod_time
Copyright © END; if ($start_year != "") { print "$start_year-"; } // if print << Home $author <$email> END; } // copyright function display_code ($file) { $code = @file ($file) or die ("Unable to open file ($file)"); print "
\n\n"; $line_number = 1; foreach ($code as $line_of_code) { print "\n \n"; print " \n\n"; } // foreach print "
" . $line_number++ . "\n"; for ($i = 0; $i < strlen ($line_of_code); $i++) { if ($line_of_code [$i] == " ") { echo " "; } else if ($line_of_code [$i] == "\t") { echo "        "; } else if ($line_of_code [$i] != "\n") { echo $line_of_code [$i]; } // if } // foreach print "
\n
"; } // display_code ?>