[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/view/admin/ -> adminarticlereferrersview.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
   4      lt_include( PLOG_CLASS_PATH."class/dao/referers.class.php" );    
   5      lt_include( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
   6      
   7      /**
   8       * \ingroup View
   9       * @private
  10       *
  11       * shows a list of the referrers collected by this site for a particular post
  12       */
  13      class AdminArticleReferrersView extends AdminTemplatedView
  14      {
  15      
  16  		function AdminArticleReferrersView( $blogInfo, $params )
  17          {
  18              $this->AdminTemplatedView( $blogInfo, "statistics" );
  19              
  20              $this->_page = $params["page"];
  21              $this->_article = $params["article"];
  22              if( $this->_page == "" ) $this->_page = 1;
  23          }
  24          
  25  		function render()
  26          {
  27              $referers = new Referers();
  28              $totalReferers = $referers->getBlogTotalReferers( $this->_blogInfo->getId(), $this->_article->getId());
  29              $postReferers = $referers->getArticleReferers( $this->_article->getId(), 
  30                                                             $this->_blogInfo->getId(), 
  31                                                             $this->_page,
  32                                                             DEFAULT_ITEMS_PER_PAGE );
  33  
  34              if( !$postReferers ) {
  35                  $postReferers = Array();
  36              }
  37              
  38              // calculate the links to the different pages
  39              $pager = new Pager( "?op=postStats&amp;postId=".$this->_article->getId()."&amp;page=", 
  40                                  $this->_page, 
  41                                  $totalReferers, 
  42                                  DEFAULT_ITEMS_PER_PAGE );
  43  
  44              $this->setValue( "referrers", $postReferers );
  45              $this->setValue( "pager", $pager );
  46              $this->setValue( "post", $this->_article );
  47          
  48              parent::render();
  49          }
  50      }
  51  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics