Esempio n. 1
0
         $fio = $tmp[0];
         $labels[$i] = $fio . " (" . bytes2mb($accts[$i]["traffic"]) . " Мб)";
     }
     break;
 case "month":
     $accts = $BILL->GetMonthUsersAccts(0, 1, $gid);
     $params[14] = "Статистика по пользователям за " . $months[date("n") - 1] . " " . date("Y") . " года";
     for ($i = 0; $i < count($accts); ++$i) {
         $data[$i] = $accts[$i]["traffic"];
         $tmp = explode(" ", $accts[$i]["fio"]);
         $fio = $tmp[0];
         $labels[$i] = $fio . " (" . bytes2mb($accts[$i]["traffic"]) . " Мб)";
     }
     break;
 case "week":
     $accts = $BILL->GetWeekUsersAccts(0, 1, $gid);
     $params[14] = "Статистика за неделю:";
     for ($i = 0; $i < count($accts); ++$i) {
         $data[$i] = $accts[$i]["traffic"];
         $tmp = explode(" ", $accts[$i]["fio"]);
         $fio = $tmp[0];
         $labels[$i] = $fio . " (" . bytes2mb($accts[$i]["traffic"]) . " Мб)";
     }
     break;
 case "tarifs":
     if (!isset($fdate)) {
         $fdate = "";
     }
     if (!isset($tdate)) {
         $tdate = "";
     }
Esempio n. 2
0
 $BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]);
 switch ($action) {
     case "today":
         $accts = $BILL->GetTodayUsersAccts($sort, 0, $gid);
         $wday = date("w");
         if ($wday == 0) {
             $wday = 6;
         }
         $head = "Статистика по пользователям за " . $wdaysto[$wday - 1] . ", " . date("d") . " " . $monthsof[date("n") - 1] . "" . date(" Y года");
         break;
     case "month":
         $accts = $BILL->GetMonthUsersAccts($sort, 0, $gid);
         $head = "Статистика по пользователям за " . $months[date("n") - 1] . " " . date("Y") . " года:<br>\n   <small>(по состоянию на " . date("d") . " " . $monthsof[date("n") - 1] . ")</small>";
         break;
     case "week":
         $accts = $BILL->GetWeekUsersAccts($sort, 0, $gid);
         get_current_week(&$b, &$a, 0);
         $head = "Статистика по пользователям за текущую неделю:<br><small>(" . date_dmy(strtotime($b)) . " - " . date_dmy(strtotime($a)) . ")</small>";
         break;
     case "sessions":
         if ($mod == "show") {
             if (!isset($groupby)) {
                 $groupby = "";
             }
             if ($daysel[0] == "null") {
                 $daysel1 = 1;
             } else {
                 $daysel1 = $daysel[0];
             }
             if ($monsel[0] == "null") {
                 $monsel1 = 1;