</tr> <?php // print topic announcement and important $query_2 = "SELECT * \n\t\t\t FROM " . __PREFIX__ . "topic \n\t\t\t WHERE f_id = '" . $id . "' \n\t\t\t AND replyof < 0\n\t\t\t AND (important = 1\n\t\t\t \tOR announcement = 1) \n\t\t\t ORDER by last DESC \n\t\t\t LIMIT " . $limit . " \n\t\t\tOFFSET " . $offset; $result = mysql_query($query_2) or _err(mysql_error()); while ($row = mysql_fetch_row($result)) { $query = "SELECT id FROM " . __PREFIX__ . "topic WHERE replyof = '" . $row[0] . "'"; $res2 = mysql_query($query); $replies = 0; while (mysql_fetch_row($res2)) { $replies++; } ?> <tr> <td class="forums"><a href = 'viewtopic.php?id=<?php print $row[0] . "'>" . $row[4] . "</a> " . check_graphic_block_topic($row[0]) . check_graphic_important_topic($row[0]) . check_graphic_announcement_topic($row[0]); ?> </td> <td class="forums"><a href = 'profile.php?id=<?php print nick2uid($row[3]) . "'>" . $row[3]; ?> </a></td> <td class="forums"><?php print $replies; ?> </td> </tr> <tr> <td colspan="3"><hr style="margin:1px;height:1px;border:none;background-color:white;"></td> </tr> <?php
<input class='karma_più' type = 'submit' value = '+1' name = 'vote' > <input class='karma_meno' type = 'submit' value = '-1' name = 'vote'> </form> </div> <div style="float: right;"><a href="pm.php?mode=3&to=<?php print $row[3]; ?> ">PM</a> <a href = 'profile.php?id=<?php print nick2uid($row[3]); ?> '>Profile</a></div> </div> </div> <div id="topic"> <b>Titolo: </b><?php print $row[4] . check_graphic_block_topic($row[0]) . check_graphic_important_topic($row[0]) . check_graphic_announcement_topic($row[0]) . "<br />\n<font size=1> @<i>Scritto il " . $row[9] . " alle ore " . $row[8] . "</i></font>\n"; ?> <br /> <?php if (login($username, $password) && ($row[2] == $username || level($username) == 'admin') || level($username) == 'mod') { print "\n<a href = 'manage.php?id=" . $row[0] . "&t_id=" . $id . "'>[Edita]</a>" . "\n<a href='manage.php?id=" . $row[0] . "&t_id=" . $id . "&delete=1'>[Elimina]</a>"; } ?> <br /> <br /> <?php //parte del messaggio //print wordwrap (br($row [5]), 200 , "<br />"); print BBcode($row[5]); //chiusura della div di topic print "\n</div>";