real_escape_string($_GET['Page']); else $Page = 0;
$Database->select_db('wow');
$DbResult = $Database->query('SELECT COUNT(*) FROM news');
$Total = $DbResult->fetch_array();
$Total = $Total[0];
$Result = 'Aktuality:';
$Result .= '
';
$DbResult = $Database->query('SELECT news.*, user.User as username FROM news JOIN user ON user.ID=news.user WHERE 1 ORDER BY time DESC LIMIT '.($Page * $ItemPerPage).','.$ItemPerPage);
while($Row = $DbResult->fetch_array())
{
$Result .= '
';
if($Row['long_text'] != '') $Row['title'] = '
'.$Row['title'].'';
$Result .= '
'.$Row['title'].' ('.HumanDate($Row['time']).')
';
$Result .= $Row['short_text'].' ('.$Row['username'].')
';
}
$Result .= '
';
$Result .= PagesList('?Page=', $Page, $Total, $ItemPerPage);
return($Result);
}
?>