[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

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

   1  <?php
   2  
   3  /************************************************************************/

   4  /* PHP-NUKE: Web Portal System                                          */

   5  /* ===========================                                          */

   6  /*                                                                      */

   7  /* Copyright (c) 2005 by Francisco Burzi                                */

   8  /* http://phpnuke.org                                                   */

   9  /*                                                                      */

  10  /* Based on Last Referers Block                                         */

  11  /* Copyright (c) 2001 by Jack Kozbial (jack@internetintl.com            */

  12  /* http://www.InternetIntl.com                                          */

  13  /*                                                                      */

  14  /* This program is free software. You can redistribute it and/or modify */

  15  /* it under the terms of the GNU General Public License as published by */

  16  /* the Free Software Foundation; either version 2 of the License.       */

  17  /************************************************************************/

  18  
  19  if ( !defined('BLOCK_FILE') ) {
  20      Header("Location: ../index.php");
  21      die();
  22  }
  23  
  24  global $prefix, $db, $admin, $admin_file;
  25  
  26  $ref = 10; // how many referers in block

  27  $a = 1;
  28  $result = $db->sql_query("SELECT rid, url FROM " . $prefix . "_referer ORDER BY rid DESC LIMIT 0,$ref");
  29  while ($row = $db->sql_fetchrow($result)) {
  30      $rid = intval($row['rid']);
  31      $url = filter($row['url'], "nohtml");
  32      $url2 = str_replace("_", " ", $url);
  33      if(strlen($url2) > 18) {
  34      $url2 = substr($url,0,20);
  35          $url2 .= "..";
  36      }
  37      $content .= "$a:&nbsp;<a href=\"$url\" target=\"new\">$url2</a><br>";
  38      $a++;
  39  }
  40  if (is_admin($admin)) {
  41      $total = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_referer"));
  42      $content .= "<br><center>$total "._HTTPREFERERS."<br>[ <a href=\"".$admin_file.".php?op=delreferer\">"._DELETE."</a> ]</center>";
  43      
  44  }
  45  
  46  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7