[ Index ]

PHP Cross Reference of Nuke-Evolution v2.0.5

title

Body

[close]

/blocks/ -> block-Supporters_Lt.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, $cache;
  26  
  27  if(!isset($admin_file)) { $admin_file = "admin"; }
  28  $content = "<center>"._SP_SUPPORTEDBY."<br /><br />";
  29  $content .= "<marquee behavior='scroll' direction='left' height='31' width='160' scrollamount='3' scrolldelay='90' width='100' onmouseover='this.stop()' onmouseout='this.start()'>\n";
  30  $result = $db->sql_query("SELECT `site_id`, `site_name`, `site_url`, `site_image`, `site_date`, `site_description`, `site_hits` FROM `".$prefix."_nsnsp_sites` WHERE `site_status`>'0' ORDER BY `site_name` DESC");
  31  if ((($image_atts = $cache->load('image_atts', 'nsnsp')) === false) || empty($image_atts)) {
  32      $image_atts = array();
  33      while(list($site_id, $site_name, $site_url, $site_image, $site_date, $site_description, $site_hits) = $db->sql_fetchrow($result)) {
  34          if (substr($site_image, 0, 5) == 'http:') {
  35              if (evo_site_up($site_image)) {
  36                  list($width, $height, $type, $attr) = @getimagesize($site_image);
  37              } else {
  38                  $width = $sp_config['max_width'];
  39                  $height = $sp_config['max_height'];
  40                  $type = '';
  41                  $attr = '';
  42              }
  43          } else {
  44             list($width, $height, $type, $attr) = @getimagesize($site_image);
  45          }
  46          $image_atts[] = array('site_id' => $site_id, 'site_name' => $site_name, 'site_url' => $site_url, 'site_image' => $site_image, 'site_date' => $site_date, 'site_description' => $site_description,
  47                                'site_hits' => $site_hits, 'width' => $width, 'height' => $height, 'type' => $type, 'attr' => $attr);
  48      }
  49      $db->sql_freeresult($result);
  50      $cache->save('image_atts', 'nsnsp', $image_atts);
  51  }
  52  for ($i=0, $max=count($image_atts); $i<$max; $i++) {
  53      $site_id = $image_atts[$i]['site_id'];
  54      $site_name = $image_atts[$i]['site_name'];
  55      $site_url = $image_atts[$i]['site_url'];
  56      $site_image = $image_atts[$i]['site_image'];
  57      $site_date = $image_atts[$i]['site_date'];
  58      $site_description = $image_atts[$i]['site_description'];
  59      $site_hits = $image_atts[$i]['site_hits'];
  60      $width = $image_atts[$i]['width'];
  61      $height = $image_atts[$i]['height'];
  62      $type = $image_atts[$i]['type'];
  63      $attr = $image_atts[$i]['attr'];
  64    list($width, $height, $type, $attr) = @getimagesize($site_image);
  65    if($width > $sp_config['max_width']) { $width = $sp_config['max_width']; }
  66    if($height > $sp_config['max_height']) { $height = $sp_config['max_height']; }
  67    $content .= "&nbsp;<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>&nbsp;\n";
  68  }
  69  $content .="</marquee><br /><br />\n";
  70  if($sp_config['require_user'] == 0 || is_user()) { $content .= "[ <a href='modules.php?name=Supporters&amp;op=SPSubmit'>"._SP_BESUPPORTER."</a> ]<br />\n"; }
  71  if(is_admin()) { $content .= "[ <a href='".$admin_file.".php?op=SPMain'>"._SP_GOTOADMIN."</a> ]<br />\n"; }
  72  $content .= "[ <a href='modules.php?name=Supporters'>"._SP_SUPPORTERS."</a> ]</center>\n";
  73  
  74  ?>


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