hi

ive written a ban mod to ban sites tht fail 2 follow rules, problem is its not working:

PHP Code: 
    <?php
    
/*BEGIN_INFO
    Ban by Chris2009.
    END_INFO*/
    
if(!defined("WCDDL_GUTS"))
    exit;

    
$modEnabled true//Change to false if don't use
    
    
if($modEnabled) {  //start of $modenabled
    
    
$add = array("banSite" => "Ban Websites");
    
    
$core->admin_links array_merge($core->admin_links$add);
    
    function 
banlist() {
    
    global 
$core;
    
    if (!isset(
$_POST['post'])) 
    {
        
//Show table/form in ACP.
        
$htmlban "<form name='ban-sites' method='POST'>
        
        <p>Website URL: <input name='surl' type='text' width='380' /></p>

        <p>Reason: <input name='reason' type='text' width='380' /></p>
        
        <br><input type='submit' name='post' value='Post this news..' />
        </form><hr /> <br>"
;
        }
        else {

            
//Switch the data to variables.
            
$surl $_POST['surl'];
            
$reason $_POST['reason'];
            
$date date('d-m-Y');
        
            
//Insert to DB.
            
$insert mysql_query("INSERT INTO wcddl_blacklist VALUES ('','".mysql_real_escape_string($surl)."','".mysql_real_escape_string($reason)."','".mysql_real_escape_string($date)."')");
            
            
// proll check the whitelist too, to see if sire is whitelisted.
            
            
$htmlban "'.$surl.' has been banned.";
        }
        echo 
$htmlban//Always echo mods.
        
//function end.
    
if($_GET['go']=='banlist'$core->attachHook("adminFunctions","banlist"); //Add ACP link.
    
//end  of module.
?>
it is to ban whitelisted sites. any help?
Chris2k Reviewed by Chris2k on . Ban Sites hi ive written a ban mod to ban sites tht fail 2 follow rules, problem is its not working: <?php /*BEGIN_INFO Ban by Chris2009. END_INFO*/ if(!defined("WCDDL_GUTS")) Rating: 5