phpOpenTracker/phpOpenTracker/API/plugins access_statistics.php,1.7.4.1,1.7.4.2

Sebastian Bergmann <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.cvs
Message-ID <[email protected]>
Update of /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/API/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv20619/phpOpenTracker/API/plugins

Modified Files:
      Tag: phpOpenTracker_1
	access_statistics.php 
Log Message:
Add client id to client name mapping configuration.

Index: access_statistics.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/API/plugins/Attic/access_statistics.php,v
retrieving revision 1.7.4.1
retrieving revision 1.7.4.2
diff -C2 -d -r1.7.4.1 -r1.7.4.2
*** access_statistics.php	22 Dec 2003 03:36:29 -0000	1.7.4.1
--- access_statistics.php	31 Dec 2003 10:05:13 -0000	1.7.4.2
***************
*** 82,99 ****
  
      if ($parameters['interval'] != false) {
!       $start = $parameters['start'] ? $parameters['start'] : 0;
!       $end   = $parameters['end']   ? $parameters['end']   : time();
! 
!       for ($i = $parameters['start']; $i < $parameters['end']; $i += $parameters['interval']) {
!         $correct = ((mktime(0, 0, 0, date('m', $i), date('d', $i) + 1, date('Y', $i))
!                    - mktime(0, 0, 0, date('m', $i), date('d', $i),     date('Y', $i)))
                     * ($parameters['interval'] / 86400))
                     - $parameters['interval'];
  
          $intervalStrings[] = sprintf(
            '%s - %s',
  
!           date('d-m-Y', $i),
!           date('d-m-Y', $i + $parameters['interval'] + $correct)
          );
  
--- 82,105 ----
  
      if ($parameters['interval'] != false) {
!       for ($startTimestamp = $parameters['start']; $startTimestamp < $parameters['end']; $startTimestamp += $parameters['interval']) {
!         $correct = ((mktime(0, 0, 0, date('m', $startTimestamp), date('d', $startTimestamp) + 1, date('Y', $startTimestamp))
!                    - mktime(0, 0, 0, date('m', $startTimestamp), date('d', $startTimestamp),     date('Y', $startTimestamp)))
                     * ($parameters['interval'] / 86400))
                     - $parameters['interval'];
  
+         $endTimestamp = $startTimestamp + $parameters['interval'] + $correct;
+ 
+         printf(
+           "%s - %s\n",
+ 
+           date('d-m-Y', $startTimestamp),
+           date('d-m-Y', $endTimestamp)
+         );
+ 
          $intervalStrings[] = sprintf(
            '%s - %s',
  
!           date('d-m-Y', $startTimestamp),
!           date('d-m-Y', $endTimestamp)
          );
  
***************
*** 102,114 ****
              'client_id'   => $parameters['client_id'],
              'api_call'    => $parameters['api_call'],
!             'start'       => $i,
!             'end'         => $i + $parameters['interval'] + $correct,
              'constraints' => $parameters['constraints']
            )
          );
  
!         $timestamps[] = $i;
! 
!         $i += $correct;
        }
      } else {
--- 108,119 ----
              'client_id'   => $parameters['client_id'],
              'api_call'    => $parameters['api_call'],
!             'start'       => $startTimestamp,
!             'end'         => $endTimestamp,
              'constraints' => $parameters['constraints']
            )
          );
  
!         $timestamps[]    = $startTimestamp;
!         $startTimestamp += $correct;
        }
      } else {




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.