dang. blooming web browser crashed just as I was replying...now where was I. Oh yes.
Sorry not to mention the script name. It's a little known beast, which goes by the name THCnet. It's found at http://devel.thcnet.net/thcnet/
When I include my file, I don't get any errors reported as such, but the php code from the file is treated as HTML, and displayed all over the resulting page.
I have no idea whether the author used a template system of his own devising or someone elses. Here's the template for the main page(modified by me a bit):
%%include,"thcnetheader.template.php"%%
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100% vspace=0>
<tr>
<td valign=top width=200 background="../../images/nav/navbg.jpg">
<!-- start left column -->
%%include,"thcnetmenu.template.php"%%
<!-- end left column -->
</td>
<td valign=top width=5>
<!-- center spacer -->
<img src="pics/halojones/spacer.gif" height=1 width=5>
</td>
<td valign=top>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="nav"><font size="5">ACT 4 Business messageboard</font></td>
</tr>
</table>
<!-- start right column --><br><br><br>
%%info%%
%%navigation%%
%%content%%
%%navigation%%
<!-- end right column -->
</td><td valign=top width=8> </td>
</tr>
</table>
%%include,"thcnetfooter.template"%%
there's also a file called "displaypagetemplate.php" that seems to have something to do with all this. I don't really understand it at all yet...it's code is
<?
function displaypagetemplate($funct)
{
global $mysql_link, $session, $baseurl, $altpagetemplate, $pagetemplate, $subpagetemplate;
global $session_LastLocatn, $err;
global $user_ID, $user_Name, $user_password, $user_email, $user_admin;
global $sysoplevel, $adminlevel, $moderatorlevel, $moderatedlevel;
global $err, $DOCUMENT_ROOT, $nav, $pagetime;
$err = 0;
// determine which template we should display
if($altpagetemplate)
{
$filename = $DOCUMENT_ROOT . "/" . $altpagetemplate;
}
elseif($funct == "msgform"
or substr($funct,0,8) == "article,"
or substr($funct,0,5) == "edit,"
or substr($funct,0,6) == "reply,"
or substr($funct,0,8) == "preview,"
or substr($funct,0,9) == "moderate,"
or substr($funct,0,5) == "login"
or substr($funct,0,5) == "apply")
{
$filename = $subpagetemplate;
}
else
{
$filename = $pagetemplate;
}
// open template file
$outbuffer = "";
if($fileopen = fopen($filename, "r"))
{
while(!feof($fileopen))
{
$outbuffer .= macro(fgets($fileopen, 255),$funct);
}
fclose($fileopen);
}
$outbuffer = str_replace("%%nav%%", $nav, $outbuffer);
print($outbuffer);
// finish updateing session info with time and location
$Query = "UPDATE session "
. "SET LastAction = now(), "
. " LastLocatn = \"$session_LastLocatn\" "
. "WHERE ID='$session' ";
mysql_query($Query, $mysql_link);
$Query = "UPDATE users "
. "SET lastread = now() "
. "WHERE Name='$user_Name' ";
mysql_query($Query, $mysql_link);
// page display is finished
list($usec, $sec) = explode(" ",microtime());
$pagefin = ((float)$usec + (float)$sec);
print ("<!-- $pagetime:$pagefin:" . ($pagefin - $pagetime) . " -->");
exit;
}
?>