00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00052 require_once(PATH_t3lib.'class.t3lib_pagetree.php');
00053 require_once(PATH_t3lib.'class.t3lib_recordlist.php');
00054 require_once(PATH_typo3.'class.db_list.inc');
00055 require_once(t3lib_extMgm::extPath('cms').'layout/class.tx_cms_layout.php');
00056 require_once(PATH_t3lib.'class.t3lib_extobjbase.php');
00057
00058
00066 class tx_cms_webinfo_page extends t3lib_extobjbase {
00067
00073 function modMenu() {
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 }
00094
00100 function main() {
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
00117 $this->pObj->MOD_SETTINGS['pages_levels']=$this->pObj->MOD_SETTINGS['depth'];
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
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/>').
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
00155 $theOutput.=$this->pObj->doc->section($LANG->getLL('page_title'),
00156 t3lib_BEfunc::cshItem($dblist->descrTable,'pagetree_overview',$GLOBALS['BACK_PATH'],'|<br/>').
00157 $h_func.
00158 $dblist->HTMLcode,
00159 0,
00160 1
00161 );
00162
00163
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
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 }
00186 }
00187
00199 class tx_cms_webinfo_hits extends tx_cms_webinfo_page {
00200 }
00201
00202
00203 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/web_info/class.tx_cms_webinfo.php']) {
00204 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/web_info/class.tx_cms_webinfo.php']);
00205 }
00206 ?>