Ejemplo n.º 1
0
 static function getTrafficMonthly($object, $trafficname, $extra_var)
 {
     $tobjectlist = $object->getList($trafficname);
     if (!$tobjectlist) {
         return null;
     }
     $list1 = get_namelist_from_objectlist($tobjectlist);
     $list = lx_array_keys($list1);
     list(, $start, ) = explode(':', $list[0]);
     $count = count($list);
     list(, , $end) = explode(':', $list[$count - 1]);
     $smonth = @strftime("%m", $start);
     $emonth = @strftime("%m", $end);
     $name = $object->nname;
     $thmonth = @date("n");
     $year = @date("Y");
     $count = 0;
     for ($i = $thmonth; $i != $thmonth + 1;) {
         $count++;
         if ($count > 14) {
             break;
         }
         $totallist[] = self::getMonthTotal($tobjectlist, $i, $year, $extra_var);
         if ($i == 1) {
             $i = 13;
             $year = $year - 1;
         }
         $i--;
     }
     return $totallist;
 }
Ejemplo n.º 2
0
 static function getTrafficMonthly($object, $trafficname, $extra_var)
 {
     $tobjectlist = $object->getList($trafficname);
     if (!$tobjectlist) {
         return null;
     }
     $list1 = get_namelist_from_objectlist($tobjectlist);
     $list = lx_array_keys($list1);
     list(, $start, ) = explode(':', $list[0]);
     $count = count($list);
     list(, , $end) = explode(':', $list[$count - 1]);
     $smonth = @strftime("%m", $start);
     $emonth = @strftime("%m", $end);
     $name = $object->nname;
     $month = @date("n");
     $year = @date("Y");
     $count = 0;
     while ($count < 13) {
         $totallist[] = self::getMonthTotal($tobjectlist, $month, $year, $extra_var);
         if ($month == 1) {
             $month = 12;
             $year--;
         } else {
             $month--;
         }
         $count++;
     }
     return $totallist;
 }
Ejemplo n.º 3
0
 static function getSelectList($parent, $var)
 {
     global $gbl, $sgbl, $login, $ghtml;
     switch ($var) {
         case "ipaddress":
             $iplist = $parent->getIpaddress(array($param['web_s_syncserver']));
             if (!$iplist) {
                 //dprintr($parent->__parent_o);
                 throw new lxException("no_ip_pool_in_parent", 'ipaddresslist');
             }
             return lx_array_keys($iplist);
     }
 }