ich versuche ein teil aus einer datenbank aus zu lesen.
den inhalt möchte ich als liste aus geben.
bekomme aber keine ausgabe des inhalts zu stande.
kann mir jemand sagen wo der fehler liegt ?
php-datei:
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
define('SHOW_ONLINE', true);
$page_title = "test";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
//
$template->set_filenames(array(
'body' => 'test_body.tpl')
);
$sql = "SELECT template_name
FROM " . THEMES_TABLE . "
ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "keine information!", "", __LINE__, __FILE__, $sql);
}
$style_rowset = $db->sql_fetchrowset($result);
$template->set_filenames(array(
"body" => "test_body.tpl")
);
$template->assign_vars(array(
"L_TEMPLATE" => $lang['Template']
)
);
for($i = 0; $i < count($style_rowset); $i++)
{
$template->assign_blo
ck_vars("styles", array(
"TEMPLATE_NAME" => $style_rowset[$i]['template_name']));
}
if (empty($HTTP_POST_VARS['send_file']));
$template->pparse("body");
{
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
?>
Code: Alles auswählen
<br /><br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline" height="150">
<tr>
<th class="thSides" height="25" nowrap="nowrap">test_body</th>
</tr>
<!-- BEGIN newsrow -->
<tr>
<td class="row1">
<tr>
<td class="row1"><span class="gen">{template_name}{Template}</span></td>
</tr>
<br />
<div align="right" class="genmed"> </div>
</td>
</tr>
<!-- END newsrow -->
<tr>
<td class="row1" align="center">
<div class="genmed">
</div>
</td>
</tr>
</table>