Kyberia v1.0
[mirrors/Kyberia-bloodline.git] / boxiky / lastforum.inc
... / ...
CommitLineData
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 ";
7if ($_GET['forum_offset']) $q.=$_GET['forum_offset'].",";
8$q.="10 ";
9$forumset=$kyberia->query($q);
10while ($forumset->next()) {
11 echo "<br><a href='?action=forum&node_id=",$forumset->getString('forum_id'),"'>",$forumset->getString('forum_name'),"</a><br>(".$forumset->getString('login')."&nbsp;&nbsp;::&nbsp;&nbsp;".$forumset->getString('forum_submissions')."&nbsp;submissionz ";
12 if ($forumset->getString('submission_count')) echo "- <font color='red'>".$forumset->getString('submission_count')." NEW</font>";
13 echo ")<br>";
14}
15echo "<br><center><b>";
16if ($_GET['forum_offset']>9) echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']-10)."'><< previous &nbsp;&nbsp;</a>";
17echo "<a href='".SCRIPT."?action=posledne&forum_offset=".($_GET['forum_offset']+10)."'>next >></a>";
18echo "</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);
26while ($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?>
This page took 0.080311 seconds and 4 git commands to generate.