. */ session_start(); // hide all error error_reporting(0); if (!isset($_SESSION["mikhmon"])) { header("Location:../admin.php?id=login"); } else { // load session MikroTik $session = $_GET['session']; // load config include('../include/config.php'); include('../include/readcfg.php'); $idbl = $_GET['idbl']; $thisM = substr($idbl,0,3); $thisY = substr($idbl,-4); $ms = array(1 => "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"); $mn = array_search($thisM, $ms); // https://secure.php.net/manual/en/function.cal-days-in-month.php#38666 function days_in_month($month, $year) { // calculate number of days in a month return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31); } if ($mn == date("n")){ $totD = (date('d') +1); }else{ $totD = (days_in_month($mn, $thisY)+ 1); } function resume_per_day($date){ $evalue = explode($date,$_SESSION['dataresume']); $x = count($evalue); for ($i = 0; $i < $x; $i++) { $result += (int) $evalue[$i]; } return ($x-1).'/'.$result; } $totalvrc = explode("/",$_SESSION['totalresume'])[0]; $totalincome = explode("/",$_SESSION['totalresume'])[1]; if ($currency == in_array($currency, $cekindo['indo'])) { $totalreport = "Total " . $totalvrc . "vcr : " . $currency . " " . number_format((float)$totalincome, 0, ",", "."); } else { $totalreport = "Total " . $totalvrc . "vcr : " . $currency . " " . number_format((float)$totalincome, 2); } } ?>

Resume Report