Unsupported scripts and control panel web app for a hosting company
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

bandwidth.php 627B

123456789101112131415161718192021222324252627
  1. <?PHP
  2. chdir('..'); // So all our includes work right
  3. require('ext/pie.php');
  4. require('lib/common.php');
  5. require('lib/database.php');
  6. require('lib/account.php');
  7. $total = 0;
  8. $sql = 'SELECT site_name, site_bandin, site_bandout FROM sites WHERE user_id = '.UID;
  9. $res = mysql_query($sql);
  10. $stuf = array();
  11. while ($row = mysql_fetch_array($res)) {
  12. $stuff[($row['site_name'])] = ((int)$row['site_bandin'] + (int)$row['site_bandout'] ) ;
  13. $total += $stuff[($row['site_name'])];
  14. }
  15. $im = doPie('Bandwidth usage', $stuff);
  16. header('Content-type: image/png');
  17. imagepng($im);
  18. ?>