} if ($ocinku_styd[$i][0] == 2) { $ocinku[$g][1] = $j - 1 + $kilk - 2; } if ($ocinku_styd[$i][0] == 3) { $ocinku[$g][1] = $j - 1 + $kilk * 2 - 4; } $ocinku[$g][2] = $ocinku_styd[$i][$j + 1]; $ocinku[$g][0] = $ocinku_styd[$i][2]; $g++; } } } //Звязок оцінок з розкодуванням $student_contingent = $ibase->select_idstyd_tocontingent($zvjaz_styd[0][1]); $last_id_excel = $test->insert_excel($student_contingent['SEMESTER'], $student_contingent['DEPARTMENTID'], $student_contingent['SPECIALITYID'], $_POST['zdacha'], $_POST['potik'], $_POST['chastuna'], $_POST['date'], $_POST['lang'], count($module_styd) - 1, $_POST['year']); $test->insert_log_excel($_POST['title'], $_POST['date'], $links, 'MILKA', $last_id_excel); for ($m = 0; $m < count($module_styd) - 1; $m++) { if ($module_styd[$m][1] != null) { $test->insert_module($last_id_excel, $module_styd[$m][3], $module_styd[$m][4], $module_styd[$m][2], $module_styd[$m][1], $module_styd[$m][0]); } } echo "<table border='1' id='t'><tr><td>Прізвище</td><td>Дисципліни</td><td>За тест</td><td>Поточна</td><td>Остаточна</td></tr>"; for ($j = 0; $j < count($zvjaz_styd); $j++) { $m = 0; for ($i = 0; $i < count($ocinku); $i++) { if ($zvjaz_styd[$j][2] == $ocinku[$i][0]) { for ($x = 0; $x < count($potochna_styd); $x++) { if ($zvjaz_styd[$j][1] == $potochna_styd[$x][1]) { for ($o = 0; $o < count($ostatochna_styd); $o++) { if ($zvjaz_styd[$j][1] == $ostatochna_styd[$o][1] && $ostatochna_styd[$o][$m + 2] != '') {