' ) ) ); } static function set_validator_copyright( $val ) { return htmlspecialchars( stripslashes( strip_tags( $val , '' ) ) , null, null, false ); } static function validator_type( $sett ) { if( !is_array( $sett ) ){ return null; } if( !isset( $sett[ 'type' ] ) ){ return null; } if( !is_array( $sett[ 'type' ] ) ){ return null; } if( !( isset( $sett[ 'type' ][ 'input' ] ) || isset( $sett[ 'type' ][ 'validator' ] ) ) ){ return null; } $rett = ''; if( !isset( $sett[ 'type' ][ 'validator' ] ) ){ /* DEFAULT VALIDATOR TYPE */ switch( $sett[ 'type' ][ 'input' ] ){ case 'int' : { $rett = 'validator_int'; break; } case 'number' : { $rett = 'validator_number'; break; } case 'logic' : { $rett = 'validator_logic'; break; } case 'url': case 'upload':{ $rett = 'validator_url'; break; } case 'css' : { $rett = 'css'; break; } case 'html' : { $rett = 'html'; break; } case 'copyright' : { $rett = 'copyright'; break; } default : { $rett = 'validator'; break; } } } else{ $rett = $sett[ 'type' ][ 'validator' ]; } return $rett; } static function get_validator_type( $sett ) { $rett = self::validator_type( $sett ); switch( $rett ){ case 'css' : { $rett = 'get_validator_css'; break; } case 'html' : { $rett = 'get_validator_html'; break; } case 'copyright' : { $rett = 'get_validator_copyright'; break; } } return $rett; } static function set_validator_type( $sett ) { $rett = self::validator_type( $sett ); switch( $rett ){ case 'css' : { $rett = 'set_validator_css'; break; } case 'html' : { $rett = 'set_validator_html'; break; } case 'copyright' : { $rett = 'set_validator_copyright'; break; } } return $rett; } } } /* END IF CLASS EXISTS */ ?>