Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. $rowcount = mysql_num_rows($result);
  4.  
  5.  
  6. while($row = @MYSQL_FETCH_ARRAY($result, MYSQL_ASSOC))
  7. {
  8.    
  9.     $bars = array (
  10.     'bar1.png',
  11.     'bar2.png',
  12.     'bar3.png',
  13.     'bar4.png',
  14.     'bar5.png',
  15.     'bar6.png',
  16.     'bar7.png',
  17.     'bar9.png',
  18.     'bar9.png',
  19.     'bar10.png'
  20.    
  21.     );
  22.    
  23.     //$bar = $bars[array_rand($bars)];
  24.     $bar = $bars[$i++%10];
  25.     $clicks = rand ( 2000 , 6000 );
  26.  
  27. ?>
  28.       <tr>
  29.         <span title="<?php echo $row['url']; ?>" class="site_stats">
  30.         <td id="rk<?php echo $row['id']; ?>" class="chart"><?php echo $row['url']; ?></td>
  31.         <td id="rt<?php echo $row['id']; ?>" class="value"><img src="stats-images/<?php echo $bar; ?>" width="<?php echo $clicks / 15; ?>" height="15" /><?php echo $clicks; ?></td>
  32.         </span>
  33.       </tr>
  34. <?php
  35.  
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement