Current time: 10-27-2012, 12:11 AM    Register | Lost Password?

Contest #1- First member to have 5 referals will get VIP status. You can find your referal link in your UserCP


Post Reply 
White/Blacklist Search with Date/Reason
Author Message
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #1
White/Blacklist Search with Date/Reason
Warning page style included, you need to change the html to be in line with your style.








You will need to add extra tables to the database if you do not currently have them.

Blacklist SQL Queries:
ALTER TABLE wcddl_blacklist ADD COLUMN reason VARCHAR(255)
ALTER TABLE wcddl_blacklist ADD COLUMN dat VARCHAR(15) NOT NULL
ALTER TABLE wcddl_blacklist ADD COLUMN email varchar(50)

Whitelist Queries:
ALTER TABLE wcddl_whitelist ADD COLUMN reason VARCHAR(255)
ALTER TABLE wcddl_whitelist ADD COLUMN dat VARCHAR(15) NOT NULL
ALTER TABLE wcddl_whitelist ADD COLUMN email varchar(50)

Create a new file named wcddl_searchbw.php and paste the following in it and upload it to your modules folder:
PHP Code: (Select All)
<?php
    
/*BEGIN_INFO
    Show if an Site are white/black Listed!<br>
    by jomasaco.
    END_INFO*/
    
if(!defined("WCDDL_GUTS"))
       exit;
       
$modEnabled true//Change to false if don't use
    
if($modEnabled) {
    
$outbw '<form action="'.$_SERVER['PHP_SELF'].'" method="post">
    <fieldset>
    <div class="legend">Check White/Black List:</div>
    <div class="form_row">
            <div class="form_value"><input type="text" size="32" class="text" value="http://" name="url" /></div>
            <input class="button" type="submit" name="submit" value="Submit" />
            </div></fieldset></form>'
;
            if(!empty(
$_POST)) {
            
$surl $_POST['url'];
            
$surl parse_url(trim($surl)); //remove spaces split the url
          
$surl $surl['host']; //get host
          
$surl str_replace("www.","",$surl); //remove the www
            
if (!preg_match('#^[A-Z0-9.-]+\.[A-Z]{2,4}$#i'$surl)) //validate url
            
{
     
$outbw .= '<br /><div class="error"> Please enter a valid Site Url. <b>'.$surl.'</div></b>';
     }
     else { 
//blacklist
            
$sql mysql_query("select * from wcddl_blacklist WHERE url = '".mysql_real_escape_string($surl)."'");
        if(
mysql_num_rows($sql) > 0) {
        
$outbw .= '<div class="error">'.$surl.' In <b>Blacklist</b><br />';
            while (
$row mysql_fetch_array($sql)){
                
$outbw .= '<br/> Site Url: '.$row['url'];
              
$outbw .= '<br/> Date: '.date("d-m-y",$row['dat']);
              
$outbw .= '<br/> Reason: '.$row['reason'].'</div>';
    }
    }
    else {     
//whitelist
      
$sql mysql_query("select * from wcddl_whitelist WHERE url = '".mysql_real_escape_string($surl)."'");
      if(
mysql_num_rows($sql) > 0) {
        
$outbw .= '<div class="success">'.$surl.' In <b>Whitelist</b>.<br />';
    while (
$row mysql_fetch_array($sql)){
        
$outbw .= '<br /> Date: '.date("d-m-y",$row['dat']);
        
$outbw .= '<br/> Site Url: '.$row['url'].'</div>';
        }
    }
    else{
    
$outbw .= '<br /><div class="notice">'.$surl.' NOT In <b>Whitelist</b> or <b>Blacklist</b>.</div><br />';
    }
    }
    }
    }
    
//show the lists
    //blacklist
    
$outbw .= '<div class="clearer"> </div>';
        
$outbw .= '<div class="post">
                            <div class="post_title text_center"><div class="error"><h1>BLACKLISTED</h1></div></div>
                            <div class="post_body">'
;
          
$color1 " class=\"even\"";
          
$color2 '';
          
$row_count 0;
                        
$getit = @mysql_query("SELECT * FROM wcddl_blacklist ORDER BY dat DESC limit 20");
    
$outbw .= '<br /><br /><table class="data_table"><tr><th>URL</th><th>DATE</th><th>REASON</th></tr>';                   
        while (
$row mysql_fetch_array($getit)) {
            
$row_color = ($row_count 2) ? $color1 $color2;
            
$data date("d-m-y",$row[dat]);
        
$outbw .='<tr'.$row_color.'>
        <td><strong>'
.$row['url'].'</strong></td><td>'.$data.'</td><td>'.$row['reason'].'</td>
        </tr>'
;
        
$row_count++;
        }
        
$outbw .= '</table>';
        
$outbw .= '</div></div>';
        
//whitelist
        
$outbw .= '<div class="post">
                            <div class="post_title text_center"><div class="success"><h1>WHITELISTED</h1></div></div>
                            <div class="post_body">'
;
        
$outbw .= '<div class="clearer"> </div>';
                        
$getit = @mysql_query("SELECT * FROM wcddl_whitelist ORDER BY dat DESC limit 20");
         
$outbw .= '<br /><br /><table class="data_table"><tr><th>URL</th><th>DATE</th></tr>';               
        while (
$row mysql_fetch_array($getit)) {
            
$row_color = ($row_count 2) ? $color1 $color2;
            
$data date("d-m-y",$row[dat]);
        
$outbw .= '<tr'.$row_color.'>
        <td><strong>'
.$row['url'].'</strong></td><td>'.$data.'</td>
        </tr>'
;
        
$row_count++;
        }
        
$outbw .= '</table>';
        
$outbw .= '</div></div>';
            
$core->setTemplateVar("searchbw",$outbw);
    }
    
?>

Add the following where you would like it to show:
PHP Code: (Select All)
<?=$core->templateVar("searchbw")?>

code by jomasaco

**EDIT**----------------------------------------

I have updated the thread and it should work.





11-07-2010 06:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #2
White/Blacklist Search with Date/Reason
You will need to name the file wcddl_searchbw.php and save it in your modules folder.
03-20-2011 11:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MrChinn Offline
Newbie


Posts: 6
Joined: Mar 2011
Post: #3
White/Blacklist Search with Date/Reason
WCDDL encountered an error during execution:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Line 75 in /home/****/domains/****/public_html/modules/wcddl_searchbw.php

mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Line 94 in /home/****/domains/****/public_html/modules/wcddl_searchbw.php

Is what I get
03-21-2011 01:38 AM
Find all posts by this user Quote this message in a reply
linkstar Offline
Newbie


Posts: 14
Joined: Aug 2011
Post: #4
White/Blacklist Search with Date/Reason
c0rrupt Wrote:You will need to name the file wcddl_searchbw.php and save it in your modules folder.
mate what should I put code in index.php or in page I should create?
I already create wcddl_searchbw.php in /public_html/modules
please show me the guide, thank you
09-17-2011 12:50 PM
Find all posts by this user Quote this message in a reply
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #5
White/Blacklist Search with Date/Reason
Best thing to do is create a new page and paste the following where you want it displayed

<?=$core->templateVar("searchbw")?>
09-17-2011 02:28 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MrChinn Offline
Newbie


Posts: 6
Joined: Mar 2011
Post: #6
White/Blacklist Search with Date/Reason
thanks c0rrupt, but all it does for me is redirect to the index page :/
12-30-2011 09:55 AM
Find all posts by this user Quote this message in a reply
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #7
White/Blacklist Search with Date/Reason
Its been a while since I used this mod. I will set it up and take a look and keep you updated.
12-30-2011 11:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrChinn Offline
Newbie


Posts: 6
Joined: Mar 2011
Post: #8
White/Blacklist Search with Date/Reason
thank you very much
12-30-2011 11:40 AM
Find all posts by this user Quote this message in a reply
c0rrupt Offline
Administrator


Posts: 262
Joined: Mar 2010
Post: #9
White/Blacklist Search with Date/Reason
Just tested and working with no problems








I have updated the first post with better instructions.
12-30-2011 11:41 AM
Visit this user's website Find all posts by this user Quote this message in a reply
MrChinn Offline
Newbie


Posts: 6
Joined: Mar 2011
Post: #10
White/Blacklist Search with Date/Reason
Still doing the same. When I enter the url to check and hit submit it just redirects to the index page.

EDIT:
Also see this in admin panel:
WCDDL encountered an error during execution:
mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Line 75 in /home/USER/domains/DOMAIN/public_html/modules/wcddl_searchbw.php

mysql_fetch_array(): supplied argument is not a valid MySQL result resource
Line 94 in /home/USER/domains/DOMAIN/public_html/modules/wcddl_searchbw.php
12-30-2011 12:07 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Search by Type/File Host c0rrupt 0 89 07-26-2012 04:59 PM
Last Post: c0rrupt
  White/Black list whit Reason c0rrupt 4 334 07-24-2012 05:57 AM
Last Post: allahwahid
  Admin Blacklist remove site downs or not c0rrupt 0 185 11-07-2010 02:17 PM
Last Post: c0rrupt
  Show Date [Module] c0rrupt 0 126 11-07-2010 06:23 AM
Last Post: c0rrupt
  Search As Mirror (on leftbar) c0rrupt 0 157 04-16-2010 12:40 PM
Last Post: c0rrupt
  Search As Mirror (index page) c0rrupt 0 164 04-16-2010 12:29 PM
Last Post: c0rrupt



User(s) browsing this thread: 1 Guest(s)

Affiliates
PhazeDDL WarezUNION WarezOrder Free Full Downloads Free Full Downloads SuppaDDL Free Full Downloads CafeDDL-Serves Premium Downloads! Free Full Rapidshare Fileserve Netload RapidGator Extabit Warez Downloads
This forum uses Lukasz Tkacz MyBB addons.