| 1 | <br><center><b>najnovsie kluby</b></center> |
| 2 | <?php |
| 3 | |
| 4 | $q="SELECT user_forum.submission_count,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')"; |
| 5 | $q.=" where forum_public='public' or forum_public='moderated'"; |
| 6 | $q.=" order by forum_id desc limit "; |
| 7 | if ($_GET['forum_offset']) $q.=$_GET['forum_offset'].","; |
| 8 | $q.="10 "; |
| 9 | $forumset=$kyberia->query($q); |
| 10 | while ($forumset->next()) { |
| 11 | echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a><br>(".$forumset->getString('login')." :: ".$forumset->getString('forum_submissions')." submissionz "; |
| 12 | if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>"; |
| 13 | echo ")<br>"; |
| 14 | } |
| 15 | echo "<br><center><b>"; |
| 16 | if ($_GET['forum_offset']>9) echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']-10)."'><< previous </a>"; |
| 17 | echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']+10)."'>next >></a>"; |
| 18 | echo "</b></center>"; |
| 19 | ?> |
| 20 | <br><br><center><b>najnovsie ankety</b></center> |
| 21 | <?php |
| 22 | |
| 23 | $q="SELECT distinct polls.question,polls.forum_id from polls left join forum on forum.forum_id = polls.forum_id "; |
| 24 | $q.=" where forum.forum_public = 'public' order by id_poll desc limit 10 "; |
| 25 | $forumset=$kyberia->query($q); |
| 26 | while ($forumset->next()) { |
| 27 | $question = strip_tags($forumset->getString('question')); |
| 28 | echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$question,"</a><br>"; |
| 29 | } |
| 30 | |
| 31 | ?> |