\n" . " " . $title2 . ""; } if ($title3 != "") { $longtitle = $longtitle . " - " . $title3; $title3 = "
\n" . " " . $title3 . ""; } if ($art == "y") { $longtitle = $longtitle . ": an article by " . $author; } $prttype = 'main'; if( $req == "prt" ) { $prttype = 'print'; } # # Third, generate the standard page heading # echo " "; if ($redirect != "") { echo " \n"; } echo " $longtitle

"; if ($ig == 'y') { echo 'Interactive Gospel
- ' , ${title}, ' -', $title2, '
by ' , $author, ''; } elseif ($art != '') { echo ${title} , ${title2} , '
by ' , $author , ''; } else { echo 'Paul & Sue Hazelden
- ' , $title , ' -' , $title2; } if ($title3 != "") { echo $title3; } echo '


'; if ($headinclude != '') { include $headinclude ; echo '
'; } echo '
'; if ($ig == 'y') { head2 ('Summary'); } if ($redirect != '') { echo "

The page you are looking for has been moved. If you are not redirected in 5 seconds, please click on the link below.

\n"; footer (); } # # Finally, define the functions # function funhead($link, $text="") { echo "

[Humour Index]

\n"; head2($link, $text); } function news($i) { # create a family news paragraph introduction # expect a date in "dd/mm/yy" format $d = substr ($i, 0, 2); $m = substr ($i, 3, 2); $y = substr ($i, 6, 2); $z = "20" . $y; echo "

" . date ('l j F', mktime(0, 0, 0, $m, $d, $z)) . ":\n"; } function head2($link, $text="", $start=99) { global $num, $cont, $num2, $num3, $contents; if ($text == "") { $text = $link; $link = str_replace(" ", "_", $link); $link = str_replace("'", "_", $link); $link = str_replace('"', "_", $link); $link = str_replace("?", "_", $link); } if ($num == "y") { if ($start == 99) { $num2 = $num2 + 1; } else { $num2 = $start; } $num3 = 0; $numtext = $num2 . ".   "; $context = $numtext; } else { $numtext = ""; $context = "•   "; } echo "

" . $numtext . $text . "

\n"; if ($cont == "y") { $temp = $context . " $text"; $contents[] = array($temp); } } function head3 ($link, $text="") { global $num, $cont, $num2, $num3, $letters, $contents; if ($text == "") { $text = $link; $link = str_replace(" ", "_", $link); $link = str_replace("'", "_", $link); $link = str_replace('"', "_", $link); $link = str_replace("?", "_", $link); } if ($num == "y") { $let3 = substr ($letters, $num3, 1); $num3 = $num3 + 1; $numtext = ${num2} . ${let3} . "."; } else { $numtext = ""; } echo "

" . $numtext . "   " . $text . "

\n"; if ($cont == "y") { $last_index = count($contents) - 1; $temp = "   " . $numtext . "   $text"; $contents[$last_index][] = $temp; } } // Make a table of contents and // insert them at this point function start_contents () { ob_start("process_contents_buffer"); } function end_contents () { ob_end_flush(); } function process_contents_buffer ($buffer) { global $contents; $html = " \n"; foreach ($contents as $list) { $html .= " \n"; for ($i = 1; $i < count($list); $i++) { $html .= " \n" . " \n" . " \n"; } } $html .= "
${list[0]}
" . "${list[$i]}
\n"; return $html . $buffer; } function foot ($text) { global $footnum, $foottext; $footnum = $footnum + 1; echo "(" . $footnum . ")"; $foottext = $foottext . "\n\n

Note " . $footnum. ". " . $text; } function foothere ($text="") { global $footdone, $foottext; # Only create the foot notes once if ($footdone != "Y") { # Only create the footnotes if there is something to produce if ($foottext != "") { # Use the footnote intro text if provided if ($text == "") { $text = "Footnotes:"; } echo "


\n

" . $text . "

" . $foottext . "\n
\n"; $footdone = "Y"; } } } function linkin ($text, $link) { global $varpath; echo '' . $text . ''; } function linkout ($text, $link) { global $varpath; echo 'External link - ' . $text . ' ' . $text . ''; } function outlink ($text) { global $varpath; echo " "; } function options ($link) { echo "
    \n"; echo "
  1. I'll go along with that
  2. \n"; echo "
  3. Please explain further
  4. \n"; echo "
  5. I object to what you've said
  6. \n"; echo "
  7. What are the alternatives?
  8. \n"; echo "
\n"; echo "

Back...

\n"; } function indexlink ($level, $link, $text) { global $varpath; echo "

${text}

\n"; } function indexlout ($link, $text) { global $varpath; echo '

'; linkout ($text, $link); echo "

\n"; } function navbar () { global $varpath; echo "
\n"; indexlink ("1", "index.html", "Home Page"); indexlink ("1", "l2_activity.htm", "Personal"); indexlink ("2", "l3_turning_points.htm", "Events"); indexlink ("2", "news/news_family_latest.htm", "Family News"); indexlink ("2", "l3_family_history.htm", "Family History"); indexlink ("2", "l3_humour.htm", "Humour"); indexlink ("2", "l3_books.htm", "Books"); indexlink ("2", "l3_paul_health.htm", "Paul's Health"); indexlink ("2", "news/news_sue_health.htm", "Sue's Health"); indexlink ("1", "l2_ministry.htm", "Ministry"); indexlout ( 'http://www.crisis-centre.org.uk', 'Crisis Centre'); indexlout ( 'http://www.bcan.org.uk/bhf', 'BCAN Homeless Forum'); indexlout ( 'http:///bristolnetworks.org.uk', 'Bristol:networks'); indexlout ( 'http://bristolanabaptists.wordpress.com', 'Bristol Anabaptists'); indexlink ('2', 'suffering', 'Suffering'); indexlink ("1", "l2_articles.htm", "Writings"); indexlink ("2", "ig/ig.htm", "Interactive Gospel"); indexlink ("2", "l3_christian_articles.htm", "Christian Articles"); indexlink ("2", "l3_general_articles.htm", "General Articles"); indexlink ("2", "ref", "Other People"); indexlink ("2", "print", "Other Places"); indexlink ("2", "l2_aphorisms.htm", "Aphorisms"); indexlink ("2", "q", "Questions"); indexlink ("1", "l2_site.htm", "Web Site"); indexlink ("2", "l2_contact.htm", "Contact Us"); indexlink ("2", "l2_terms.htm", "Copyright"); indexlink ("2", "l2_links.htm", "Links"); indexlink ("2", "l2_search.htm", "Search this site"); indexlink ("2", "l2_listall.htm", "Complete file list"); echo "
\n"; } function footer ($text="") { global $req, $varpath, $footinclude, $copyfrom, $copydate, $moddate, $ig, $author, $file, $file2; $file3 = str_replace("/home/sites/hazelden/web/htdocs","http://hazelden.org.uk",$file); foothere (); echo "
\n"; # Then hide the navigation bar if( $req != 'prt' ) { } # If this is a printer-friendly page # Display the appropriate navigation and display options if ( $req != 'prt' ) { navbar (); $otherdisplay = "Display this page in a printer-friendly format"; } else { $otherdisplay = "Display this page with the navigation bar"; } if ($copydate == "") { $copydate = date("Y", filemtime($file)); } if ($copyfrom != '') { $copydate = $copyfrom . '-' . $copydate; } if ($moddate != "") { $modtext = "\n Page content last modified: " . $moddate . "
"; } echo "
\n"; echo "

 

\n

 

\n"; if ($footinclude != '') { echo '
'; include $footinclude ; } # $file = $_SERVER['PATH_TRANSLATED']; # $file2 = basename($file); echo "
Copyright © $copydate " . ' ' . $author . "
 
${file3} was last updated " . date("j F Y", filemtime($file)) . "
${modtext} You are welcome to print this page for your personal use or create a link to it, but if you would like to use any part of this page in any other way, please read the standard terms and then contact me.
\n"; # If this is part of the Interactive Gospel, display the message if ( $ig == "y" ) { echo "
This page is part of the Interactive Gospel
Interactive Gospel Index\n"; } echo "
Go to the top of this page
Home | Personal | Ministry | Writings | Web Site
${otherdisplay}

I welcome your comments and feedback.
You can either send me a message or write in the guest book.
Page counter at " . date('H:i \o\n j F Y', time() ) . "
\n"; } function hitcount() { global $file, $file2; #$file = $_SERVER['PATH_TRANSLATED']; #$file = basename($file); $filedot = strpos($file2, "."); $file3 = substr($file2, 0, $filedot) . ".cnt" ; if ( !file_exists($file3)){ touch ($file3); $handle = fopen ($file3, 'a+'); // Let's open for read and write $count = 0; } else{ $handle = fopen ($file3, 'r+'); // Let's open for read and write $count = fread ($handle, filesize ($file3)); settype ($count,"integer"); } rewind ($handle); // Go back to the beginning /* * Note that we don't have problems with 9 being fewer characters than * 10 because we are always incrementing, so we will always write at * least as many characters as we read */ fwrite ($handle, ++$count); // Don't forget to increment the counter fclose ($handle); // Done return $count; } ?>