Nie wiedzialem jak nazwac ten temat.
Jest to skrypt ramówki do radia, jesli ktos gra to zaznaczy jakims kolorem a tak sie nie dzieje
chodzi mi o tą linijki:
if ($d != $i) :
else :
if ($h >= $s_t_h && $h < $e_t_h) :
else :
endif;
endif;
$days = array(0 => 'wybierz...', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'); for ($i = 1; $i <=7; $i++) :
echo '<h3>'.$days[$i].'</h3><br /><table style="text-align: left; margin: -30px auto 0 auto; width: 100%; border-collapse: collapse; border: 1px solid #000;">'; $exist = true;
foreach ($seasonshedule as $row) :
if ($row->day == $i) :
$exist = false;
$s_t_h = explode(':', $row->start_time); $s_t_h = $s_t_h[0];
$e_t_h = explode(':', $row->end_time); $e_t_h = $e_t_h[0];
echo '<tr style="background: #'; if ($d != $i) :
else :
if ($h >= $s_t_h && $h < $e_t_h) :
else :
endif;
endif;
echo '; font-weight: bold; color: #000;"><td style="width: 50%; padding: 5px;">'.$row->name.'</td><td style="width: 30%;">'.$row->username.'</td><td style="width: 20%;">'.$row->start_time.' - '.$row->end_time.'</td></tr>'; endif;
endforeach;
if ($exist) :
echo '<tr style="background: #eeb600; font-weight: bold; color: #000;"><td colspan="3" style="padding: 5px;">Brak audycji w tym dniu.</td></tr>'; endif;
endfor;