require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); $APPLICATION->SetTitle('Отчеты'); $month = $_GET['m']; session_start(); if($month) { session_start(); $_SESSION['month'] = $month; } elseif(isset($_SESSION['month'])) { $month = $_SESSION['month']; } else $month = date('m'); $time_begin = date('Y').'-'.$month.'-00 00:00:00'; $number_month = cal_days_in_month(CAL_GREGORIAN, $month, date('Y')); $time_end = date('Y').'-'.$month.'-' . $number_month . ' 23:59:59'; $time_begin = strtotime($time_begin); $time_end = strtotime($time_end); $engineers = Service::GetEngineerList(); $mainEngineers = Service::GetMainEngineerList(); $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [3,8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0, 6); $counts = array(); foreach($engineers as $key=>$e) { $records = Register::GetRecords($total_records, 'UF_DATE', 'asc', [8], $time_begin, $time_end, 0, 1000000, 0, 0, 0, 0, [], 0, $key); foreach($records as $rec) { $counts[$rec['main_engi']['id']] += 1; } } // echo '
'; // print_r($counts); // echo ''; $months = array( '01' => 'январь', '02' => 'февраль', '03' => 'март', '04' => 'апрель', '05' => 'май', '06' => 'июнь', '07' => 'июль', '08' => 'август', '09' => 'сентябрь', '10' => 'октябрь', '11' => 'ноябрь', '12' => 'декабрь' ); $curMonth = $months[$month] . ' ' . date('Y'); ?>
Инженер | Обработано отчетов |
---|---|
Warning: Undefined variable $e in D:\ktt\ttepla.com\public_html\service\report\main_engineers.php on line 91 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\main_engineers.php on line 91 |
Warning: Undefined variable $counts in D:\ktt\ttepla.com\public_html\service\report\main_engineers.php on line 92 Warning: Undefined variable $key in D:\ktt\ttepla.com\public_html\service\report\main_engineers.php on line 92 Warning: Trying to access array offset on value of type null in D:\ktt\ttepla.com\public_html\service\report\main_engineers.php on line 92 |