7 ob_start( array( $this ,
'ob_filter' ) ) ;
23 return preg_replace(
'/<form[^>]*action=["\'](|#|register.php)["\'][^>]+>/i' ,
'$0'.
"\n".$antispam_htmls[
'html_in_form'].
"\n".$antispam_htmls[
'js_global'] , $s , 1 ) ;
36 $as_md5 = $this->
getMd5() ;
37 $as_md5array = preg_split(
'//' , $as_md5 , -1 , PREG_SPLIT_NO_EMPTY ) ;
38 $as_md5shuffle = array() ;
39 foreach( $as_md5array as $key => $val ) {
40 $as_md5shuffle[] = array(
'key' => $key ,
'val' => $val ) ;
42 shuffle( $as_md5shuffle ) ;
43 $js_in_validate_function =
"antispam_md5s=new Array(32);\n" ;
44 foreach( $as_md5shuffle as $item ) {
47 $js_in_validate_function .=
"antispam_md5s[$key]='$val';\n" ;
49 $js_in_validate_function .=
"
51 for( i = 0 ; i < 32 ; i ++ ) {
52 antispam_md5 += antispam_md5s[i] ;
54 xoopsGetElementById('antispam_md5').value = antispam_md5 ;
58 'html_in_form' =>
'<input type="hidden" name="antispam_md5" id="antispam_md5" value="" />' ,
59 'js_global' =>
'<script type="text/javascript"><!--//'.
"\n".$js_in_validate_function.
"\n".
'//--></script><noscript><div class="errorMsg">'._MD_PROTECTOR_TURNJAVASCRIPTON.
'</div></noscript>' ,
65 $user_md5 = trim( @
$_POST[
'antispam_md5'] ) ;
68 if( $user_md5 != $this->
getMd5() && $user_md5 != $this->
getMd5( time() - 3600 ) && $user_md5 != $this->
getMd5( time() - 7200 ) ) {