Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: calendar.php 2429 2006-11-24 23:14:14Z chris $
| * $Id: calendar.php 2529 2006-12-17 19:01:37Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 79 | Zeile 79 |
---|
$month = my_date("n"); } // Find the number of days in that month
|
$month = my_date("n"); } // Find the number of days in that month
|
$time = mktime(0, 0, 0, $month, 1, $year);
| $time = gmmktime(0, 0, 0, $month, 1, $year);
|
$days = my_date("t", $time); // Now the specific day if(isset($mybb->input['day']) && $mybb->input['day'] >= 1 && $mybb->input['day'] <= $days)
| $days = my_date("t", $time); // Now the specific day if(isset($mybb->input['day']) && $mybb->input['day'] >= 1 && $mybb->input['day'] <= $days)
|
Zeile 88 | Zeile 88 |
---|
} else {
|
} else {
|
|
|
// Make the day the last day of the month, if the user overshot the number of days in the month if(isset($mybb->input['day']) && $mybb->input['day'] > $days) {
| // Make the day the last day of the month, if the user overshot the number of days in the month if(isset($mybb->input['day']) && $mybb->input['day'] > $days) {
|
Zeile 133 | Zeile 134 |
---|
// No weird actions allowed. $accepted_actions = array("event", "addevent", "do_addevent", "editevent", "do_editevent", "dayview"); if(!in_array($mybb->input['action'], $accepted_actions))
|
// No weird actions allowed. $accepted_actions = array("event", "addevent", "do_addevent", "editevent", "do_editevent", "dayview"); if(!in_array($mybb->input['action'], $accepted_actions))
|
{
| {
|
$mybb->input['action'] = "calendar_main"; }
|
$mybb->input['action'] = "calendar_main"; }
|
|
|
// View a specific event. if($mybb->input['action'] == "event") { $plugins->run_hooks("calendar_event_start");
|
// View a specific event. if($mybb->input['action'] == "event") { $plugins->run_hooks("calendar_event_start");
|
$query = $db->query("
| $query = $db->query("
|
SELECT e.eid, e.private, e.author, e.subject, e.description, e.date, u.username, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."events e LEFT JOIN ".TABLE_PREFIX."users u ON (e.author=u.uid)
| SELECT e.eid, e.private, e.author, e.subject, e.description, e.date, u.username, u.usergroup, u.displaygroup FROM ".TABLE_PREFIX."events e LEFT JOIN ".TABLE_PREFIX."users u ON (e.author=u.uid)
|
Zeile 158 | Zeile 159 |
---|
if($event['private'] == "yes" && $event['username'] != $mybb->user['username']) { error_no_permission();
|
if($event['private'] == "yes" && $event['username'] != $mybb->user['username']) { error_no_permission();
|
}
| }
|
if(($event['author'] == $mybb->user['uid'] && $mybb->user['uid'] != 0) || $mybb->usergroup['cancp'] == "yes") {
| if(($event['author'] == $mybb->user['uid'] && $mybb->user['uid'] != 0) || $mybb->usergroup['cancp'] == "yes") {
|
Zeile 173 | Zeile 174 |
---|
$eventposter = "<a href=\"member.php?action=profile&uid=$event[author]\">".format_name($event['username'], $event['usergroup'], $event['displaygroup']) . "</a>"; } else
|
$eventposter = "<a href=\"member.php?action=profile&uid=$event[author]\">".format_name($event['username'], $event['usergroup'], $event['displaygroup']) . "</a>"; } else
|
{
| {
|
$eventposter = $lang->guest; } $eventdate = explode("-", $event['date']);
|
$eventposter = $lang->guest; } $eventdate = explode("-", $event['date']);
|
$eventdate = mktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
| $eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
|
$eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0);
add_breadcrumb($lang->nav_viewevent);
| $eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0);
add_breadcrumb($lang->nav_viewevent);
|
Zeile 205 | Zeile 206 |
---|
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '$day-$month'"; $feb_fix = 0; }
|
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '$day-$month'"; $feb_fix = 0; }
|
|
|
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where);
$alterbg = $theme['trow1'];
| $query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where);
$alterbg = $theme['trow1'];
|
Zeile 213 | Zeile 215 |
---|
while($bdays = $db->fetch_array($query)) { $bday = explode("-", $bdays['birthday']);
|
while($bdays = $db->fetch_array($query)) { $bday = explode("-", $bdays['birthday']);
|
|
|
if($bday[2] && $bday[2] < $year) { $age = $year - $bday[2];
| if($bday[2] && $bday[2] < $year) { $age = $year - $bday[2];
|
Zeile 266 | Zeile 269 |
---|
$eventposter = $lang_guest; } $eventdate = explode("-", $event['date']);
|
$eventposter = $lang_guest; } $eventdate = explode("-", $event['date']);
|
$eventdate = mktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
| $eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
|
$eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0); eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";"); }
| $eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0); eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";"); }
|
Zeile 277 | Zeile 280 |
---|
} if($birthdays) {
|
} if($birthdays) {
|
$eventdate = mktime(0, 0, 0, $month, $day, $year);
| $eventdate = gmmktime(0, 0, 0, $month, $day, $year);
|
$bdaydate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0); $lang->birthdays_on_day = sprintf($lang->birthdays_on_day, $bdaydate); eval("\$bdaylist = \"".$templates->get("calendar_dayview_birthdays")."\";");
| $bdaydate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0); $lang->birthdays_on_day = sprintf($lang->birthdays_on_day, $bdaydate); eval("\$bdaylist = \"".$templates->get("calendar_dayview_birthdays")."\";");
|
Zeile 333 | Zeile 336 |
---|
if($mybb->input['action'] == "addevent") { $plugins->run_hooks("calendar_addevent_start");
|
if($mybb->input['action'] == "addevent") { $plugins->run_hooks("calendar_addevent_start");
|
// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter. if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
|
// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter. if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
|
{ $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
| { $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
Zeile 368 | Zeile 371 |
---|
} } $msel[$month] = " selected=\"selected\"";
|
} } $msel[$month] = " selected=\"selected\"";
|
|
|
$dayopts = '';
//Construct option list for days
| $dayopts = '';
//Construct option list for days
|
Zeile 400 | Zeile 403 |
---|
} } add_breadcrumb($lang->nav_addevent);
|
} } add_breadcrumb($lang->nav_addevent);
|
|
|
$plugins->run_hooks("calendar_addevent_end");
eval("\$addevent = \"".$templates->get("calendar_addevent")."\";");
| $plugins->run_hooks("calendar_addevent_end");
eval("\$addevent = \"".$templates->get("calendar_addevent")."\";");
|
Zeile 416 | Zeile 419 |
---|
$event = $db->fetch_array($query);
if(!is_numeric($event['author']))
|
$event = $db->fetch_array($query);
if(!is_numeric($event['author']))
|
{
| {
|
error($lang->error_invalidevent); } elseif(($event['author'] != $mybb->user['uid'] || $mybb->user['uid'] == 0) && $mybb->usergroup['cancp'] != "yes")
| error($lang->error_invalidevent); } elseif(($event['author'] != $mybb->user['uid'] || $mybb->user['uid'] == 0) && $mybb->usergroup['cancp'] != "yes")
|
Zeile 464 | Zeile 467 |
---|
$eventhandler->update_event(); $plugins->run_hooks("calendar_do_editevent_end"); redirect("calendar.php?action=event&eid=$eid", $lang->redirect_eventupdated);
|
$eventhandler->update_event(); $plugins->run_hooks("calendar_do_editevent_end"); redirect("calendar.php?action=event&eid=$eid", $lang->redirect_eventupdated);
|
}
| }
|
} }
| } }
|
Zeile 473 | Zeile 476 |
---|
{ $plugins->run_hooks("calendar_editevent_start");
|
{ $plugins->run_hooks("calendar_editevent_start");
|
|
|
// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter. if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter. if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0)) { $codebuttons = build_mycode_inserter(); $smilieinserter = build_clickable_smilies();
|
}
| }
|
$eid = intval($mybb->input['eid']);
$query = $db->simple_select(TABLE_PREFIX."events", "*", "eid='{$eid}'");
| $eid = intval($mybb->input['eid']);
$query = $db->simple_select(TABLE_PREFIX."events", "*", "eid='{$eid}'");
|
Zeile 528 | Zeile 531 |
---|
if($i == $eventdate[2]) { $yearopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
if($i == $eventdate[2]) { $yearopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
}
| }
|
else { $yearopts .= "<option value=\"$i\">$i</option>\n";
| else { $yearopts .= "<option value=\"$i\">$i</option>\n";
|
Zeile 584 | Zeile 587 |
---|
{ $bday = explode("-", $user['birthday']); if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)
|
{ $bday = explode("-", $user['birthday']); if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)
|
{
| {
|
$bdays[1]++;
|
$bdays[1]++;
|
}
| }
|
else { $bdays[$bday[0]]++; } }
|
else { $bdays[$bday[0]]++; } }
|
|
|
$events = array(); // Load Events $query = $db->simple_select(TABLE_PREFIX."events", "subject, private, date, eid", "date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))");
| $events = array(); // Load Events $query = $db->simple_select(TABLE_PREFIX."events", "subject, private, date, eid", "date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))");
|