[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_plugins/counter_menu/counter_menu.php,v $ 14 | $Revision: 1.15 $ 15 | $Date: 2005/12/28 20:44:18 $ 16 | $Author: streaky $ 17 +----------------------------------------------------------------------------+ 18 */ 19 if (!defined('e107_INIT')) { exit; } 20 21 $text = ""; 22 if (isset($pref['statActivate']) && $pref['statActivate'] == true) { 23 $pageName = preg_replace("/(\?.*)|(\_.*)|(\.php)/", "", basename (e_SELF)); 24 $logfile = e_PLUGIN."log/logs/logp_".date("z.Y", time()).".php"; 25 if(!is_readable($logfile)) 26 { 27 if(ADMIN && !$pref['statCountAdmin']) 28 { 29 $text = COUNTER_L1; 30 } 31 $total = 1; 32 $unique = 1; 33 $siteTotal = 1; 34 $siteUnique = 1; 35 $totalever = 1; 36 $uniqueever = 1; 37 } else { 38 $text = ""; 39 require($logfile); 40 if($sql -> db_Select("logstats", "*", "log_id='statTotal' OR log_id='statUnique' OR log_id='pageTotal'")) 41 { 42 while($row = $sql -> db_Fetch()) 43 { 44 if($row['log_id'] == "statTotal") 45 { 46 $siteTotal += $row['log_data']; 47 } 48 else if($row['log_id'] == "statUnique") 49 { 50 $siteUnique += $row['log_data']; 51 } 52 else 53 { 54 $dbPageInfo = unserialize($row['log_data']); 55 $totalPageEver = ($dbPageInfo[$pageName]['ttlv'] ? $dbPageInfo[$pageName]['ttlv'] : 0); 56 $uniquePageEver = ($dbPageInfo[$pageName]['unqv'] ? $dbPageInfo[$pageName]['unqv'] : 0); 57 } 58 } 59 } 60 $pageName = preg_replace("/(\?.*)|(\_.*)|(\.php)/", "", basename (e_SELF)); 61 $total = ($pageInfo[$pageName]['ttl'] ? $pageInfo[$pageName]['ttl'] : 0); 62 $unique = ($pageInfo[$pageName]['unq'] ? $pageInfo[$pageName]['unq'] : 0); 63 $totalever = ($pageInfo[$pageName]['ttlv'] ? $pageInfo[$pageName]['ttlv'] : 0) + $totalPageEver + $total; 64 $uniqueever = ($pageInfo[$pageName]['unqv'] ? $pageInfo[$pageName]['unqv'] : 0) + $uniquePageEver + $unique; 65 } 66 $text .= "<b>".COUNTER_L2."</b><br />".COUNTER_L3.": $total<br />".COUNTER_L5.": $unique<br /><br /> 67 <b>".COUNTER_L4."</b><br />".COUNTER_L3.": $totalever<br />".COUNTER_L5.": $uniqueever<br /><br /> 68 <b>".COUNTER_L6."</b><br />".COUNTER_L3.": $siteTotal<br />".COUNTER_L5.": $siteUnique"; 69 $ns->tablerender(COUNTER_L7, $text, 'counter'); 70 unset($dbPageInfo); 71 } 72 else 73 { 74 if(ADMIN) 75 { 76 $text .= "<span class='smalltext'>".COUNTER_L8."</span>"; 77 $ns->tablerender(COUNTER_L7, $text, 'counter'); 78 } 79 } 80 81 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |