Florian Schaal
2014-08-07 4c794a56f80f639867e90dd586cbf213ffa09e05
interface/lib/classes/functions.inc.php
@@ -229,7 +229,8 @@
            if(preg_match($regex, $result['ip'])) $ips[] = $result['ip'];
         }
      }
      /*
      $results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''");
      if(!empty($results) && is_array($results)){
         foreach($results as $result){
@@ -260,6 +261,8 @@
            }
         }
      }
      */
      $results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''");
      if(!empty($results) && is_array($results)){
         foreach($results as $result){
@@ -309,11 +312,9 @@
    * @param int precicion - after-comma-numbers (default: 2)
    * @return string - formated bytes
    */
   public function formatBytes($size, $precision = 2) {
      $base=log($size)/log(1024);
      $suffixes=array('', 'k', 'M', 'G', 'T');
      $suffixes=array('', ' kB', ' MB', ' GB', ' TB');
      return round(pow(1024, $base-floor($base)), $precision).$suffixes[floor($base)];
   }