Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

tx_cms_webinfo_page Class Reference

Inherits t3lib_extobjbase.

Inherited by tx_cms_webinfo_hits.

List of all members.

Public Member Functions

 modMenu ()
 Returns the menu array.
 main ()
 MAIN function for page information display (including hit statistics).


Member Function Documentation

tx_cms_webinfo_page::main  ) 
 

MAIN function for page information display (including hit statistics).

Returns:
string Output HTML for the module.

Definition at line 100 of file class.tx_cms_webinfo.php.

References $a, $LANG, t3lib_BEfunc::cshItem(), t3lib_BEfunc::date(), t3lib_BEfunc::getFuncMenu(), and t3lib_extMgm::isLoaded().

00100                      {
00101       global $BACK_PATH,$LANG,$SOBE;
00102 
00103       $dblist = t3lib_div::makeInstance('tx_cms_layout');
00104       $dblist->descrTable = '_MOD_'.$GLOBALS['MCONF']['name'];
00105       $dblist->backPath = $BACK_PATH;
00106       $dblist->thumbs = 0;
00107       $dblist->script = 'index.php';
00108       $dblist->showIcon = 0;
00109       $dblist->setLMargin=0;
00110       $dblist->agePrefixes=$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
00111 
00112       $dblist->pI_showUser=1;
00113       $dblist->pI_showStat=0;
00114 
00115 
00116          // PAGES:
00117       $this->pObj->MOD_SETTINGS['pages_levels']=$this->pObj->MOD_SETTINGS['depth'];    // ONLY for the sake of dblist module which uses this value.
00118 
00119       $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[depth]',$this->pObj->MOD_SETTINGS['depth'],$this->pObj->MOD_MENU['depth'],'index.php');
00120       if ($this->pObj->MOD_SETTINGS['function']=='tx_cms_webinfo_hits') {
00121          $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[stat_type]',$this->pObj->MOD_SETTINGS['stat_type'],$this->pObj->MOD_MENU['stat_type'],'index.php');
00122 
00123          if ($this->pObj->MOD_SETTINGS['stat_type']==1)  $dblist->stat_select_field='rl0';
00124          if ($this->pObj->MOD_SETTINGS['stat_type']==2)  $dblist->stat_select_field='rl1';
00125 
00126             // Timespan
00127          for ($a=0;$a<30;$a++)   {
00128             $dblist->stat_codes[]='HITS_days:'.(-$a);
00129          }
00130          $timespan_b = mktime (0,0,0);
00131          $timespan_e = mktime (0,0,0)-(30-1)*3600*24+1;
00132          $header='<br />'.sprintf($LANG->getLL('stat_period'),t3lib_BEfunc::date($timespan_b),t3lib_BEfunc::date($timespan_e)).'<br />';
00133 
00134             //
00135          $dblist->start($this->pObj->id,'pages',0);
00136          $dblist->pages_noEditColumns=1;
00137          $dblist->generateList();
00138 
00139 
00140          $theOutput.= $this->pObj->doc->section($LANG->getLL('hits_title'),
00141             t3lib_BEfunc::cshItem($dblist->descrTable,'stat',$GLOBALS['BACK_PATH'],'|<br/>').   // CSH
00142                $h_func.
00143                $header.
00144                $dblist->HTMLcode,
00145             0,
00146             1
00147          );
00148       } else {
00149          $h_func.= t3lib_BEfunc::getFuncMenu($this->pObj->id,'SET[pages]',$this->pObj->MOD_SETTINGS['pages'],$this->pObj->MOD_MENU['pages'],'index.php');
00150 
00151          $dblist->start($this->pObj->id,'pages',0);
00152          $dblist->generateList();
00153 
00154             // CSH
00155          $theOutput.=$this->pObj->doc->section($LANG->getLL('page_title'),
00156             t3lib_BEfunc::cshItem($dblist->descrTable,'pagetree_overview',$GLOBALS['BACK_PATH'],'|<br/>').  // CSH
00157                $h_func.
00158                $dblist->HTMLcode,
00159             0,
00160             1
00161          );
00162 
00163             // SYS_NOTES:
00164          if (t3lib_extMgm::isLoaded('sys_note'))   {
00165             $dblist->start($this->pObj->id,'sys_note',0);
00166             $dblist->generateList();
00167             if ($dblist->HTMLcode)  {
00168                $theOutput.=$this->pObj->doc->spacer(10);
00169                $theOutput.=$this->pObj->doc->section($LANG->getLL('page_sysnote'),
00170                   $dblist->HTMLcode,
00171                   0,
00172                   1
00173                );
00174             }
00175          }
00176 
00177             // PAGE INFORMATION
00178          if ($this->pObj->pageinfo['uid'])   {
00179             $theOutput.=$this->pObj->doc->spacer(10);
00180             $theOutput.=$this->pObj->doc->section($LANG->getLL('pageInformation'),$dblist->getPageInfoBox($this->pObj->pageinfo,$this->pObj->CALC_PERMS&2),0,1);
00181          }
00182       }
00183 
00184       return $theOutput;
00185    }

tx_cms_webinfo_page::modMenu  ) 
 

Returns the menu array.

Returns:
array

Definition at line 73 of file class.tx_cms_webinfo.php.

References $LANG.

00073                         {
00074       global $LANG;
00075       return array (
00076          'pages' => array (
00077             0 => $LANG->getLL('pages_0'),
00078             2 => $LANG->getLL('pages_2'),
00079             1 => $LANG->getLL('pages_1')
00080          ),
00081          'stat_type' => array(
00082             0 => $LANG->getLL('stat_type_0'),
00083             1 => $LANG->getLL('stat_type_1'),
00084             2 => $LANG->getLL('stat_type_2'),
00085          ),
00086          'depth' => array(
00087             0 => $LANG->getLL('depth_0'),
00088             1 => $LANG->getLL('depth_1'),
00089             2 => $LANG->getLL('depth_2'),
00090             3 => $LANG->getLL('depth_3')
00091          )
00092       );
00093    }


The documentation for this class was generated from the following file:
Generated on Sun Oct 3 01:07:51 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913