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 2179 2006-09-01 04:44:17Z chris $
| * $Id: calendar.php 2529 2006-12-17 19:01:37Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 41 | Zeile 41 |
---|
// Make $eid an easy-to-use variable. $eid = intval($mybb->input['eid']);
|
// Make $eid an easy-to-use variable. $eid = intval($mybb->input['eid']);
|
|
|
/* If we are looking at an event, select the date for that event first. */ if($mybb->input['action'] == "event")
| /* If we are looking at an event, select the date for that event first. */ if($mybb->input['action'] == "event")
|
Zeile 53 | Zeile 54 |
---|
if($event_date == FALSE) { error($lang->error_invalidevent);
|
if($event_date == FALSE) { error($lang->error_invalidevent);
|
}
| }
|
list($day, $month, $year) = explode("-", $event_date); } else
| list($day, $month, $year) = explode("-", $event_date); } else
|
Zeile 63 | Zeile 64 |
---|
if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5) { $year = intval($mybb->input['year']);
|
if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5) { $year = intval($mybb->input['year']);
|
} else
| } else
|
{ $year = my_date("Y"); } // Then the month if($mybb->input['month'] >=1 && $mybb->input['month'] <= 12)
|
{ $year = my_date("Y"); } // Then the month if($mybb->input['month'] >=1 && $mybb->input['month'] <= 12)
|
{
| {
|
$month = intval($mybb->input['month']); } else
| $month = intval($mybb->input['month']); } else
|
Zeile 87 | 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 176 | Zeile 178 |
---|
$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 = my_date($mybb->settings['dateformat'], $eventdate, $eventdate, "", 0);
add_breadcrumb($lang->nav_viewevent);
| $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);
|
$plugins->run_hooks("calendar_event_end");
eval("\$eventpage = \"".$templates->get("calendar_event")."\";");
| $plugins->run_hooks("calendar_event_end");
eval("\$eventpage = \"".$templates->get("calendar_event")."\";");
|
Zeile 200 | Zeile 202 |
---|
$feb_fix = 1; } else // Fetch only for this day
|
$feb_fix = 1; } else // Fetch only for this day
|
{
| {
|
$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 212 | 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 270 |
---|
} $eventdate = explode("-", $event['date']); $eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
|
} $eventdate = explode("-", $event['date']); $eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);
|
$eventdate = my_date($mybb->settings['dateformat'], $eventdate, "", 0);
| $eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0);
|
eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";"); } if(!$events)
| eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";"); } if(!$events)
|
Zeile 562 | Zeile 566 |
---|
$plugins->run_hooks("calendar_start");
$time = mktime(0, 0, 0, $month, 1, $year);
|
$plugins->run_hooks("calendar_start");
$time = mktime(0, 0, 0, $month, 1, $year);
|
$days = my_date("t", $time);
| $days = date("t", $time);
|
$bdays = array();
// Load Birthdays
| $bdays = array();
// Load Birthdays
|
Zeile 576 | Zeile 580 |
---|
{ $bday_where = "birthday LIKE '%-$month-%' OR birthday LIKE '%-$month'"; $feb_fix = 0;
|
{ $bday_where = "birthday LIKE '%-$month-%' OR birthday LIKE '%-$month'"; $feb_fix = 0;
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where); while($user = $db->fetch_array($query)) { $bday = explode("-", $user['birthday']); if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)
|
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where); while($user = $db->fetch_array($query)) { $bday = explode("-", $user['birthday']); if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)
|
{
| {
|
$bdays[1]++; } else
| $bdays[1]++; } else
|
Zeile 591 | Zeile 595 |
---|
$bdays[$bday[0]]++; } }
|
$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'))");
|
Zeile 614 | Zeile 619 |
---|
} $daybits = "<tr>\n"; $count = 0;
|
} $daybits = "<tr>\n"; $count = 0;
|
$sblanks = my_date("w", $time);
| $sblanks = date("w", $time);
|
// Blank space before first day if($sblanks) {
| // Blank space before first day if($sblanks) {
|