I need index.php to show the content from the content table when the user requests index.php?do=test in the slot on template.html when the script calls {body}. Sorry if this is too complicated, or un-organized but help would be greatly appreciated.
Index.php
Code: Select all
<?php
require_once("lib/template.php");
require_once("style.css");
$page = new Page("template.html");
if ($_REQUEST['do'] == 'test')
{
require_once("lib/test.php");
$page->replace_tags(array(
"title" => $title,
"descript" => "*****.com",
"body" => **Show the content from CONTENT TABLE**,
"menu" => "dat/menu.dat",
"left" => "dat/submenu.dat",
"right" => "dat/right.dat",
"footer" => $footer,
));
}
$page->output();
?>Code: Select all
<?php
$title = "This is the **** test page";
$footer = "this is the footer";
?>Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{title}</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center>
<table width="900" height="587" border="0" borderwidth="0">
<tr>
<th height="78" class="header" scope="row"><div align="left">
<table width="900" border="0">
<tr>
<th width="711" scope="col"><img src="*************" alt="****" width="102" height="54" align="left" longdesc="********" /></th>
<th width="179" scope="col">Login Area</th>
</tr>
</table>
</div></th>
</tr>
<tr>
<th height="29" scope="row" class="tools"><div align="left">What's ****? | Sign Up! </div></th>
</tr>
<tr>
<th height="408" class="header" scope="row">[b]{body}[/b]</th>
</tr>
<tr>
<th height="62" class="header" scope="row">[b]{footer}[/b]</th>
</tr>
</table>
</center>
</body>
</html>
CONTENT TABLE
Code: Select all
<table align="right"width="850" border="">
<tr>
<th width="283" scope="col"><img align="left" src="Images/micro_pic_board.png" width="247" height="162" alt="SnowBoard" /></th>
<th width="283" scope="col"><img align="left" src="Images/micro_pic_club.png" width="247" height="162" alt="Club" /></th>
<th width="283" scope="col"><img align="left" src="Images/micro_pic_family.png" width="247" height="162" alt="Family Dinner" /></th>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
</tr>
<tr>
<th height="81" scope="row"> </th>
<td> </td>
<td> </td>
</tr>
</table>