<?php

require_once dirname(__FILE__).'/D3forumAntispamAbstract.class.php' ;

class D3forumAntispamDefault_ktai extends D3forumAntispamDefault {

function checkValidate()
{
	// Check is K-TAI?
	if (defined('HYP_K_TAI_RENDER') && HYP_K_TAI_RENDER) {
			return true ;
	} else {
		global $xoopsTpl;
		if ($xoopsTpl->_tpl_vars['wizmobile_ismobile']) {
			return true ;
		}
	}
	
	$user_md5 = trim( @$_POST['antispam_md5'] ) ;

	// 2-3 hour margin
	if( $user_md5 != $this->getMd5() && $user_md5 != $this->getMd5( time() - 3600 ) && $user_md5 != $this->getMd5( time() - 7200 ) ) {
		$this->errors[] = _MD_D3FORUM_ERR_TURNJAVASCRIPTON ;
		return false ;
	}
	return true ;
}

}

?>