Folgende Änderungen tätigen, sollte funktionieren!
function checkzyklusins ($x,$i0,$i1,$i2,$z,$sar) {
$ts = mktime(0,0,0,$i1,$i2,$i0);
$wt = date('w',$ts);
if ($z == 'wer' AND ($wt > 0 AND $wt < 6)) {
return (true);
} elseif ($z == 'wek' AND ($wt == 0 OR $wt == 6)) {
return (true);
} elseif ($z == 'woc' AND (($x % 7) == 1)) {
return (true);
} elseif ($z == '14t' AND (($x % 14) == 1)) {
return (true);
} elseif ($z == 'mon' AND ($i2 == $sar[2])) {
return (true);
} elseif ($z == 'jae' AND ($i1 == $sar[1] AND $i2 == $sar[2])) {
return (true);
}
return (false);
}
zu
function checkzyklusins ($x,$i0,$i1,$i2,$z,$sar) {
$ts = mktime(0,0,0,$i1,$i2,$i0);
$wt = date('w',$ts);
if ($z == 'wer' AND ($wt > 0 AND $wt < 6)) {
return (true);
} elseif ($z == 'tag') {
return (true);
} elseif ($z == 'wek' AND ($wt == 0 OR $wt == 6)) {
return (true);
} elseif ($z == 'woc' AND (($x % 7) == 1)) {
return (true);
} elseif ($z == '14t' AND (($x % 14) == 1)) {
return (true);
} elseif ($z == 'mon' AND ($i2 == $sar[2])) {
return (true);
} elseif ($z == 'jae' AND ($i1 == $sar[1] AND $i2 == $sar[2])) {
return (true);
}
return (false);
}
und
<select name="zyklus">
<option></option>
<option value="wer">werktags</option>
<option value="wek">wochenende</option>
<option value="woc">wöchentlich</option>
<option value="14t">14 täglich</option>
<option value="mon">monatlich</option>
<option value="jae">jährlich</option>
</select>
zu
<select name="zyklus">
<option></option>
<option value="tag">täglich</option>
<option value="wer">werktags</option>
<option value="wek">wochenende</option>
<option value="woc">wöchentlich</option>
<option value="14t">14 täglich</option>
<option value="mon">monatlich</option>
<option value="jae">jährlich</option>
</select>