$blacklist_c=$this->dbObj->sqlGet("SELECT etchat_blacklist_time FROM {$this->_prefix}etchat_blacklist WHERE etchat_blacklist_ip = '".addslashes($_COOKIE['cookie_etchat_blacklist_ip'])."' and etchat_blacklist_time = ".(int)$_COOKIE['cookie_etchat_blacklist_until']." and etchat_blacklist_time > ".date('U'));
// just compare by IP
//echo "SELECT etchat_blacklist_time FROM {$this->_prefix}etchat_blacklist WHERE etchat_blacklist_ip = '".$this->user_param_all."' and etchat_blacklist_time > ".date('U');
$blacklist=$this->dbObj->sqlGet("SELECT etchat_blacklist_time FROM {$this->_prefix}etchat_blacklist WHERE etchat_blacklist_ip = '".$this->user_param_all."' and etchat_blacklist_time > ".date('U'));
if (is_array($blacklist)) $this->user_bann_time = $blacklist[0][0];
if (is_array($blacklist_c)) $this->user_bann_time = $blacklist_c[0][0];
// if the user is banned, destroy the session and return true
if (is_array($blacklist) || is_array($blacklist_c)) return true;
else return false;
}
/**
* AllowedToAndSetCookie, return true if done
*
* @uses ConnectDB::sqlGet()
* @uses ConnectDB::sqlSet()
* @return bool
*/
public function allowedToAndSetCookie(){
$rechte_zum_sperren=$this->dbObj->sqlGet("select etchat_userprivilegien FROM {$this->_prefix}etchat_user where etchat_user_id = ".$_SESSION['etchat_'.$this->_prefix.'user_id']);
if ($rechte_zum_sperren[0][0]!="admin" && $rechte_zum_sperren[0][0]!="mod"){
$this->dbObj->sqlSet("DELETE FROM {$this->_prefix}etchat_useronline WHERE etchat_onlineuser_fid = ".$_SESSION['etchat_'.$this->_prefix.'user_id']);