home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / unitednuke / unitednuke.exe / html / modules / News / associates.php < prev    next >
PHP Script  |  2004-01-10  |  2KB  |  40 lines

  1. <?php
  2.  
  3. /************************************************************************/
  4. /* PHP-NUKE: Web Portal System                                          */
  5. /* ===========================                                          */
  6. /*                                                                      */
  7. /* Copyright (c) 2002 by Francisco Burzi                                */
  8. /* http://phpnuke.org                                                   */
  9. /*                                                                      */
  10. /* This program is free software. You can redistribute it and/or modify */
  11. /* it under the terms of the GNU General Public License as published by */
  12. /* the Free Software Foundation; either version 2 of the License.       */
  13. /************************************************************************/
  14.  
  15. if (!eregi("modules.php", $_SERVER["PHP_SELF"])) {
  16.     die("You can't access this file directly...");
  17. }
  18.  
  19. require_once("mainfile.php");
  20. $module_name = basename(dirname(__FILE__));
  21. get_lang($module_name);
  22. $sid = intval($sid);
  23. $arow = $db->sql_fetchrow($db->sql_query("SELECT associated FROM ".$prefix."_stories WHERE sid='$sid'"));
  24.  
  25. if ($arow[associated] != "") {
  26.     OpenTable();
  27.     echo "<center><b>"._ASSOTOPIC."</b><br><br>";
  28.     $asso_t = explode("-",$arow[associated]);
  29.     for ($i=0; $i<sizeof($asso_t); $i++) {
  30.     if ($asso_t[$i] != "") {
  31.         $atop = $db->sql_fetchrow($db->sql_query("SELECT topicimage, topictext from ".$prefix."_topics WHERE topicid='$asso_t[$i]'"));
  32.         echo "<a href=\"modules.php?name=$module_name&new_topic=$asso_t[$i]\"><img src=\"$tipath$atop[topicimage]\" border=\"0\" hspace=\"10\" alt=\"$atop[topictext]\" title=\"$atop[topictext]\"></a>";
  33.     }
  34.     }
  35.     echo "</center>";
  36.     CloseTable();
  37.     echo "<br>";
  38. }
  39.  
  40. ?>