\n"; $rv .= "\n"; $rv .= "" . $in_htmldeclaredtitle . "\n"; $rv .= "\n"; $rv .= STDFORMAT_body_tag($in_background, $in_link, $in_vlink, $in_alink) . "\n"; $rv .= STDFORMAT_default_font_tag() . "\n"; $rv .= "

\n"; $rv .= "\n"; $rv .= "" . $in_htmlselfdonetitle . "\n"; $rv .= "\n"; $rv .= "

\n"; $rv .= STDFORMAT_hline_thin() . "\n"; return($rv); } //Returns the Google AdSense bottom banner that appears on most pages. All //HTML is balanced and no other material is provided. // function STDFORMAT_advertising_bottom() { $rv = "

\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "
\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "
\n" . "

\n" ; return($rv); } //Returns the complete bottom portion of a web page. This starts //from the horizontal line delineating the footer and moves downward. //Newlines are included for human-friendly reading. // function STDFORMAT_page_bottom($in_snapshot) { //Make the second call to get more resource usage data, which will be //used to display system and user time consumed. $ru2 = getrusage(); $rv = STDFORMAT_std_footer($in_snapshot['time_rv'], $ru2, $in_snapshot['getrusage_rv']); $rv .= "\n"; $rv .= "\n"; $rv .= "\n"; return($rv); } //Returns the HTML for the standard footer of a web page, including top //and bottom horizontal lines. All HTML is balanced. Newlines //are provided for human readability of the HTML. // function STDFORMAT_std_footer($in_time, $in_ru2, $in_ru1) { $rv = STDFORMAT_hline_thin() . "\n"; $rv .= "\n"; $rv .= "

\n"; $rv = $rv . STDFORMAT_std_footer_text($in_time, $in_ru2, $in_ru1); $rv .= "

\n"; $rv .= "
\n"; $rv .= STDFORMAT_hline_thick() . "\n"; return($rv); } //Returns the HTML for the text occurring in the standard footer of a web page, //with no newlines or preceding horizontal lines or following horizontal lines. //No HTML formatting codes are used. // function STDFORMAT_std_footer_text($in_time, $in_ru2, $in_ru1) { //Figure out the total, system, and user time to generate. STDFORMAT_getrusagediff($in_ru2, $in_ru1, $out_totaltime, $out_systime, $out_usertime); $rv = "This web page was obtained from the server at "; $rv .= date("H:i:s", $in_time) . " on " . date("l, ", $in_time) . date("F j, Y", $in_time) . " (UTC " . date("O", $in_time) . ", server time), and required approximately " . $out_totaltime . "s CPU time (" . $out_systime . "s system, " . $out_usertime . "s user) to generate.  "; $rv .= "Please contact " . STDFORMAT_webmaster_name() . " with any feedback about this " . "web page.\n"; return($rv); } //Returns the HTML tag for a standard web page, which includes the //link colors (on demand) and specification of the background to //use. No newline is included. // //The caller may optionally override the background and may also //optionally override the link, vlink, and alink specification. //For these specifications: // "" means use the default. // FALSE means don't specify them in the body. // Any other value means use that instead. // function STDFORMAT_body_tag($in_background, $in_link, $in_vlink, $in_alink) { $rv = "= $in_ru_first['ru_stime.tv_usec']) { //Can do a straight subtract with no borrow. $systime_secs = $in_ru_second['ru_stime.tv_sec'] - $in_ru_first['ru_stime.tv_sec']; $systime_usecs = $in_ru_second['ru_stime.tv_usec'] - $in_ru_first['ru_stime.tv_usec']; } else { //Need a borrow. $systime_secs = $in_ru_second['ru_stime.tv_sec'] - $in_ru_first['ru_stime.tv_sec'] - 1; $systime_usecs = 1000000 + $in_ru_second['ru_stime.tv_usec'] - $in_ru_first['ru_stime.tv_usec']; } $system_time_string = (string)$systime_usecs; while (strlen($system_time_string) < 6) { $system_time_string = "0" . $system_time_string; } $system_time_string = (string)$systime_secs . "." . $system_time_string; //User time. // if ($in_ru_second['ru_utime.tv_usec'] >= $in_ru_first['ru_utime.tv_usec']) { //Can do a straight subtract with no borrow. $usertime_secs = $in_ru_second['ru_utime.tv_sec'] - $in_ru_first['ru_utime.tv_sec']; $usertime_usecs = $in_ru_second['ru_utime.tv_usec'] - $in_ru_first['ru_utime.tv_usec']; } else { //Need a borrow. $usertime_secs = $in_ru_second['ru_utime.tv_sec'] - $in_ru_first['ru_utime.tv_sec'] - 1; $usertime_usecs = 1000000 + $in_ru_second['ru_utime.tv_usec'] - $in_ru_first['ru_utime.tv_usec']; } $user_time_string = (string)$usertime_usecs; while (strlen($user_time_string) < 6) { $user_time_string = "0" . $user_time_string; } $user_time_string = (string)$usertime_secs . "." . $user_time_string; //Total time. // $totaltime_usecs = $systime_usecs + $usertime_usecs; $totaltime_secs = $systime_secs + $usertime_secs; if ($totaltime_usecs >= 1000000) { $totaltime_usecs -= 1000000; $totaltime_secs += 1; } $total_time_string = (string)$totaltime_usecs; while (strlen($total_time_string) < 6) { $total_time_string = "0" . $total_time_string; } $total_time_string = (string)$totaltime_secs . "." . $total_time_string; $out_totaltime = $total_time_string; $out_systime = $system_time_string; $out_usertime = $user_time_string; } //Returns the HTML for a thin horizontal line, with no terminating newline or //similar. // function STDFORMAT_hline_thin() { return("
"); } //Returns the HTML for a thick horizontal line, with no terminating newline or //similar. // function STDFORMAT_hline_thick() { return("
"); } //Returns the tag corresponding to the desired default font, //with no newline. // function STDFORMAT_default_font_tag() { return(""); } //Returns the webmaster name as a string, with no terminating newlines //or similar. // function STDFORMAT_webmaster_name() { return("David T. Ashley"); } //Returns the webmaster e-mail address as a string, with no terminating newlines //or similar. // function STDFORMAT_webmaster_email() { return("dashley@gmail.com"); } ?>