nukeSEO.com - PHPNuke SEO Search engine optimization, professional tools including nukeSEO, nukeSPAM, nukeFEED, nukePIE, nukeWYSIWYG and more

 

. Welcome to nukeSEO.com  ! 
.
.
.


.
nukeSEO.com: Forums


 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

nukeSPAM update
 Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    nukeSEO.com Forum Index -> nukeSPAM (tm)
View previous topic :: View next topic  
Author Message
neralex
webmaster


Joined: Feb 22, 2008
Posts: 20

PostPosted: Sun May 19, 2013 11:14 am    Post subject: Reply with quote

Ok cool, then i change it back to the limited 25 characters!

Yes i do it to get a faster page-load. The most jQuery scripts working also at the end of the body. Check my media-page, there are all jquery scripts at the end of the body. The browser can render the whole page without to wait on the client sided loading of the jquery scripts. If you are using a lot of jquery scripts it can help to speed up the page. Sure if you are building a page only based on jquery like facebook, then it should be placed in the head but the most of us using jquery only as addon and in this case the whole html-markup is rendered by the browser, the user can see the page and the jquery scripts loads after the markup building.
  

Last edited by neralex on Tue Oct 07, 2014 4:23 am; edited 1 time in total
Back to top
View user's profile Send private message
hicux
webmaster


Joined: Apr 28, 2008
Posts: 13

PostPosted: Tue Jun 11, 2013 7:39 pm    Post subject: Reply with quote

Hi kguske

I got all the same errors that neralex mentioned before. I made all modifications but I still get an error like this:

Code:


Code: 1146 - Message: Table '.nuke_spam_log' doesn't exist
SQL was: SELECT 1 FROM `nuke_spam_log` LIMIT 0
  
Back to top
View user's profile Send private message Visit poster's website
hicux






PostPosted: Tue Oct 15, 2013 5:57 pm    Post subject: Reply with quote

Any solution for this error?
  
Back to top
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 876

PostPosted: Wed Oct 16, 2013 8:28 pm    Post subject: Reply with quote

Looks like something wrong with a change. The period before the prefix ".nuke_spam_log" seems to be the reason. Does the table nuke_spam_log (without the preceeding period) exist?
_________________
  
Back to top
View user's profile Send private message Visit poster's website
hicux






PostPosted: Thu Oct 17, 2013 1:39 am    Post subject: Reply with quote

I think that is the problem.

nuke_spam_log doesn't exist. Can u give a sqldata of this module to test something? I did all the steps from neralex. I got the same errors he got.

Shocked

Code:
Code: 1146 - Message: Table 'Sqlmytable_2.nuke_spam_log' doesn't exist

SQL was: INSERT INTO nuke_spam_log (username, ip, email, matched, count, added, request) VALUES('fluixnomotini', INET_ATON('31.184.238.4'), 'www.bestbuildpc.org@maysunsaluki.com', 'fSpamList', '1', '1381879440', 'UR')
 remote addr: 31.184.238.4


This is the error I am getting. Can u plz solve this issue?

Note: This is the only database I have from nukeSpam module

nuke_spam_whitelist
  
Back to top
hicux






PostPosted: Thu Oct 17, 2013 1:55 am    Post subject: Reply with quote

Another error I get

Code:
Code: 1071 - Message: Specified key was too long; max key length is 1000 bytes

SQL was: CREATE TABLE `nuke_spam_log` ( `slid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `request` CHAR( 6 ) NOT NULL , `username` VARCHAR( 255 ) NOT NULL , `email` VARCHAR( 255 ) NOT NULL , `ip` INT UNSIGNED NOT NULL , `matched` VARCHAR( 255 ) NOT NULL , `added` INT( 11 ) NOT NULL , `count` INT UNSIGNED NOT NULL , INDEX ( `request` ), INDEX ( `username` , `email` , `ip` ), INDEX ( `email` , `ip` ), INDEX ( `ip` , `email` ) ) ENGINE=MyISAM;
 remote addr:


Shouldn't this one

Code:
    $getValueSQL = 'SELECT config_value as value FROM `'.$prefix.'_seo_config` where config_type=\'nukeSPAM\' and config_name = \'version_number\'';

    $updateSQL = array();
    $updateSQL[] = "UPDATE `".$prefix."_seo_config` SET config_value = '".nukeSPAM_version."' where config_type='nukeSPAM' and config_name = 'version_number';";
    seoCheckUpdateTable($getValueSQL, '".nukeSPAM_version."', $updateSQL);


Replace it with

Code:
    $getValueSQL = 'SELECT `config_value` as value FROM `'.$prefix.'_seo_config` where `config_type` = \'nukeSPAM\' and `config_name` = \'version_number\'';

    $updateSQL = array();
    $updateSQL[] = 'UPDATE `' . $prefix . '_seo_config` SET `config_value` = '" . nukeSPAM_version . "' where `config_type` = \'nukeSPAM\' and `config_name` = \'version_number\';';
    seoCheckUpdateTable($getValueSQL, '" . nukeSPAM_version . "', $updateSQL);


I think we are missing some backticks and I only have one table from this module as I mention above. I am gonna test it more.

Note: Admin index.php still has the same version

Code:


define('nukeSPAM_version', '1.0.0');


Should be

Code:
define('nukeSPAM_version', '1.0.1');
  
Back to top
hicux






PostPosted: Thu Oct 17, 2013 2:51 am    Post subject: Reply with quote

After making some changes now I have 2 tables there.

spam_log
spam_whitelist

This is my admin index.php. I will convert everything to single quote soon. I needed to fix this first.

Code:
if ( !function_exists('seoCheckInstall') ) {

   function seoCheckInstall() {
      // table creation is MySQL-specific
      global $prefix, $sitename;
      define('nukeSPAM_version', '1.0.1');
      // Create seo_config table
      $existSQL = 'SELECT 1 FROM `' . $prefix . '_seo_config` LIMIT 0';
      $createSQL = array();
      $createSQL[] = 'CREATE TABLE `' . $prefix . '_seo_config` (
         `config_type` varchar(150) NOT NULL,
         `config_name` varchar(150) NOT NULL,
         `config_value` text NOT NULL,
         PRIMARY KEY  (`config_type`,`config_name`)
         ) ENGINE=MyISAM;';
      seoCheckCreateTable($existSQL, $createSQL);

      $existSQL = 'SELECT 1 FROM `' . $prefix . '_seo_config` where `config_type` = \'nukeSPAM\' LIMIT 0 INTO @x';
      $createSQL = array();
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'baseMatch\', \'\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'debug\', 0);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'logToDB\', 0);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'logToTextFile\', 0);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'theme\', \'smoothness\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'use_reg\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'usefSpamList\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useStopForumSpam\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useBotScout\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useDNSBL\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useDroneACH\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useHTTPBLACH\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useSpamACH\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useZeusACH\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useAHBL\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useBLDE\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useProjectHoneyPot\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useSorbs\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useSpamHaus\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useSpamCop\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useDroneBL\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useTornevall\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useEFNet\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useTor\', 1);';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'keyfSpamList\', \'\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'keyStopForumSpam\', \'\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'keyBotScout\', \'\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'keyProjectHoneyPot\', \'\');';
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'version_check\', 0);';
    $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'version_newest\', \'' . nukeSPAM_version . '\');';
    $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'version_number\', \'' . nukeSPAM_version . '\');';
    $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'version_url\', "http://nukeSEO.com/modules.php?name=Downloads");';
    $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'version_notes\', \'\');';
    seoCheckCreateTable($existSQL, $createSQL);

    $getValueSQL = 'SELECT `config_value` as value FROM `' . $prefix . '_seo_config` where `config_type` = \'nukeSPAM\' and `config_name` = \'version_number\'';
    $updateSQL = array();
    $updateSQL[] = 'UPDATE `' . $prefix . '_seo_config` SET `config_value` = \'' . nukeSPAM_version . '\' where `config_type` = \'nukeSPAM\' and `config_name` = \'version_number\';';
    seoCheckUpdateTable($getValueSQL, '' . nukeSPAM_version . '', $updateSQL);

      // Create nukeSPAM log table
      $existSQL = 'SELECT 1 FROM `' . $prefix . '_spam_log` LIMIT 0';
      $createSQL = array();
      $createSQL[] = 'CREATE TABLE `' . $prefix . '_spam_log` (
         `slid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
         `request` CHAR( 6 ) NOT NULL ,
         `username` VARCHAR( 25 ) NOT NULL ,
         `email` VARCHAR( 255 ) NOT NULL ,
         `ip` INT UNSIGNED NOT NULL ,
         `matched` VARCHAR( 255 ) NOT NULL ,
         `added` INT( 11 ) NOT NULL ,
         `count` INT UNSIGNED NOT NULL ,
         INDEX (  `request` ),
         INDEX (  `username` ,  `email` ,  `ip` ),
         INDEX (  `email` ,  `ip` ),
         INDEX (  `ip` ,  `email`  )
         ) ENGINE=MyISAM;';
      seoCheckCreateTable($existSQL, $createSQL);

      // Create nukeSPAM whitelist table
      $existSQL = 'SELECT 1 FROM `' . $prefix . '_spam_whitelist` LIMIT 0';
      $createSQL = array();
      $createSQL[] = 'CREATE TABLE `' . $prefix . '_spam_whitelist` (
         `wlid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
         `wltype` CHAR( 1 ) NOT NULL ,
         `wlvalue` VARCHAR( 255 ) NOT NULL ,
         INDEX (  `wltype` ,  `wlvalue`  )
         ) ENGINE=MyISAM;';
      seoCheckCreateTable($existSQL, $createSQL);

      // Add blocklist.de database
       $existSQL = 'SELECT 1 FROM `' . $prefix . '_seo_config` WHERE `config_type` = \'nukeSPAM\' and `config_name` = \'useBLDE\' LIMIT 0 INTO @x';
      $createSQL = array();
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'useBLDE\', 1);';
      seoCheckCreateTable($existSQL, $createSQL);

      // Add jQuery UI Theme
      $existSQL = 'SELECT 1 FROM `' . $prefix . '_seo_config` WHERE `config_type` = \'nukeSPAM\' and `config_name` = \'theme\' LIMIT 0 INTO @x';
      $createSQL = array();
      $createSQL[] = 'INSERT INTO `' . $prefix . '_seo_config` VALUES (\'nukeSPAM\', \'theme\', \'smoothness\');';
      seoCheckCreateTable($existSQL, $createSQL);
  }
}

global $admin_file, $admin, $db, $prefix;
if(!isset($admin_file)) { $admin_file = 'admin'; }
if(!defined('ADMIN_FILE')) {
   Header('Location: ../../../' . $admin_file . '.php');
   die();
}

$module_name = basename(dirname(dirname(__FILE__)));
if (function_exists('is_mod_admin')) {
   $modAdmin = is_mod_admin($module_name);
} else {
   $modAdmin = is_admin($admin);
}
if ($modAdmin) {

   // Module Definition
   seoCheckInstall();
   // Header stuff:

#  $pagetitle = ' - '._SPAM_ADMIN;
   addJSToHead('includes/jquery/jquery.js', 'file');
   addJSToHead('includes/jquery/jquery.cookie.min.js', 'file');
   include_once 'header.php';
   $checktime = strtotime(date("Y-m-d", TIME()));
   $seoModule = 'nukeSPAM';
   $seoConfig = seoGetConfigs($seoModule);
   OpenTable();
   echo '<div class="text-center"><h2>nukeSPAM&trade;</h2></div>
            <table width="100%" border="0">';
   echo '<tr>
               <td>' . seoHelp('_SPAM_CONFIG').' <a href="' . $admin_file . '.php?op=nukeSPAMConfig">' . _SPAM_CONFIG . '</a></td>
               <td>' . seoHelp('_SPAM_WL').' <a href="' . $admin_file . '.php?op=nukeSPAMWL">' . _SPAM_WL . '</a></td>
               <td>' . seoHelp('_SPAM_CHECK').' <a href="' . $admin_file . '.php?op=nukeSPAMCheck">' . _SPAM_CHECK . '</a></td>
               <td>' . seoHelp('_SPAM_SITEADMIN') . ' <a href="' . $admin_file . '.php">' . _SPAM_SITEADMIN . '</a></td>
            </tr></table>';
   CloseTable();
   OpenTable();

   switch ($_REQUEST['op']) {
      case 'nukeSPAM':
      case 'nukeSPAMConfig':
         include_once('modules/' . $module_name . '/admin/nukeSPAMConfig.php');
         break;
      case 'nukeSPAMCheck':
         include('modules/' . $module_name . '/admin/nukeSPAMCheck.php');
         break;
      case 'nukeSPAMSaveConfig':
         csrf_check();
         include_once('modules/' . $module_name . '/admin/nukeSPAMConfig.php');
         break;
      case 'nukeSPAMWL':
         include_once('modules/' . $module_name . '/admin/nukeSPAMWL.php');
         break;
   }
} else {
   include_once 'header.php';
   GraphicAdmin();
   OpenTable();
   echo '<div class="text-center"><span class="thick">' . _ERROR . '</span><br /><br />' . $module_name . '</div>';
}

CloseTable();
include_once 'footer.php';
  

Last edited by hicux on Thu Oct 17, 2013 7:37 am; edited 2 times in total
Back to top
kguske






PostPosted: Thu Oct 17, 2013 5:15 am    Post subject: Reply with quote

Change the size of the user field from:
Code:
CREATE TABLE `nuke_spam_log` ( `slid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `request` CHAR( 6 ) NOT NULL , `username` VARCHAR( 255 ) NOT NULL , `email` VARCHAR( 255 ) NOT NULL , `ip` INT UNSIGNED NOT NULL , `matched` VARCHAR( 255 ) NOT NULL , `added` INT( 11 ) NOT NULL , `count` INT UNSIGNED NOT NULL , INDEX ( `request` ), INDEX ( `username` , `email` , `ip` ), INDEX ( `email` , `ip` ), INDEX ( `ip` , `email` ) ) ENGINE=MyISAM; 

to:
Code:
CREATE TABLE `nuke_spam_log` ( `slid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `request` CHAR( 6 ) NOT NULL , `username` VARCHAR( 25 ) NOT NULL , `email` VARCHAR( 255 ) NOT NULL , `ip` INT UNSIGNED NOT NULL , `matched` VARCHAR( 255 ) NOT NULL , `added` INT( 11 ) NOT NULL , `count` INT UNSIGNED NOT NULL , INDEX ( `request` ), INDEX ( `username` , `email` , `ip` ), INDEX ( `email` , `ip` ), INDEX ( `ip` , `email` ) ) ENGINE=MyISAM; 

Just execute that SQL in phpMyAdmin to create the table, and everything else should work. You could also change `username` varchar(255) to `username` varchar(25) in the modules/nukeSPAM/admin/index.php, then go back to the nukeSPAM admin page and it will create the table (assuming nothing else has been changed incorrectly).
  
Back to top
hicux






PostPosted: Thu Oct 17, 2013 7:11 am    Post subject: Reply with quote

That I did already and that is why it is working now. Did you see it above how I changed it. Wink
  
Back to top
kguske






PostPosted: Thu Oct 17, 2013 7:29 am    Post subject: Reply with quote

That should have been the only necessary change. What is the current error? Version number shouldn't be an issue.
  
Back to top
hicux






PostPosted: Thu Oct 17, 2013 7:33 am    Post subject: Reply with quote

Can u please fix validation issue from nukeSPAMWL.php
we have problem here

Code:
echo '

<form id="formAddNewRow" action="#" style="width:800px;min-width:800px">
   <table border="0">
   <tr><td style="vertical-align:text-top;"><label for="wltype">Whitelist Type</label></td><td>
      <input type="hidden" name="id" id="id" value="DATAROWID" rel="0" />
      <input type="hidden" name="unused" id="wltype" value="" />
      <input type="radio" name="wltype" id="wltypeu" value="u" rel="1" class="required" /> <label for="wltypeu">' . _SPAM_USERNAME . '</label><br />
      <input type="radio" name="wltype" id="wltypee" value="e" rel="1" /> <label for="wltypee">' . _SPAM_EMAIL . '</label><br />
      <input type="radio" name="wltype" id="wltypei" value="i" rel="1" /> <label for="wltypei">' . _SPAM_IP .'</label><br />
      <label for="wltype" class="error">Please select the Whitelist Type</label>
   </td></tr>
   <tr><td style="vertical-align:text-top;"><label for="wlvalue">Whitelist Value</label></td><td><input type="text" name="wlvalue" id="wlvalue" rel="2" size="50" class="required" /><br />
   <label for="wlvalue" class="error">Please enter the Whitelist Value</label>
   </td></tr>
   </table>
</form>


Code:
line 640 column 3 - Warning: <input> proprietary attribute "rel"
  
Back to top
hicux






PostPosted: Thu Oct 17, 2013 7:39 am    Post subject: Reply with quote

I converted the whole index.php from nukeSpam admin to help you out a little bit. I think I will do everything if I have the time. u can see it above. I am not getting anymore error. Very Happy

Sorry to bother u again. Why I can not see this table in my phpMyadmin

_seo_config

This table should be there right? Shocked
  
Back to top
kguske






PostPosted: Thu Oct 17, 2013 5:11 pm    Post subject: Reply with quote

Yes, the seo_config table should be there. Without it, you will basically only be able to check the IP databases that don't require an API key.

What was the goal was for converting the admin index file? Can you compress the changes so I can download them and review?
  
Back to top
hicux






PostPosted: Fri Oct 18, 2013 1:22 am    Post subject: Reply with quote

I think I found the table. it was in the first page. That's why I coudn't see it. Everything is working properly!! Very Happy thanks

The whole module

www.bestbuildpc.org/nukeSPAM.zip
  

Last edited by hicux on Fri Oct 18, 2013 4:02 am; edited 1 time in total
Back to top
hicux






PostPosted: Fri Oct 18, 2013 3:26 am    Post subject: Reply with quote

from modules/nukeSPAM/funcions.php I updated some codes with backticks and single quotes.

Search for

Code:
   // Check to see if our spammer already exists (compares username/IP/E-mail AND the database they are listed in, returns false if only one matches)

   $sSQL = 'SELECT count FROM ' . $prefix . '_spam_log WHERE username=\''.$spammername.'\' OR ip=\''.$spammerip.'\' OR email=\''.$spammeremail.'\'';
   $sQuery = $db->sql_query($sSQL);
   $num = $db->sql_numrows($sQuery);
   if($num==0){return false;}else{return true;}
}


Replace with

Code:
   // Check to see if our spammer already exists (compares username/IP/E-mail AND the database they are listed in, returns false if only one matches)

   $sSQL = 'SELECT `count` FROM `' . $prefix . '_spam_log` WHERE `username` = \'' . $spammername . '\' OR `ip` = \'' . $spammerip . '\' OR `email` = \'' . $spammeremail . '\'';
   $sQuery = $db->sql_query($sSQL);
   $num = $db->sql_numrows($sQuery);
   if($num==0){return false;}else{return true;}
}


Search for

Code:
   $bAddNewSpammer='ADD';

      // Check to see if our spammer already exists (compares username/IP/E-mail AND the database they are listed in, returns false if only one matches)
      $sSQL = "SELECT * FROM " . $prefix . "_spam_log WHERE username='$spammername' OR ip='$spammerip' OR email='$spammeremail' AND matched='$spamdb' AND request='$nukeSPAMrequest'";
      $sQuery = $db->sql_query($sSQL);
      if(!$sQuery){
      }else{
         $num = $db->sql_numrows($sQuery);
         while ($row = $db->sql_fetchrow($sQuery)) {
            $bAddNewSpammer=$row['slid'];
            $lSpammerCount=$row['count'];
         }
      }

      if($bAddNewSpammer=='ADD'){
         // ADD SPAMMER
         $sDate = time();
         $sSQL = 'INSERT INTO ' . $prefix . '_spam_log (username, ip, email, matched, count, added, request) VALUES(\''.$spammername.'\', INET_ATON(\''.$spammerip.'\'), \''.$spammeremail.'\', \''.$spamdb.'\', \'1\', \''.$sDate.'\', \''. $nukeSPAMrequest.'\')';
      }else{
         // UPDATE SPAMMER
         $lSpammerCount = $lSpammerCount+1;
         $sSQL = 'UPDATE ' . $prefix . '_spam_log SET count=\'' . $lSpammerCount . '\' WHERE slid=\'' . $bAddNewSpammer . '\'';
      }
      $result = $db->sql_query($sSQL);
      return true;
}


Replace with

Code:
   $bAddNewSpammer='ADD';

      // Check to see if our spammer already exists (compares username/IP/E-mail AND the database they are listed in, returns false if only one matches)
      $sSQL = 'SELECT * FROM `' . $prefix . '_spam_log` WHERE `username` = \'' . $spammername . '\' OR `ip` = \'' . $spammerip . '\' OR `email` = \'' . $spammeremail . '\' AND `matched` = \'' . $spamdb . '\' AND `request` = \'' . $nukeSPAMrequest . '\'';
      $sQuery = $db->sql_query($sSQL);
      if(!$sQuery){
      }else{
         $num = $db->sql_numrows($sQuery);
         while ($row = $db->sql_fetchrow($sQuery)) {
            $bAddNewSpammer=$row['slid'];
            $lSpammerCount=$row['count'];
         }
      }

      if($bAddNewSpammer=='ADD'){
         // ADD SPAMMER
         $sDate = time();
         $sSQL = 'INSERT INTO `' . $prefix . '_spam_log` (`username`, `ip`, `email`, `matched`, `count`, `added`, `request`) VALUES(\'' . $spammername . '\', INET_ATON(\'' . $spammerip . '\'), \'' . $spammeremail . '\', \'' . $spamdb . '\', \'1\', \'' . $sDate . '\', \'' . $nukeSPAMrequest . '\')';
      }else{
         // UPDATE SPAMMER
         $lSpammerCount = $lSpammerCount+1;
         $sSQL = 'UPDATE `' . $prefix . '_spam_log` SET `count` = \'' . $lSpammerCount . '\' WHERE `slid` = \'' . $bAddNewSpammer . '\'';
      }
      $result = $db->sql_query($sSQL);
      return true;
}


Note: There isn't any bug or issue on these lines above but I like to clean up to get rid of any problem in the future.
  
Back to top
Display posts from previous:       
Post new topic   Reply to topic    nukeSEO.com Forum Index -> nukeSPAM (tm) All times are GMT - 5 Hours
 Goto page Previous  1, 2, 3, 4, 5  Next
 Page 4 of 5

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001-2008 phpBB Group


Page Generation: 0.07 Seconds