original_string: protected function visitorGetPageType($objPage)
  	{
  	    $PageId = $objPage->id;
  	    //Return:
  	    //0 = reale Seite / Reader ohne Parameter - Auflistung der News/FAQs
  	    //1 = Nachrichten/News
  	    //2 = FAQ
  	    //403 = Forbidden
          
  	    $page_type = self::PAGE_TYPE_NORMAL;
  	    
  	    if ($objPage->protected == 1) 
  	    {
  	    	//protected Seite. user 
  	        $this->import('FrontendUser', 'User');
  	        if (!$this->User->authenticate())
  	        {
  	            $page_type = self::PAGE_TYPE_FORBIDDEN;
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
  	            return $page_type;
  	        }
  	    }
  	    
          //Set the item from the auto_item parameter
          //from class ModuleNewsReader#L48
          if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item']))
          {
          	\Input::setGet('items', \Input::get('auto_item'));
          }
          if (!\Input::get('items'))
          {
              ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
              return $page_type;
          }
  	    
  	    //News Table exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_news')) 
  	    {
      	    //News Reader?
      	    $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_news_archive WHERE jumpTo=?")
                                  ->limit(1)
                                  ->execute($PageId);
      	    if ($objReaderPage->numRows > 0)
      	    {
      	        //News Reader
      	        $page_type = self::PAGE_TYPE_NEWS;
      	    }
  	    }
  	    
  	    //FAQ Table exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_faq_category'))
  	    {
  	        //FAQ Reader?
  	        $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_faq_category WHERE jumpTo=?")
                                  ->limit(1)
                                  ->execute($PageId);
  	        if ($objReaderPage->numRows > 0)
  	        {
  	            //FAQ Reader
  	            $page_type = self::PAGE_TYPE_FAQ;
  	        }
  	    }
  	    
  	    //Isotope Table tl_iso_product exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_iso_product'))
  	    {
  			$strAlias = \Input::get('items');
  			ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Get items: '. print_r($strAlias, true));			
  
  	        $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_iso_product WHERE alias=?")
                                  ->limit(1)
                                  ->execute($strAlias);
  			if ($objReaderPage->numRows > 0)
  			{
  	            //Isotope Reader
  	            $page_type = self::PAGE_TYPE_ISOTOPE;
  	        }
  	    }
  	    
  	    ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
  	    return $page_type;
  	}
code: protected function visitorGetPageType($objPage)
  	{
  	    $PageId = $objPage->id;
  	    //Return:
  	    //0 = reale Seite / Reader ohne Parameter - Auflistung der News/FAQs
  	    //1 = Nachrichten/News
  	    //2 = FAQ
  	    //403 = Forbidden
          
  	    $page_type = self::PAGE_TYPE_NORMAL;
  	    
  	    if ($objPage->protected == 1) 
  	    {
  	    	//protected Seite. user 
  	        $this->import('FrontendUser', 'User');
  	        if (!$this->User->authenticate())
  	        {
  	            $page_type = self::PAGE_TYPE_FORBIDDEN;
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
  	            return $page_type;
  	        }
  	    }
  	    
          //Set the item from the auto_item parameter
          //from class ModuleNewsReader#L48
          if (!isset($_GET['items']) && \Config::get('useAutoItem') && isset($_GET['auto_item']))
          {
          	\Input::setGet('items', \Input::get('auto_item'));
          }
          if (!\Input::get('items'))
          {
              ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
              return $page_type;
          }
  	    
  	    //News Table exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_news')) 
  	    {
      	    //News Reader?
      	    $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_news_archive WHERE jumpTo=?")
                                  ->limit(1)
                                  ->execute($PageId);
      	    if ($objReaderPage->numRows > 0)
      	    {
      	        //News Reader
      	        $page_type = self::PAGE_TYPE_NEWS;
      	    }
  	    }
  	    
  	    //FAQ Table exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_faq_category'))
  	    {
  	        //FAQ Reader?
  	        $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_faq_category WHERE jumpTo=?")
                                  ->limit(1)
                                  ->execute($PageId);
  	        if ($objReaderPage->numRows > 0)
  	        {
  	            //FAQ Reader
  	            $page_type = self::PAGE_TYPE_FAQ;
  	        }
  	    }
  	    
  	    //Isotope Table tl_iso_product exists?
  	    if (\Input::get('items') && \Database::getInstance()->tableExists('tl_iso_product'))
  	    {
  			$strAlias = \Input::get('items');
  			ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Get items: '. print_r($strAlias, true));			
  
  	        $objReaderPage = \Database::getInstance()
                                  ->prepare("SELECT id FROM tl_iso_product WHERE alias=?")
                                  ->limit(1)
                                  ->execute($strAlias);
  			if ($objReaderPage->numRows > 0)
  			{
  	            //Isotope Reader
  	            $page_type = self::PAGE_TYPE_ISOTOPE;
  	        }
  	    }
  	    
  	    ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageType: '. $page_type);
  	    return $page_type;
  	}
code_tokens: protected function visitorGetPageType ( $ objPage ) { $ PageId = $ objPage -> id ; //Return: //0 = reale Seite / Reader ohne Parameter - Auflistung der News/FAQs //1 = Nachrichten/News //2 = FAQ //403 = Forbidden $ page_type = self :: PAGE_TYPE_NORMAL ; if ( $ objPage -> protected == 1 ) { //protected Seite. user  $ this -> import ( 'FrontendUser' , 'User' ) ; if ( ! $ this -> User -> authenticate ( ) ) { $ page_type = self :: PAGE_TYPE_FORBIDDEN ; ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageType: ' . $ page_type ) ; return $ page_type ; } } //Set the item from the auto_item parameter //from class ModuleNewsReader#L48 if ( ! isset ( $ _GET [ 'items' ] ) && \ Config :: get ( 'useAutoItem' ) && isset ( $ _GET [ 'auto_item' ] ) ) { \ Input :: setGet ( 'items' , \ Input :: get ( 'auto_item' ) ) ; } if ( ! \ Input :: get ( 'items' ) ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageType: ' . $ page_type ) ; return $ page_type ; } //News Table exists? if ( \ Input :: get ( 'items' ) && \ Database :: getInstance ( ) -> tableExists ( 'tl_news' ) ) { //News Reader? $ objReaderPage = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_news_archive WHERE jumpTo=?" ) -> limit ( 1 ) -> execute ( $ PageId ) ; if ( $ objReaderPage -> numRows > 0 ) { //News Reader $ page_type = self :: PAGE_TYPE_NEWS ; } } //FAQ Table exists? if ( \ Input :: get ( 'items' ) && \ Database :: getInstance ( ) -> tableExists ( 'tl_faq_category' ) ) { //FAQ Reader? $ objReaderPage = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_faq_category WHERE jumpTo=?" ) -> limit ( 1 ) -> execute ( $ PageId ) ; if ( $ objReaderPage -> numRows > 0 ) { //FAQ Reader $ page_type = self :: PAGE_TYPE_FAQ ; } } //Isotope Table tl_iso_product exists? if ( \ Input :: get ( 'items' ) && \ Database :: getInstance ( ) -> tableExists ( 'tl_iso_product' ) ) { $ strAlias = \ Input :: get ( 'items' ) ; ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'Get items: ' . print_r ( $ strAlias , true ) ) ; $ objReaderPage = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_iso_product WHERE alias=?" ) -> limit ( 1 ) -> execute ( $ strAlias ) ; if ( $ objReaderPage -> numRows > 0 ) { //Isotope Reader $ page_type = self :: PAGE_TYPE_ISOTOPE ; } } ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageType: ' . $ page_type ) ; return $ page_type ; }
docstring: Get Page-Type
  
  @param integer $objPage
  @return integer     0 = reale Seite, 1 = News, 2 = FAQ, 403 = Forbidden
docstring_tokens: Get Page - Type