this.'); exit(0); } require('lib/fnum.php'); echo('
'._('Statistics for the last 30 days.').'
'.N); $now=time(); $tdstart=gmmktime(0,0,0,gmdate('n',$now),gmdate('j',$now),gmdate('Y',$now)); $limit=$tdstart-(30*24*60*60); $res=mysqli_query($link,'SELECT * FROM ZStats WHERE TS >= '.$limit.' ORDER BY TS DESC') or muorimeglio(__LINE__.': '.mysqli_error($link),true); $hlmap=array( 'ca'=>_('Catalan'), 'de'=>_('German'), 'en'=>_('English'), 'es'=>_('Spanish'), 'fr'=>_('French'), 'gl'=>_('Galician'), 'it'=>_('Italian'), 'pt_BR'=>_('Português (BR)'), 'uk'=>_('Ukrainian') ); $hpmap=array( 'home'=>_('Guide'), 'instances'=>_('Instances'), 'users'=>_('Users'), 'links'=>_('Links'), 'about'=>_('About'), 'stats'=>_('Statistics'), 'contribute'=>_('Contribute'), '404'=>'404' ); while ($row=mysqli_fetch_assoc($res)) { $hl=explode(';',$row['HitsLang']); $buf=array(); foreach($hl as $key=>$val) { $val=explode(':',$val); $buf[$hlmap[$val[0]]]=$val[1]; } arsort($buf); $hl=''; foreach($buf as $key=>$val) $hl.=$key.': '.fnum($val,0,$dlang).'; '; $hl=_('Hits per language').': '.substr($hl,0,-2); $hp=explode(';',$row['HitsPage']); $buf=array(); foreach($hp as $key=>$val) { $val=explode(':',$val); $buf[$hpmap[$val[0]]]=$val[1]; } arsort($buf); $hp=''; foreach($buf as $key=>$val) $hp.=$key.': '.fnum($val,0,$dlang).'; '; $hp=_('Hits per page').': '.substr($hp,0,-2); echo('