12-Aug-2011, 09:45 PM
can you remove banning completely. I use a private network and do not need to ban.
<?php
function cmtx_ban ($reason) { //ban user
/*
global $mysql_table_prefix, $settings, $ip_address, $is_admin; //globalise variables
if (!$is_admin) { //if not administrator
//insert user's IP address into 'banned' database table
mysql_query("INSERT INTO `".$mysql_table_prefix."banned` (ip_address, reason, dated) VALUES ('$ip_address', '$reason', NOW())");
@setcookie("Commentics-Ban", "Banned", 60*60*24*$settings->banning_cookie_days + time(), '/'); //set banning-cookie
//time calculation: seconds * minutes * hours * days + current time
cmtx_notify_admin_new_ban($ip_address, $reason); //notify admin of new ban
die(CMTX_BAN_MESSAGE_BANNED_NOW); //end scripting and output message to user explaining they are now banned
}
*/
} //end of ban function