Changeset 4 for www/statistic/graf.php
- Timestamp:
 - Jan 14, 2008, 9:48:39 PM (18 years ago)
 - Location:
 - www
 - Files:
 - 
      
- 2 edited
 
- 
          
  . (modified) (1 prop)
 - 
          
  statistic/graf.php (modified) (4 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
www
- 
Property       svn:ignore
 set to       
config.php
php_script_error.log
 
 - 
Property       svn:ignore
 set to       
 - 
      
www/statistic/graf.php
r1 r4 1 <? 2 include('../db.php'); 3 DB_Init('localhost','root','','statistic'); 1 <?php 2 include('../global.php'); 4 3 5 4 if(!array_key_exists('pocet',$_GET)) die('Musíte zadat poèet minut'); … … 20 19 21 20 // 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); 22 while($Row = $DbResult->fetch_array()) 24 23 { 25 24 if($Max < $Row[0]) $Max = $Row[0]; … … 61 60 imagerectangle($im,0,0,$Sirka-1,$Vyska-1,$black); 62 61 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); 64 63 $x = 1; 65 64 $Body = array(); 66 while($Row = DB_Row())65 while($Row = $DbResult->fetch_array()) 67 66 { 68 67 $Total = $Vyska-2-$Row[0]/60/$Max*$Vyska+2; … … 72 71 } 73 72 // Prùmìrování 74 for($i=1; $i<(count($Body)-8);$i=$i+2)73 for($i=1; $i<(count($Body)-8); $i=$i+2) 75 74 { 76 75 // $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.
  