<?php $ltmp = \"5\"; $sql = \"SELECT * FROM news ORDER BY news_date DESC , news_time DESC LIMIT $first,$l
t p\"; $result = $db->sql_query($sql); while($row = $db->sql_fetchrow($result)) { $sql = \"SELECT * from users WHERE user_id = '$row[news_auth_id]'\"; $result = $db->sql_query($sql); $data = explode(\"-\", $row[news_date]); $row2 = $db->sql_fetchrow($result); echo \" <font face=\"Verdana\" size=\"2\"><b>$row[news_heading]</b> <FONT SIZE=\"1\"><A HREF=\"mailto:$row2[user_mail]\">$row2[user_nick]</A> / \".substr($row[news_time],0,5).\" / $data[2]-$data[1]-$data[0]</FONT><br /> $row[news_body]</font><FONT SIZE=\"2\"><BR /><BR /> \"; } $sql = \"select * from news\"; $count = $db->sql_numrows($db->sql_query($sql)); $count = $count/$ltmp; if ($first!=0) print (\"<a href=\"index.php?go=main&first=\" . ($first-$ltmp) . \"\" title=\"Last page\"><big>«</big></a> \"); for ($i=1;$i<=$ile;$i++) { print (\"<a href=\"index.php?go=main&first=\" . ($i*$ltmp-$ltmp) . \"\" title=\"\" . ($i*$ltmp-($ltmp-1)) . \"-\" . ($i*$ltmp) .\"\">\"); if ($first==($i*$ltmp-$ltmp)) { } } if ($akt<$ile){ print (\"<a href=\"index.php?go=main&first=\" . ($first+$ltmp) . \"\" title=\"Next page\"><big>»</big></a>\"); } ?>
Z góry thx za pomoc
