Ejemplo n.º 1
0
 function notice()
 {
     printf($this->lang['notice'], Tools_get::convert_time($this->ttl * 60), $this->limitPERIP, Tools_get::convert_time($this->ttl_ip * 60));
     $this->CheckMBIP();
     $MB1IP = Tools_get::convertmb($this->countMBIP * 1024 * 1024);
     $thislimitMBIP = Tools_get::convertmb($this->limitMBIP * 1024 * 1024);
     $maxsize = Tools_get::convertmb($this->max_size_other_host * 1024 * 1024);
     printf($this->lang['yourjobs'], $_SERVER['REMOTE_ADDR'], $this->lookup_ip($_SERVER['REMOTE_ADDR']), $this->max_jobs_per_ip, $MB1IP, $thislimitMBIP);
     printf($this->lang['status'], $maxsize, count($this->jobs), $this->max_jobs, $this->get_load(), $this->max_load, Tools_get::useronline());
 }
Ejemplo n.º 2
0
 function notice($id = "notice")
 {
     if ($id == "notice") {
         return sprintf($this->lang['notice'], Tools_get::convert_time($this->ttl * 60), $this->limitPERIP, Tools_get::convert_time($this->ttl_ip * 60));
     } else {
         $this->CheckMBIP();
         $totalall = Tools_get::convertmb($this->totalMB * 1024 * 1024);
         $MB1IP = Tools_get::convertmb($this->countMBIP * 1024 * 1024);
         $thislimitMBIP = Tools_get::convertmb($this->limitMBIP * 1024 * 1024);
         $maxsize = Tools_get::convertmb($this->max_size_other_host * 1024 * 1024);
         if ($id == "yourip") {
             return $this->lang['yourip'];
         }
         if ($id == "yourjob") {
             return $this->lang['yourjob'];
         }
         if ($id == "userjobs") {
             return ' ' . $this->lookup_ip($_SERVER['REMOTE_ADDR']) . ' (max ' . $this->max_jobs_per_ip . ') ';
         }
         if ($id == "youused") {
             return sprintf($this->lang['youused']);
         }
         if ($id == "used") {
             return ' ' . $MB1IP . ' (max ' . $thislimitMBIP . ') ';
         }
         if ($id == "sizelimit") {
             return $this->lang['sizelimit'];
         }
         if ($id == "maxsize") {
             return $maxsize;
         }
         if ($id == "totjob") {
             return $this->lang['totjob'];
         }
         if ($id == "totjobs") {
             return ' ' . count($this->jobs) . ' (max ' . $this->max_jobs . ') ';
         }
         if ($id == "serverload") {
             return $this->lang['serverload'];
         }
         if ($id == "maxload") {
             return ' ' . $this->get_load() . ' (max ' . $this->max_load . ') ';
         }
         if ($id == "uonline") {
             return $this->lang['uonline'];
         }
         if ($id == "useronline") {
             return Tools_get::useronline();
         }
         if ($id == "total") {
             return $this->lang['total_consumed'];
         }
         if ($id == "totalall") {
             return $totalall;
         }
     }
 }