Changeset 4 for www/statistic/graf.php


Ignore:
Timestamp:
Jan 14, 2008, 9:48:39 PM (17 years ago)
Author:
george
Message:

Upraveno: Změna přístupu k databázi na třídu rozšířenou mysqli.
Upraveno: Sjednocení
Upraveno: Změna kódování všech stránek na UTF-8.
Odstraňeno: Staré nepotřebné soubory.

Location:
www
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www

    • Property svn:ignore set to
      config.php
      php_script_error.log
  • www/statistic/graf.php

    r1 r4  
    1 <?
    2 include('../db.php');
    3 DB_Init('localhost','root','','statistic');
     1<?php
     2include('../global.php');
    43
    54if(!array_key_exists('pocet',$_GET)) die('Musíte zadat poèet minut');
     
    2019
    2120// Zji¹tìní maxima
    22 DB_Query('SELECT (down+up) FROM traffic ORDER BY time DESC LIMIT 0,'.$Pocet);
    23 while($Row = DB_Row())
     21$DbResult = $Database->query('SELECT (down+up) FROM traffic ORDER BY time DESC LIMIT 0,'.$Pocet);
     22while($Row = $DbResult->fetch_array())
    2423{
    2524  if($Max < $Row[0]) $Max = $Row[0];
     
    6160imagerectangle($im,0,0,$Sirka-1,$Vyska-1,$black);
    6261
    63 DB_Query('SELECT (down+up) FROM traffic ORDER BY time DESC LIMIT 0,'.$Pocet);
     62$DbResult = $Database->query('SELECT (down+up) FROM traffic ORDER BY time DESC LIMIT 0,'.$Pocet);
    6463$x = 1;
    6564$Body = array();
    66 while($Row = DB_Row())
     65while($Row = $DbResult->fetch_array())
    6766{
    6867  $Total = $Vyska-2-$Row[0]/60/$Max*$Vyska+2;
     
    7271}
    7372// Prùmìrování
    74 for($i=1;$i<(count($Body)-8);$i=$i+2)
     73for($i=1; $i<(count($Body)-8); $i=$i+2)
    7574{
    7675//  $Body[$i] = ($Body[$i+2]+$Body[$i+4]+$Body[$i+6]+$Body[$i+8])/4;
Note: See TracChangeset for help on using the changeset viewer.