home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / modules / forums / viewtopic.php < prev   
Encoding:
PHP Script  |  2002-09-16  |  19.7 KB  |  485 lines

  1. <?php
  2.  
  3. ######################################################################
  4. # Modulo Splatt Forum per PHP-NUKE 
  5. #-------------------------
  6. # Versione: 3.2
  7. #
  8. # Copyright (c) 2002 by:
  9. #
  10. # Giorgio Ciranni (~Splatt~)
  11. # (http://www.splatt.it)
  12. # (webmaster@splatt.it)
  13. #
  14. # Supporto tecnico disponibile sul Forum di www.splatt.it
  15. ######################################################################
  16. # Splatt Forum is free software. You can redistribute it and/or modify
  17. # it under the terms of the GNU General Public License as published by
  18. # the Free Software Foundation; either version 2 of the License.
  19. # Splatt Forum is distributed in the hope that it will be useful,
  20. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. # GNU General Public License for more details.
  23. #
  24. # You should have received a copy of the GNU General Public License
  25. # along with this program; if not, write to the Free Software
  26. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   
  27. # 02111-1307  USA
  28. ######################################################################
  29.  
  30. $mtime = microtime();
  31. $mtime = explode(" ",$mtime);
  32. $mtime = $mtime[1] + $mtime[0];
  33. $starttime = $mtime;
  34.  
  35. $module_name = "$name";
  36.  
  37. if (!eregi("modules.php", $PHP_SELF)) {
  38.     die ("You can't access this file directly...");
  39. }
  40.  
  41. include("config.php");
  42. include("modules/".$module_name."/functions.php");
  43. include("modules/".$module_name."/auth.php");
  44. include("modules/$module_name/attachment.php");
  45.  
  46.  
  47. $sql = "SELECT forum_type, forum_id, forum_pass, forum_name, forum_access, forum_moderator, forum_atch FROM ${prefix}_forums WHERE forum_id = '$forum'";
  48.  
  49. if(!$result = mysql_query($sql, $db))
  50.         die("<font size=+1>An Error Occured</font><hr>"._FCOULDNOT."");
  51. $myrow = mysql_fetch_array($result);
  52. $forum_name = $myrow[forum_name];
  53. $mod = $myrow[forum_moderator];
  54. $moderators = get_moderators($forum, $db);
  55. $mypass = $myrow[forum_pass];
  56. $forum_id = $myrow[forum_id];
  57. $atch = $myrow[forum_atch];
  58.  
  59. if($myrow[forum_type] == 1) {
  60.     $valore = "$passwd:$forum_id";
  61.     $info = explode(":",$HTTP_COOKIE_VARS["Accessfpriv"]);
  62.  
  63. if($myrow[forum_type] == 1 && ($info[0] != $mypass || $info[1] != $forum_id) && (($myrow[forum_name] != $forum_name)  || ($bypass != 1))){
  64.         header("Location:modules.php?op=modload&name=".$module_name."&file=viewforum&forum=$forum_id");
  65.     }
  66. }
  67.  
  68. $sql = "SELECT topic_title, topic_status FROM ${prefix}_forumtopics WHERE topic_id = '$topic'";
  69.  
  70. $total = get_total_posts($topic, $db, "topic");
  71.     
  72.         if($total > $posts_per_page) {
  73.             $times = 0;
  74.             for($x = 0; $x < $total; $x += $posts_per_page)
  75.                 $times++;
  76.             $pages = $times;
  77.             }
  78.  
  79.         if(!$result = mysql_query($sql, $db))
  80.             die("<font size=+1>"._ERRORE1."</font><hr>"._FCOULDNOT."");
  81.  
  82. $myrow = mysql_fetch_array($result);
  83. $topic_subject = stripslashes($myrow[topic_title]);
  84. $lock_state = $myrow[topic_status];
  85.  
  86. $pagetitle = "$topic_subject";
  87.  
  88.  
  89.  
  90.  
  91. include('header.php');
  92.  
  93.  
  94.     if ($user) {
  95.         $userdata = base64_decode($user);
  96.         $userdata = explode(":", $userdata);
  97.         }
  98.  
  99. reset ($moderators);
  100. while(list($null, $mods) = each($moderators)) {
  101.         while(list($mod_id, $mod_name) = each($mods)) {
  102.  
  103.                 if ($userdata[0] == $mod_id) {
  104.                         $mod = $mod_id;
  105.                         break 2;
  106.                 }
  107.                 }
  108.         }
  109.  
  110. /*
  111. $sql = "SELECT topic_title, topic_status FROM ${prefix}_forumtopics WHERE topic_id = '$topic'";
  112.  
  113. $total = get_total_posts($topic, $db, "topic");
  114.     
  115.         if($total > $posts_per_page) {
  116.             $times = 0;
  117.             for($x = 0; $x < $total; $x += $posts_per_page)
  118.                 $times++;
  119.             $pages = $times;
  120.             }
  121.  
  122.         if(!$result = mysql_query($sql, $db))
  123.             die("<font size=+1>"._ERRORE1."</font><hr>"._FCOULDNOT."");
  124.  
  125. $myrow = mysql_fetch_array($result);
  126. $topic_subject = stripslashes($myrow[topic_title]);
  127. $lock_state = $myrow[topic_status];
  128.  
  129. $pagetitle = "$topic_subject";
  130. */
  131.  
  132. ?>
  133.  
  134. <br><TABLE BORDER="0" WIDTH="100%"><TR><TD ALIGN=LEFT>
  135. <FONT SIZE=1><b>
  136.  
  137. <?
  138. echo _MODERATED;
  139.  
  140. $count = 0;
  141. reset ($moderators);
  142. while(list($null, $mods) = each($moderators)) {
  143.         while(list($mod_id, $mod_name) = each($mods)) {
  144.  
  145.                 if($count > 0) { echo " , "; }
  146.  
  147.                 echo "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$mod_name\">$mod_name</a>";
  148.  
  149.                 $count++;
  150.         }
  151.     }
  152.  
  153. ?>
  154.  
  155. </b><br><br>
  156.  
  157. <a href="modules.php?op=modload&name=<?php echo $module_name?>&file=index"><?php echo "$sitename : "._FINDEX;?></a> <b>╗ ╗</b>
  158. <a href="modules.php?op=modload&name=<?php echo $module_name?>&file=viewforum&forum=<?php echo $forum?>"><?php echo stripslashes($forum_name)?></a></td><td><a href="modules.php?op=modload&name=<?php echo $module_name?>&file=newtopic&forum=<?php echo $forum?>&mod=<?php echo $mod?>"><IMG SRC="images/forum/nuovomess<? if($currentlang == english || $currentlang == french || $currentlang == german){echo "-$currentlang";}?>.gif" BORDER="0"></a>  
  159. <?php
  160.                 if($lock_state != 1) {
  161. ?>
  162.                         <a href="modules.php?op=modload&name=<?php echo $module_name?>&file=reply&topic=<?php echo $topic ?>&forum=<?php echo $forum ?>&mod=<?php echo $mod ?>"><IMG SRC="images/forum/rispondimess<? if($currentlang == english || $currentlang == french || $currentlang == german){echo "-$currentlang";}?>.gif" BORDER="0"></a></TD>
  163. <?php
  164.                 }
  165.                 else {
  166. ?>
  167.                         <IMG SRC="images/forum/icons/reply_locked-dark.jpg" BORDER="0"></TD>
  168. <?php
  169.                 }
  170. ?>
  171.  
  172. </TD></tr><TR BGCOLOR="<?php echo $bgcolor2?>"><TD valign="middle" height="38" background="images/forum/cellpic3.gif" colspan="2"><font color="#ffffff" size="6"><b> <?php echo $topic_subject;?></b></font>
  173.  
  174.  
  175. <?php
  176.                
  177. echo "</td></TR><TABLE>";
  178.         if($total > $posts_per_page) {
  179.         echo "<TABLE BORDER=0 WIDTH=100% ALIGN=CENTER>";
  180.         $times = 1;
  181.         echo "<TR ALIGN=\"RIGHT\"><TD><font size=1><b>$pages</b> "._FPAGES." ( ";
  182.         for($x = 0; $x < $total; $x += $posts_per_page) {
  183.                 if($times != 1)
  184.                         echo " | ";
  185.                 echo "<a href=\"modules.php?op=modload&name=".$module_name."&file=viewtopic&topic=$topic&forum=$forum&start=$x\">$times</a>";
  186.                 $times++;
  187.         }
  188.         echo " ) </TD></TR></TABLE>\n";
  189. }
  190. ?>
  191.  
  192. <TABLE BORDER="0" CELLPADDING="1" CELLPADDING="0" ALIGN="CENTER" VALIGN="TOP" WIDTH="100%"><TR><TD>
  193. <TABLE BORDER="0" CELLPADDING="3" CELLPADDING="1" WIDTH="100%">
  194. <TR BGCOLOR="<?php echo $bgcolor2?>" ALIGN="LEFT">
  195.         <TD WIDTH=20%><B><font COLOR="<?php echo $textcolor1?>"><?php echo _FAUTHOR;?></FONT></B></TD>
  196.         <TD><B><font COLOR="<?php echo $textcolor1?>"><?php echo $topic_subject?></FONT></B></TD>
  197. </TR>
  198. <?php
  199.         if(isset($start)) {
  200.         $sql = "SELECT * FROM ${prefix}_posts WHERE topic_id = '$topic' ORDER BY post_id LIMIT $start, $posts_per_page";
  201.             }
  202.             else {
  203.         $sql = "SELECT * FROM ${prefix}_posts WHERE topic_id = '$topic' ORDER BY post_id LIMIT $posts_per_page";
  204. }
  205.         if(!$result = mysql_query($sql, $db))
  206.         die("<font size=+1>"._ERRORE1."</font><hr>"._FCOULDNOT."");
  207. $myrow = mysql_fetch_array($result);
  208. $row_color = $color2;
  209. $count = 0;
  210. $userdata = get_userdata_from_id($userdata[0], $db); 
  211. /*
  212. if($posterdata[uid]==$userdata[0] || $mod==$userdata[0] || $userdata[user_level]>=2) 
  213. */
  214. if(isset($userdata[0]) && $userdata[0] == $mod || $userdata[user_level]==3) { $viewip = 1; }
  215.  
  216. do {
  217.    if(!($count % 2))
  218.      $row_color = $bgcolor3;
  219.    else
  220.      $row_color = $bgcolor1;
  221.  
  222.    echo "<TR BGCOLOR=\"$row_color\" ALIGN=\"LEFT\">\n";
  223.  
  224. $risult = mysql_query("SELECT * FROM $user_prefix"._users." where uid= '$myrow[poster_id]'");
  225.             $num = mysql_num_rows($risult);
  226.  
  227. if($num == 0 && $myrow[poster_id] != 1) {
  228.                 $posterdata = array("uid" => 1, "uname" => ""._FANONIMO."", "posts" => "0", "rank" => -1);
  229.    echo "<TD rowspan=\"2\" valign=top><b>$posterdata[uname]</b><br><br>\n";
  230.    echo"<br><br>"._FUSDEL."";
  231.      }
  232. else
  233. {
  234.    if($myrow[poster_id] != 1) {
  235.            $posterdata = get_userdata_from_id($myrow[poster_id], $db);
  236.         }
  237.    else
  238.      $posterdata = array("uid" => 1, "uname" => ""._FANONIMO."", "posts" => "0", "rank" => -1);
  239.    echo "<TD rowspan=\"2\" valign=top><b>$posterdata[uname]</b><br><br>\n";
  240.  
  241. if ($posterdata[user_avatar] != '') {
  242.    echo "<img src=\"images/forum/avatar/$posterdata[user_avatar]\"><br>";
  243.     }
  244.    $posts = $posterdata[user_posts];
  245.  
  246.  
  247. $sql = "SELECT * FROM ${prefix}_forum_mods WHERE forum_id = '$forum' and user_id = '$posterdata[uid]'";
  248. $risultato = mysql_query($sql) or
  249.         die(mysql_error());
  250.         if(mysql_num_rows($risultato) == 0) {
  251.                 $moderatore = 0;
  252.         }
  253.         else {
  254.                 $moderatore = 1;
  255. }
  256.  
  257.     
  258. if($posterdata[user_level] == 3)
  259.  
  260.     {
  261. echo "<br><img src=\"images/forum/pips_admin.gif\"><br>";
  262. }
  263.  
  264.    if($posterdata[uid] != 1)
  265.  
  266.      {
  267.  
  268.         if($moderatore == 1 && $posterdata[user_level] != 3)
  269.  
  270.  
  271.          {
  272.         echo "<br><img src=\"images/forum/pips_moderator.gif\"><br>";
  273.         }
  274.  
  275.             else {
  276.  
  277.                  if($posterdata[user_rank] != 0)
  278.              $sql = "SELECT rank_title, rank_image FROM ${prefix}_ranks WHERE rank_id = '$posterdata[user_rank]'";
  279.                    else
  280.              $sql = "SELECT rank_title, rank_image FROM ${prefix}_ranks WHERE rank_min <= " . $posterdata[user_posts] . " AND rank_max >= " . $posterdata[user_posts] . " AND rank_special = 0";
  281.            if(!$rank_result = mysql_query($sql, $db))
  282.              die("Error connecting to the database!");
  283.            list($rank, $rankimage) = mysql_fetch_array($rank_result);
  284.             if($rankimage == ""){
  285.            echo "<font size=1>" . stripslashes($rank) . "</font>";
  286.         }else
  287.                 {
  288. if($posterdata[user_level] != 3) {
  289.             echo "<br><img src=\"images/forum/special/$rankimage\" alt=\"$rank\"><br>";
  290. }
  291.         }
  292.  
  293.     
  294. }
  295.  
  296.            echo "<BR>"._FJOINED."<br>".convertidatasolo($posterdata[user_regdate])." \n";
  297.            
  298. if($posterdata[user_from]!="")
  299.            
  300.            echo "<br><br>"._FFROM."$posterdata[user_from]\n";
  301. echo "<br><br>"._FAPOSTS." <b>$posts</b><br><br>\n";
  302.  
  303.  
  304. $result2 = mysql_query("SELECT username,guest FROM $prefix"._session." where username='$posterdata[uname]'");
  305.             $member_online_num = mysql_num_rows($result2);
  306. if ($member_online_num != 0)
  307.           echo"<img src=\"images/forum/subject/rose.gif\" height=\"19\" width=\"19\"><font color=\"red\"><b>ON-Line</b></font><br><br>";
  308.     else
  309.           echo"<img src=\"images/forum/subject/icon20.gif\" height=\"19\" width=\"19\"><font color=\"blue\"><b>OFF-Line</b></font><br><br>";    
  310.  
  311. }
  312.         
  313.            else {
  314.            echo"<img src=\"images/forum/avatar/018.gif\"><br>";
  315.             echo "<font size=1>"._NOTREG."</font>";
  316.         }
  317.  
  318. }
  319.    echo"</td>";
  320.  
  321.    if ($myrow[image] != "") echo "<TD valign=\"top\"><img src=\"images/forum/subject/$myrow[image]\"><font size=1>";
  322.    else echo "<TD valign=\"top\"><img src=\"images/forum/icons/posticon.gif\"><font size=1>";
  323.  
  324.  
  325.    echo " "._FTPOSTED." ".convertiData($myrow[post_time])."   ";
  326.    echo "<HR></font>\n";
  327.    $message = stripslashes($myrow[post_text]);
  328. Opentable();
  329.    $message = eregi_replace("\[addsig]", "<br><br><BR>-----------------<BR>" . bbencode($posterdata[user_sig]), $message);
  330.  
  331.    echo $message . "<BR>";
  332. Closetable();
  333.  
  334. echo"</td></tr><TR BGCOLOR=\"$row_color\"><td>";
  335.    echo "<HR>\n";
  336.  
  337. if ($atch==1){
  338. echo ShowAttach($myrow[post_id]);
  339. }
  340.    if($posterdata[uid] != 1)
  341.    echo " <a href=\"modules.php?name=Your_Account&op=userinfo&uname=$posterdata[uname]\"><img src=\"images/forum/icons/profile.gif\" border=0></a><FONT SIZE=1>"._FAPROFIL."</FONT>\n";
  342.    if($posterdata["femail"] != '')
  343.      echo " <a href=\"mailto:$posterdata[femail]\"><IMG SRC=\"images/forum/icons/email.gif\" BORDER=0></a><FONT SIZE=1>"._FAEMAIL."</FONT>\n";
  344.    if($posterdata["url"] != '') {
  345.       if(strstr("http://", $posterdata["url"]))
  346.         $posterdata["url"] = "http://" . $posterdata["url"];
  347.       echo " <a href=\"$posterdata[url]\" TARGET=\"_blank\"><IMG SRC=\"images/forum/icons/www_icon.gif\" BORDER=0></a><FONT SIZE=1>www</FONT>\n";
  348.    }
  349.    if($posterdata["user_icq"] != '')
  350.      echo " <a href=\"http://wwp.icq.com/$posterdata[user_icq]#pager\" target=\"_blank\"><img src=\"http://online.mirabilis.com/scripts/online.dll?icq=$posterdata[user_icq]&img=5\" border=\"0\"></a> <a href=\"http://wwp.icq.com/scripts/search.dll?to=$posterdata[user_icq]\"><img src=\"images/forum/icons/icq_add.gif\" border=\"0\"></a><FONT SIZE=1>"._FAADD."</FONT>";
  351.  
  352.    if($posterdata["user_aim"] != '')
  353.      echo " <a href=\"aim:goim?screenname=$posterdata[user_aim]&message=Hi+$posterdata[user_aim].+Are+you+there?\"><img src=\"images/forum/icons/aim.gif\" border=\"0\"></a><FONT SIZE=1>aim</FONT>";
  354.  
  355.    if($posterdata["user_yim"] != '')
  356.      echo " <a href=\"http://edit.yahoo.com/config/send_webmesg?.target=$posterdata[user_yim]&.src=pg\"><img src=\"images/forum/icons/yim.gif\" border=\"0\"></a>";
  357.  
  358.    if($posterdata["user_msnm"] != '')
  359.     {
  360.      echo " <a href=\"modules.php?name=Your_Account&op=userinfo&uname=$posterdata[uname]\"><img src=\"images/forum/icons/msnm.gif\" border=\"0\"></a>";
  361.    echo " <IMG SRC=\"images/forum/icons/div.gif\">\n";
  362.     }
  363.    if(($posterdata[uid]==$userdata[0] && $lock_state != 1)|| $mod==$userdata[0] || $userdata[user_level] ==3)
  364.     {
  365.      echo " <a href=\"modules.php?op=modload&name=".$module_name."&file=editpost&post_id=$myrow[post_id]&topic=$topic&forum=$forum\"><img src=\"images/forum/icons/edit.gif\" border=0></a><FONT SIZE=1>"._FAEDIT."</FONT>\n";
  366.     echo " <IMG SRC=\"images/forum/icons/div.gif\">\n";
  367.     }
  368.     if($lock_state != 1)
  369.     {
  370.      echo " <a href=\"modules.php?op=modload&name=".$module_name."&file=reply&topic=$topic&forum=$forum&post=$myrow[post_id]"e=1&mod=$mod\"><IMG SRC=\"images/forum/icons/quote.gif\" BORDER=\"0\"></a><FONT SIZE=1>"._FAQOUTE."</FONT>\n";
  371. echo " <IMG SRC=\"images/forum/icons/div.gif\">\n";
  372.     }
  373.    if($viewip == 1) {
  374.       
  375.       echo " <a href=\"modules.php?op=modload&name=".$module_name."&file=topicadmin&mode=viewip&post=$myrow[post_id]&forum=$forum\"><IMG SRC=\"images/forum/icons/ip_logged.gif\" BORDER=0></a><FONT SIZE=1>ip</FONT>\n";
  376.     echo " <IMG SRC=\"images/forum/icons/div.gif\">\n";
  377. echo " <a href=\"modules.php?op=modload&name=Forums&file=editpost&post_id=$myrow[post_id]&topic_id=$topic&forum_id=$forum&submit1=1&delete=1\"><IMG SRC=\"images/forum/subject/icon41.gif\" BORDER=0></a><FONT SIZE=1> Delete</FONT>\n";
  378.    }
  379.    echo "</TD></TR>";
  380.    $count++;
  381. } while($myrow = mysql_fetch_array($result));
  382. $sql = "UPDATE ${prefix}_forumtopics SET topic_views = topic_views + 1 WHERE topic_id = '$topic'";
  383. @mysql_query($sql, $db);
  384. ?>
  385.  
  386. </TABLE></TD></TR></TABLE>
  387. <TABLE ALIGN="CENTER" BORDER="0" WIDTH="95%">
  388. <?php
  389. if($total > $posts_per_page) {
  390.         $times = 1;
  391.         echo "<TR ALIGN=\"RIGHT\"><TD COLSPAN=2><font size=1>"._FGOTO."";
  392.         for($x = 0; $x < $total; $x += $posts_per_page) {
  393.                 if($times != 1)
  394.                         echo " | ";
  395.                 echo "  <a href=\"modules.php?op=modload&name=".$module_name."&file=viewtopic&topic=$topic&forum=$forum&start=$x\">$times</a>";
  396.                 $times++;
  397.         }
  398.         echo "</TD></TR>\n";
  399. }
  400. ?>
  401. <TR>
  402.         <TD>
  403.                 <a href="modules.php?op=modload&name=<?php echo $module_name?>&file=newtopic&forum=<?php echo $forum?>&mod=<?php echo $mod?>"><IMG SRC="images/forum/nuovomess<? if($currentlang == english || $currentlang == french || $currentlang == german){echo "-$currentlang";}?>.gif" BORDER="0"></a>  
  404. <?php
  405.                 if($lock_state != 1) {
  406. ?>
  407.                         <a href="modules.php?op=modload&name=<?php echo $module_name?>&file=reply&topic=<?php echo $topic ?>&forum=<?php echo $forum ?>&mod=<?php echo $mod ?>"><IMG SRC="images/forum/rispondimess<? if($currentlang == english || $currentlang == french || $currentlang == german){echo "-$currentlang";}?>.gif" BORDER="0"></a></TD>
  408. <?php
  409.                 }
  410.                 else {
  411. ?>
  412.                         <IMG SRC="images/forum/icons/reply_locked-dark.jpg" BORDER="0"></TD>
  413. <?php
  414.                 }
  415. ?>
  416.         </TD>
  417. <TD ALIGN="RIGHT">
  418. <FORM ACTION="modules.php?op=modload&name=<?php echo $module_name?>&file=viewforum" METHOD="POST">
  419. <font face="Verdana" size="2"><?php echo _JUMPTO;?></font> <SELECT NAME="forum"><OPTION VALUE="-1"><?php echo _FSELECTF;?></OPTION>
  420. <?php
  421.         $sql = "SELECT cat_id, cat_title FROM ${prefix}_catagories ORDER BY cat_id";
  422.         if($result = mysql_query($sql, $db)) {
  423.                 $myrow = mysql_fetch_array($result);
  424.                 do {
  425.                         echo "<OPTION VALUE=\"-1\"> </OPTION>\n";
  426.                         echo "<OPTION VALUE=\"-1\">$myrow[cat_title]</OPTION>\n";
  427.                         echo "<OPTION VALUE=\"-1\">----------------</OPTION>\n";
  428.                         $sub_sql = "SELECT forum_id, forum_name FROM ${prefix}_forums WHERE cat_id = '$myrow[cat_id]' ORDER BY forum_id";
  429.                         if($res = mysql_query($sub_sql, $db)) {
  430.                                 if($row = mysql_fetch_array($res)) {
  431.                                         do {
  432.                                                 $name = stripslashes($row[forum_name]);
  433.                                                 echo "<OPTION VALUE=\"$row[forum_id]\">$name</OPTION>\n";
  434.                                         } while($row = mysql_fetch_array($res));
  435.                                 }
  436.                                 else {
  437.                                         echo "<OPTION VALUE=\"0\">"._FNOMORE."</OPTION>\n";
  438.                                 }
  439.                         }
  440.                         else {
  441.                                 echo "<OPTION VALUE=\"0\">"._FCOULDNOT."</OPTION>\n";
  442.                         }
  443.                 } while($myrow = mysql_fetch_array($result));
  444.         }
  445.         else {
  446.                 echo "<OPTION VALUE=\"-1\">"._FERRORE."</OPTION>\n";
  447.         }
  448. ?>
  449. </SELECT>
  450. <INPUT TYPE="SUBMIT" VALUE="Go">
  451. </FORM>
  452. </TR></TABLE>
  453.  
  454. <?php
  455. if(isset($userdata[0]))
  456. {
  457. list($level) = mysql_fetch_array(mysql_query("SELECT user_level FROM ${user_prefix}_users WHERE uid = '$userdata[0]'"));
  458.  
  459. if(($userdata[0] == $mod) or ($level == 3))
  460. {
  461. echo "<CENTER>";
  462. echo "<font size=1><b>"._FADMINT."</b></font><br>";
  463. echo "-------------------------<br>";
  464. if($lock_state != 1)
  465.         echo "<a href=\"modules.php?op=modload&name=".$module_name."&file=topicadmin&mode=lock&topic=$topic&forum=$forum\"><IMG SRC=\"images/forum/icons/lock_topic.gif\" ALT=\""._LOCKTHIS."\" BORDER=0></a> ";
  466. else
  467.         echo "<a href=\"modules.php?op=modload&name=".$module_name."&file=topicadmin&mode=unlock&topic=$topic&forum=$forum\"><IMG SRC=\"images/forum/icons/unlock_topic.gif\" ALT=\""._UNLOCKTHIS."\" BORDER=0></a> ";
  468.  
  469. echo "<a href=\"modules.php?op=modload&name=".$module_name."&file=topicadmin&mode=move&topic=$topic&forum=$forum\"><IMG SRC=\"images/forum/icons/move_topic.gif\" ALT=\""._FMOVET."\" BORDER=0></a> ";
  470. echo "<a href=\"modules.php?op=modload&name=".$module_name."&file=topicadmin&mode=del&topic=$topic&forum=$forum\"><IMG SRC=\"images/forum/icons/del_topic.gif\" ALT=\""._FDELT."\" BORDER=0></a></CENTER>\n";
  471.  
  472.     }
  473. }
  474.  
  475. echo"<p align=\"center\">Splatt Forum © By: <a href=\"http://www.splatt.it\" target=\"_blank\">Splatt.it</a><br>Version: $forumver</font></p><br><br>";
  476.  
  477. $mtime = microtime();
  478. $mtime = explode(" ",$mtime);
  479. $mtime = $mtime[1] + $mtime[0];
  480. $endtime = $mtime;
  481. $totaltime = ($endtime - $starttime);
  482. printf("<center><font size=-2>Elaboration time:  %f  seconds.</font></center><br>", $totaltime);
  483. include("footer.php");
  484. ?>