[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/plugins/spamx/ -> SLV.Examine.class.php (source)

   1  <?php
   2  
   3  /**
   4  * File: SLV.Examine.class.php
   5  * This is the Spam Link Verification Examine class for the Geeklog Spam-X plugin
   6  *
   7  * Copyright (C) 2006 by the following authors:
   8  * Author        Dirk Haun       dirk AT haun-online DOT de
   9  *
  10  * Licensed under the GNU General Public License
  11  *
  12  * $Id: SLV.Examine.class.php,v 1.1 2006/08/27 09:30:19 dhaun Exp $
  13  */
  14  
  15  if (strpos ($_SERVER['PHP_SELF'], 'SLV.Examine.class.php') !== false) {
  16      die ('This file can not be used on its own!');
  17  }
  18  
  19  /**
  20  * Include Base Classes
  21  */
  22  require_once ($_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php');
  23  require_once ($_CONF['path'] . 'plugins/spamx/' . 'SLVbase.class.php');
  24  
  25  /**
  26  * Sends posts to SLV (linksleeve.org) for examination
  27  *
  28  * @author Dirk Haun     dirk AT haun-online DOT de
  29  *
  30  * based on the works of Tom Willet (Spam-X) and Russ Jones (SLV)
  31  */
  32  
  33  class SLV extends BaseCommand {
  34      /**
  35       * No Constructor Use BaseCommand constructor
  36       */
  37  
  38      /**
  39       * Here we do the work
  40       */
  41      function execute ($comment)
  42      {
  43          global $_USER, $LANG_SX00;
  44  
  45          $ans = 0;
  46  
  47          if (isset ($_USER['uid']) && ($_USER['uid'] > 1)) {
  48              $uid = $_USER['uid'];
  49          } else {
  50              $uid = 1;
  51          }
  52  
  53          $slv = new SLVbase();
  54          if ($slv->CheckForSpam ($comment)) {
  55              $ans = 1;
  56              SPAMX_log ($LANG_SX00['foundspam'] . 'Spam Link Verification (SLV)'.
  57                         $LANG_SX00['foundspam2'] . $uid .
  58                         $LANG_SX00['foundspam3'] . $_SERVER['REMOTE_ADDR']);
  59          }
  60  
  61          // tell the Action module that we've already been triggered
  62          $GLOBALS['slv_triggered'] = true;
  63  
  64          return $ans;
  65      }
  66  }
  67  
  68  ?>


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics