OZ24
YaBB Newbies
Offline
Beiträge: 6
|
meine die paneldatei stats_panel.php hier mal ein Teil vom Code passt net alles rein
[code]<?php ################################################################################
# P H P - W E B - S T A T # ################################################################################
# This file is part of php-web-stat. # # Open-Source Statistic Software for Webmasters # # Script-Version: 3.6.x # # File-Release-Date: 09/02/22 # # Official web site and latest version: http://www.php-web-statistik.de # #==============================================================================#
# Authors: Reimar Hoven, Holger Naves # # Copyright © 2008 by PHP-Web-Stat - All Rights Reserved. # ################################################################################
/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA */ //------------------------------------------------------------------ error_reporting(0); //------------------------------------------------------------------ ### !!! never change this value !!! ### $version_number = "2.3";
define("STATS_PANEL", INFUSIONS."stats_panel/"); //------------------------------------------------------------------ $writing_enabled = 0; // set the writing to OFF before clearstatcache(); // empty the filecache to get the real live data if ( file_exists ( STATS_PANEL."log/logdb_counter_write.dta" ) ) { //------------------------------------------------------------------ // rename the file rename ( STATS_PANEL."log/logdb_counter_write.dta" , STATS_PANEL."log/logdb_counter_write.yes" ); // if renaming succeeded, set writing to YES $writing_enabled = 1; //------------------------------------------------------------------ } //------------------------------------------------------------------ @ini_set ( "max_execution_time","false" ); // set the script time //@set_time_limit ( 0 ); //------------------------------------------------------------------ include ( STATS_PANEL."config/config.php" ); // include path to logfile //------------------------------------------------------------------ if ( $_GET [ "language" ] ) { //------------------------------- if ( $_GET [ "language" ] == "en" ) { include ( STATS_PANEL."language/english.php" ); } if ( $_GET [ "language" ] == "de" ) { include ( STATS_PANEL."language/german.php" ); } if ( $_GET [ "language" ] == "nl" ) { include ( STATS_PANEL."language/dutch.php" ); } if ( $_GET [ "language" ] == "it" ) { include ( STATS_PANEL."language/italian.php" ); } if ( $_GET [ "language" ] == "sp" ) { include ( STATS_PANEL."language/spanish.php" ); } if ( $_GET [ "language" ] == "fa" ) { include ( STATS_PANEL."language/farsi.php" ); } if ( $_GET [ "language" ] == "dk" ) { include ( STATS_PANEL."language/danish.php" ); } if ( $_GET [ "language" ] == "fr" ) { include ( STATS_PANEL."language/french.php" ); } if ( $_GET [ "language" ] == "tr" ) { include ( STATS_PANEL."language/turkish.php" ); } if ( $_GET [ "language" ] == "hu" ) { include ( STATS_PANEL."language/hungarian.php" ); } if ( $_GET [ "language" ] == "pt" ) { include ( STATS_PANEL."language/portuguese.php" ); } //------------------------------- } else { //------------------------------- include ( $language ); // include language vars from the config file //------------------------------- } //------------------------------------------------------------------ function display_overview ( $title , &$text1 , &$module1 , &$text2 , &$module2 , &$text3 , &$module3 , &$text4 , &$module4 , &$text5 , &$module5 , &$text6 , $module6 , &$text7 , &$module7 , &$text8 , &$module8 , $footer ) { //------------------------------- include ( STATS_PANEL."config/config.php" ); // include path to logfile openside($title); echo "<table class=\"counter_table\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; //echo "<tr><td class=\"header\" colspan=\"2\">".$title."</td></tr>"; if ( $counter_display_show_visitors_online == 1 ) { echo "<tr><td class=\"module\">".$text1."</td><td class=\"hits\">".$module1."</td></tr>"; } if ( $counter_display_show_today == 1 ) { echo "<tr><td class=\"module\">".$text2."</td><td class=\"hits\">".$module2."</td></tr>"; } if ( $counter_display_show_yesterday == 1 ) { echo "<tr><td class=\"module\">".$text3."</td><td class=\"hits\">".$module3."</td></tr>"; } if ( $counter_display_show_this_month == 1 ) { echo "<tr><td class=\"module\">".$text4."</td><td class=\"hits\">".$module4."</td></tr>"; } if ( $counter_display_show_last_month == 1 ) { echo "<tr><td class=\"module\">".$text5."</td><td class=\"hits\">".$module5."</td></tr>"; } if ( $counter_display_show_max == 1 ) { echo "<tr><td class=\"module\">".$text6."</td><td class=\"hits\">".$module6."</td></tr>"; } if ( $counter_display_show_average == 1 ) { echo "<tr><td class=\"module\">".$text7."</td><td class=\"hits\">".$module7."</td></tr>"; } if ( $counter_display_show_total == 1 ) { echo "<tr><td class=\"module\">".$text8."</td><td class=\"hits\">".($module8+$counter_add_visitors)."</td></tr>"; } if ( $counter_display_show_footer == 1 ) { echo "<tr><td class=\"footer\" colspan=\"2\">".$footer."</td></tr>"; } echo "</table>"; closeside(); //------------------------------- } //------------------------------------------------------------------ if ( $writing_enabled == 1 ) { //------------------------------ // get the actual day & the amount of days this month $temp_month = date ( "m" ); $temp_count_day_month = date ( "t" ); $temp_year = date ( "y" ); //------------------------------ // set the days values to zero for ( $x = 1 ; $x <= $temp_count_day_month ; $x++ ) { //------------------------------ if ( $x <= 9 ) { //------------------------------ $visitor_day [ $temp_year."/".$temp_month."/0".$x ] = 0; //------------------------------ } else { //------------------------------ $visitor_day [ $temp_year."/".$temp_month."/".$x ] = 0; //------------------------------ } //------------------------------ } //------------------------------ unset ( $temp_month ); unset ( $temp_count_day_month ); unset ( $temp_year ); //------------------------------------------------------------------ // get the actual year $temp_year = date ( "Y" ); // set the month values to zero for ( $x = 1 ; $x <= 12 ; $x++ ) { //------------------------------ if ( $x <= 9 ) { //------------------------------ $visitor_month [ "0".$x."/".$temp_year ] = 0; //------------------------------ } else { //------------------------------ $visitor_month [ $x."/".$temp_year ] = 0; //------------------------------ } //------------------------------ } //------------------------------------------------------------------ unset ( $temp_year ); //------------------------------------------------------------------ include ( STATS_PANEL."log/cache_time_stamp_counter.php" ); // include the last timestamp //------------------------------------------------------------------ } //------------------------------------------------------------------ include ( STATS_PANEL."log/cache_visitors_counter.php" ); // include the saved arrays //------------------------------------------------------------------ if ( !$visitor ) { //--------------- $visitor = array ( ); //--------------- } //---------------------------- $write_cache = 0; //---------------------------- if ( !$visitor_online ) { //--------------- $visitor_online = array ( ); //--------------- } //------------------------------------------------------------------ if ( isset ( $starting_date ) ) { if ( $starting_date == "TT.MM.YYYY" ) { $logfile_first_timestamp = fopen ( STATS_PANEL."log/logdb_backup.dta" , "r" ); // open logfile $logfile_entry_first_timestamp = fgetcsv ( $logfile_first_timestamp , 300 , "|" ); // read entry from logfile $first_timestamp = date ( "d.m.Y" , $logfile_entry_first_timestamp [ 0 ] ); fclose ( $logfile_first_timestamp ); // close logfile unset ( $logfile_first_timestamp ); unset ( $logfile_entry_first_timestamp ); } else { $first_timestamp = $starting_date; } } else { $logfile_first_timestamp = fopen ( STATS_PANEL."log/logdb_backup.dta" , "r" ); // open logfile $logfile_entry_first_timestamp = fgetcsv ( $logfile_first_timestamp , 300 , "|" ); // read entry from logfile $first_timestamp = date ( "d.m.Y" , $logfile_entry_first_timestamp [ 0 ] ); fclose ( $logfile_first_timestamp ); // close logfile unset ( $logfile_first_timestamp ); unset ( $logfile_entry_first_timestamp ); } //------------------------------------------------------------------ if ( $writing_enabled == 1 ) { //------------------------------------------------------------------ $logfile = fopen ( STATS_
|