echo date('d.m', $day_date); ?> </td> </tr> <?php if (isset($orderList[$W . '-' . $w])) { foreach ($orderList[$W . '-' . $w] as $oid => $day) { ?> <?php // определение цвета ячейки $cbgcol = 'c0e6c0'; $ctcol = '000000'; $contract = $day['contract']; // определить рекламацию $lit1 = Datas::substr_function($contract, -1, 1); $lit2 = Datas::substr_function($contract, -2, -1); if ($day['otgruz_end'] == 2) { $cbgcol = 'ffff00'; if ($lit1 == 'Р' || $lit2 == 'Р') { $cbgcol = 'FFD700'; } } elseif ($day['upak_end'] == 2) { $cbgcol = '00b050'; } elseif ($day['tech_end'] == 2) { $cbgcol = '00b0f0'; } if (strtotime("today") > strtotime($day['term']) && $day['otgruz_end'] !== '2' && $day['term'] != '0000-00-00') { $ctcol = '7030a0; font-weight:800'; } if ($lit1 == 'Р' || $lit2 == 'Р') { $ctcol = 'a60303; font-weight:800';