[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/blocks/ -> block-Supporters_Rn.php (source)

   1  <?php
   2  /*=======================================================================
   3   Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
   4   =======================================================================*/
   5  
   6  /********************************************************/
   7  /* NSN Supporters                                       */
   8  /* By: NukeScripts Network (webmaster@nukescripts.net)  */
   9  /* http://www.nukescripts.net                           */
  10  /* Copyright (c) 2000-2005 by NukeScripts Network         */
  11  /********************************************************/
  12  
  13  /*****[CHANGES]**********************************************************
  14  -=[Base]=-
  15        Nuke Patched                             v3.1.0       07/14/2005
  16   ************************************************************************/
  17  
  18  if(!defined('NUKE_EVO')) exit;
  19  
  20  include_once(NUKE_INCLUDE_DIR.'nsnsp_func.php');
  21  
  22  $sp_config = spget_configs();
  23  get_lang('Supporters');
  24  
  25  global $prefix, $db, $user, $admin, $admin_file;
  26  
  27  if(!isset($admin_file)) { $admin_file = "admin"; }
  28  $content = "<center>"._SP_SUPPORTEDBY."<br /><br />";
  29  $j = 1;
  30  while($j <= 5) {
  31    $sresult = $db->sql_query("SELECT `site_id` FROM `".$prefix."_nsnsp_sites` WHERE `site_status`='1'");
  32    $numrows = $db->sql_numrows($sresult);
  33    if($numrows==1) {
  34      list ($siteid) = $db->sql_fetchrow($sresult);
  35    } else if($numrows > 1) {
  36      $i = 1;
  37      while(list ($stid) = $db->sql_fetchrow($sresult)) {
  38        $abid[$i] = $stid;
  39        $i++;
  40      }
  41      $siteid = $abid[rand(1, $numrows)];
  42    } else {
  43      $siteid = 0;
  44    }
  45    if($j == 1) {
  46      $sitelist = "WHERE `site_id`='$siteid'";
  47    } else {
  48      $sitelist = $sitelist." OR `site_id`='$siteid'";
  49    }
  50    $j++;
  51  }
  52  $db->sql_freeresult($sresult);
  53  $result = $db->sql_query("SELECT `site_id`, `site_name`, `site_image` FROM `".$prefix."_nsnsp_sites` $sitelist");
  54  while(list($site_id, $site_name, $site_image) = $db->sql_fetchrow($result)) {
  55    list($width, $height, $type, $attr) = @getimagesize($site_image);
  56    if($width > $sp_config['max_width']) { $width = $sp_config['max_width']; }
  57    if($height > $sp_config['max_height']) { $height = $sp_config['max_height']; }
  58    //echo "<a href='modules.php?name=Supporters&amp;op=SPGo&amp;site_id=$site_id' target='_blank'><img src='$site_image' height='$height' width='$width' title='$site_name' alt='$site_name' border='0' /></a><br /><br />\n";
  59    $content .= "<a href='modules.php?name=Supporters&amp;op=SPGo&amp;site_id=$site_id' target='_blank'><img src='$site_image' height='$height' width='$width' title='$site_name' alt='$site_name' border='0' /></a><br /><br />\n";
  60  }
  61  $db->sql_freeresult($result);
  62  $content .="</center>\n";
  63  if($sp_config['require_user'] == 0 || is_user()) { $content .= "[ <a href='modules.php?name=Supporters&amp;op=SPSubmit'>"._SP_BESUPPORTER."</a> ]<br />\n"; }
  64  if(is_admin()) { $content .= "[ <a href='".$admin_file.".php?op=SPMain'>"._SP_GOTOADMIN."</a> ]<br />\n"; }
  65  $content .= "[ <a href='modules.php?name=Supporters'>"._SP_SUPPORTERS."</a> ]</center>\n";
  66  
  67  ?>


Generated: Wed Jun 6 11:38:01 2007 Cross-referenced by PHPXref 0.7