
Testcode:
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
// End session management
$sql = "SELECT * FROM " . TOPICS_TABLE . "
WHERE forum_id = 22 AND (topic_calendar_time - UNIX_TIMESTAMP() > 0)
ORDER BY topic_calendar_time ASC
LIMIT 0 , 5";
if( !( $result = $db->sql_query($sql) ) )
{
message_die(CRITICAL_ERROR, 'Kann Themen Informationen nicht laden!', '', __LINE__, __FILE__, $sql);
}
// Generate page
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'calnext.tpl')
);
while ( $row = $db->sql_fetchrow($result) )
{
print_r($row);
}
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>