[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/plugins/spamx/ -> DeleteComment.Action.class.php (source)

   1  <?php
   2  
   3  /**
   4   * File: DeleteComment.Action.class.php
   5   * This is the Delete Comment Action  for the Geeklog Spam-X plugin
   6   * 
   7   * Copyright (C) 2004-2005 by the following authors:
   8   * Author   Tom Willett     tomw AT pigstye DOT net
   9   * 
  10   * Licensed under GNU General Public License
  11   *
  12   * $Id: DeleteComment.Action.class.php,v 1.6 2006/08/22 17:57:54 dhaun Exp $
  13   */
  14  
  15  if (strpos ($_SERVER['PHP_SELF'], 'DeleteComment.Action.class.php') !== false) {
  16      die ('This file can not be used on its own!');
  17  }
  18  
  19  /**
  20   * Include Abstract Action Class
  21   */
  22  require_once($_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php');
  23  
  24  /**
  25   * Action Class which just discards comment
  26   * 
  27   * @author Tom Willett  tomw@pigstye.net 
  28   */
  29  class DeleteComment extends BaseCommand {
  30      /**
  31       * Constructor
  32       * Numbers are always binary digits and added together to make call
  33       */
  34      function DeleteComment()
  35      {
  36          global $num;
  37  
  38          $num = 128;
  39      } 
  40  
  41      function execute($comment)
  42      {
  43          global $result, $_CONF, $_TABLES, $LANG_SX00;
  44          $result = 128;
  45  
  46          // update count of deleted spam posts
  47          DB_change ($_TABLES['vars'], 'value', 'value + 1', 'name', 'spamx.counter', '', true);
  48  
  49          SPAMX_log($LANG_SX00['spamdeleted']);
  50  
  51          return 1;
  52      } 
  53  } 
  54  
  55  ?>


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