1:
2:
3:
4:
5:
6:
7:
8:
9:
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:
|
// eventcalendar nur Private
if ($action == 'eventcalendar_private') {
$today_day = formatdate('j', time());
$today_month = formatdate('n', time());
$today_year = formatdate('Y', time());
$result = $db->query("SELECT
SUBSTRING(e.eventdate,1,4) AS year,
SUBSTRING(e.eventdate,6,2) AS month,
SUBSTRING(e.eventdate,9,2) AS day,
e.*, u.username
FROM bb".$n."_events e
LEFT JOIN bb".$n."_users u USING(userid)
WHERE SUBSTRING(e.eventdate,1,4)='$today_year' AND e.public=0 AND e.userid = '$wbbuserdata[userid]'
ORDER BY month ASC, day ASC, e.subject ASC");
$monthbit = '';
$eventbit = '';
$lastmonth = 0;
$parse = &new parse($docensor, 90, $wbbuserdata['showimages'], '', $usecode);
while ($row = $db->fetch_array($result)) {
if ($lastmonth != 0 && $lastmonth != $row['month']) {
$monthname = getmonth($lastmonth);
eval("\$monthbit .= \"".$tpl->get("calendar_monthbit")."\";");
$eventbit = '';
}
$row['event'] = $parse->doparse($row['event'], $row['allowsmilies'], $row['allowhtml'], $row['allowbbcode'], $row['allowimages']);
$row['subject'] = htmlconverter(textwrap($row['subject']));
$row['username'] = htmlconverter($row['username']);
$dayname = getday(date('w', mktime(0, 0, 0, $row['month'], $row['day'], $row['year'])));
eval("\$eventbit .= \"".$tpl->get("calendar_eventbit")."\";");
$lastmonth = $row['month'];
}
if ($lastmonth != 0) {
$monthname = getmonth($lastmonth);
eval("\$monthbit .= \"".$tpl->get("calendar_monthbit")."\";");
}
eval("\$tpl->output(\"".$tpl->get("calendar_events")."\");");
}
|