Lid |
|
Hoi,
Ik heb de tutorial op jullie site gevolgd, betreffende het gebruik van TemplatePower.
Super tutorial, maar ik loop nu tegen iets aan.
Onderstaande code gebruik ik om mijn template weer te geven, en de variabelen op te vullen met data.
Echter bij het uitvoeren in de browser, krijg ik een witte (blanco) pagina.
Iemand een idee wat de fout is?
<?php
$tpl = new TemplatePower(TEMPLATE_PATH.DS."index_admin.tpl");
$tpl->prepare();
$tpl->newBlock("content_div");
$tpl->assign( array( "test" => "<b>Staff Login</b><br /><br />" ) );
$tpl->newBlock("content_div");
$tpl->assign( array( "test" => echo output_message($message) ) );
$tpl->newBlock("content_div");
$tpl->assign( array( "test" => "<form action='login.php' method='post'>
<table>
<tr>
<td>Username:</td>
<td><input type='text' name='username' maxlength='30' value='". echo htmlentities($username) ."' /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type='password' name='password' maxlength='30' value='". echo htmlentities($password) ."' /></td>
</tr>
<tr>
<td colspan='2'>
<input type='submit' name='submit' value='Login' />
</td>
</tr>
</table>
</form>" ) );
$tpl->printToScreen();
?>
<?php $tpl = new TemplatePower(TEMPLATE_PATH.DS."index_admin.tpl"); $tpl->prepare(); $tpl->newBlock("content_div"); $tpl->assign( array( "test" => "<b>Staff Login</b><br /><br />" ) ); $tpl->newBlock("content_div"); $tpl->assign( array( "test" => echo output_message ($message) ) ); $tpl->newBlock("content_div"); $tpl->assign( array( "test" => "<form action='login.php' method='post'> <table> <tr> <td>Username:</td> <td><input type='text' name='username' maxlength='30' value='". echo htmlentities($username) ."' /></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password' maxlength='30' value='". echo htmlentities($password) ."' /></td> </tr> <tr> <td colspan='2'> <input type='submit' name='submit' value='Login' /> </td> </tr> </table> </form>" ) ); $tpl->printToScreen(); ?>
|