Example #1
0
		function check_url( $url )
		{
			$post_check = new Post_Check() ;
			return ( $post_check->urlCheck( $url, $this->schemes ) ) ? true : false ;
		}
Example #2
0
	function d3download_category_form_validate()
	{
		$result   = '' ;
		$imgurl   = ( ! empty( $_GET['imgurl'] ) ) ?   @$_GET['imgurl']   : '' ;
		$shotsdir = ( ! empty( $_GET['shotsdir'] ) ) ? @$_GET['shotsdir'] : '' ;

		require_once dirname( dirname(__FILE__) ).'/class/post_check.php' ;
		$post_check = new Post_Check() ;

		switch( true ) {
			case ( ! empty( $imgurl ) ) :
				if( $imgurl != 'http://' ) {
					if ( ! $post_check->imgurlCheck( $imgurl ) ) $result = 'invalid' ;
				}
				break ;
			case ( ! empty( $shotsdir ) ) :
				$cate_shotsdir = XOOPS_ROOT_PATH.'/'.$shotsdir ;
				if ( ! $post_check->fileexistsCheck( $cate_shotsdir ) ) $result = 'invalid' ;
				break ;
		}
		echo $result ;
	}
Example #3
0
		function mail_link( $sender )
		{
			require_once dirname( dirname(__FILE__) ).'/class/post_check.php' ;
			$post_check = new Post_Check() ;

			$email = $this->get_sender_email( $sender ) ;

			switch( true ) {
				case ( empty( $email ) ) :
					return '' ;
				case ( ! $post_check->mailCheck( $email ) ) :
					return '' ;
				default :
					return '<input type="button" style="color: #808080;background: #FFFFFF;border: 1px solid #999999;" value="Email" onclick="location.href=\'mailto:'.$email.'\'">';
			}
		}
		function makeTboxData4URLShow( $text )
		{
			require_once dirname( dirname(__FILE__) ).'/class/post_check.php' ;
			$Post_Check = new Post_Check() ;
			if( $Post_Check->urlCheck( $text ) ){
				return preg_replace( "/&amp;/i", '&', htmlspecialchars( $text, ENT_QUOTES ) ) ;
			} else {
				return $this->url_filter( htmlspecialchars( $text, ENT_QUOTES ) ) ;
			}
		}