Ignore:
Timestamp:
Nov 8, 2009, 5:38:51 PM (14 years ago)
Author:
cljosse
Message:

[mail_supervisor] Addition of jocker in spammers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/include/fonctions.php

    r4224 r4229  
    595595                SELECT ".$champs.",COUNT(`id`) as total
    596596                FROM `".MAIL_BLACK_LISTE_TABLE."`
    597                     WHERE `ip` LIKE '".$ip."'
     597                    WHERE '".$ip."' LIKE `ip`
    598598                ;";     
    599599                 $result = @pwg_query($query);
     
    603603                                        $result = @pwg_query($query);
    604604                                        }
    605          $datas = mysql_fetch_array($result,MYSQL_ASSOC);
    606 
     605            $datas = mysql_fetch_array($result,MYSQL_ASSOC);
    607606                 $nb = $datas['total'];
     607                 
    608608if ($mails_options[5] == 'on')
    609609{
     
    635635        if (  $nb > 0 )
    636636        {
    637             $erreur_message .= $ip . ' | ' . $pays . ' | ' . $region . ' | ' . $ville . ' ==> ';
     637               $query = "
     638                SELECT ".$champs.",COUNT(`id`) as total
     639                FROM `".MAIL_BLACK_LISTE_TABLE."`
     640                    WHERE '".$ip."' = `ip`
     641                ;";     
     642                 $result = @pwg_query($query);
     643 
     644        if (!$result) {
     645                                        vérif_base();
     646                                        $result = @pwg_query($query);
     647                                        }
     648            $datas = mysql_fetch_array($result,MYSQL_ASSOC);
     649                 $nb = $datas['total'];
     650                 
    638651            $row  = mysql_fetch_row(pwg_query($query));
    639             $nb =  ($row[7])+1;
     652            $nb =  ($row[7]);
     653      $erreur_message .= $ip . ' | ' . $pays . ' | ' . $region . ' | ' . $ville . ' ' . $nb . ' ==> '; 
     654 
     655         if ($nb == 0)
     656                 {
     657                        $valeurs=array( 'NULL',
     658                            "'".$ip."'",
     659                                        "'".$pays."'",
     660                                        "'".$region."'",       
     661                                        "'".$ville."'",
     662                                        '"adresse"',
     663                                        '"fai" ',
     664                                        1
     665              );
     666                  ajout_ligne(MAIL_BLACK_LISTE_TABLE,$superv_bl_champs, $valeurs,true) ;       
     667                 
     668                 } else {
     669                  $nb += 1;
    640670         $query ="
    641671                        UPDATE " . MAIL_BLACK_LISTE_TABLE . "
     
    649679                 $query .= "           
    650680                        `nb` = " . $nb . "
    651                           WHERE ip = '". $ip ."' ;
     681                    WHERE '".$ip."' = `ip`
    652682                ";
    653                                 pwg_query($query );
     683               
     684                                pwg_query($query );     
     685                                }
    654686        //================================================================================     
    655687               
Note: See TracChangeset for help on using the changeset viewer.