- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
if ($dt && $eventtype != 5 && $eventtype != 7) {
$sql_cond = " and b.datefrom='$dt'";
}
if ($eventtype == 5 || $eventtype == 7) {
if (!$dt || $dt == "0") {
$w = date("w");
$mon_dl = 7 - $w;
for ($j = 0; $j <= (7 - $w); $j++) {
$d = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + $j, date("Y")));
$dates .= ($dates ? "," . $d : $d);
}
if ($dates) $sql_cond .= " and b.datefrom in ($dates)";
}
if ($dt == "1") {
$w = date("w");
if ($w == 0) {
$monday = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")));
} else {
$monday = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + (7 - $w) + 1, date("Y")));
}
for ($j = 0; $j <= 6; $j++) {
$d = date("Ymd", mktime(0, 0, 0, substr($monday, 4, 2), substr($monday, 6, 2) + $j, substr($monday, 0, 4)));
$dates .= ($dates ? "," . $d : $d);
}
if ($dates) $sql_cond .= " and b.datefrom in ($dates)";
}
if ($dt == "2") {
$w = date("w");
if ($w == 0) {
$monday = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")));
} else {
$monday = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + (7 - $w) + 1, date("Y")));
}
for ($j = 7; $j <= 13; $j++) {
$d = date("Ymd", mktime(0, 0, 0, substr($monday, 4, 2), substr($monday, 6, 2) + $j, substr($monday, 0, 4)));
$dates .= ($dates ? "," . $d : $d);
}
if ($dates) $sql_cond .= " and b.datefrom in ($dates)";
}
}
eth0 29.05.2012 19:34 # 0
Lure Of Chaos 30.05.2012 08:45 # +2