public function checkTemplateExists($filepath,$options = array(),$tmplpath = '') {
		
		if (is_array($this->template_dir_orig) && $tmplpath == '') {
			foreach ($this->template_dir_orig as $path) {
				$exists = $this->checkTemplateExists($filepath,$options,$path);
				
				if ($exists) {
					return true;
				}
			}
			
			return false;
		}
		
		
		
		$filepath = (($tmplpath != '')?$tmplpath:$this->template_dir_orig).$filepath;

		if (!$options['extensionpresent']) {
			$filepath .= '.'.$this->templates_extension;
		}
		
		return file_exists($filepath);
	}
public function checkTemplateExists($filepath,$options = array(),$tmplpath = '') {
		
		if (is_array($this->template_dir_orig) && $tmplpath == '') {
			foreach ($this->template_dir_orig as $path) {
				$exists = $this->checkTemplateExists($filepath,$options,$path);
				
				if ($exists) {
					return true;
				}
			}
			
			return false;
		}
		
		
		
		$filepath = (($tmplpath != '')?$tmplpath:$this->template_dir_orig).$filepath;

		if (!$options['extensionpresent']) {
			$filepath .= '.'.$this->templates_extension;
		}
		
		return file_exists($filepath);
	}
public function checkTemplateExists ( $ filepath , $ options = array ( ) , $ tmplpath = '' ) { if ( is_array ( $ this -> template_dir_orig ) && $ tmplpath == '' ) { foreach ( $ this -> template_dir_orig as $ path ) { $ exists = $ this -> checkTemplateExists ( $ filepath , $ options , $ path ) ; if ( $ exists ) { return true ; } } return false ; } $ filepath = ( ( $ tmplpath != '' ) ? $ tmplpath : $ this -> template_dir_orig ) . $ filepath ; if ( ! $ options [ 'extensionpresent' ] ) { $ filepath .= '.' . $ this -> templates_extension ; } return file_exists ( $ filepath ) ; }
Set template as string. It is HTML document to fetch later as a template

@paral string $filepath Template file name. Same rules as for setTemplate
@param array $options Array of options. Now only one option can eb used `extensionpresent` = true means template fiel path includes extension

@return boolean True if template file exists in a templates path
Set template as string . It is HTML document to fetch later as a template