Code: Selecteer alles
#
#-----[ OPEN ]--------------------------------------------HIER
#
calendar.php
#
#-----[ FIND ]--------------------------------------------
#
{
$currentday = create_date("j", time(), $board_config['board_timezone']);
$currentmonth = create_date("m", time(), $board_config['board_timezone']);
$currentyear = create_date("Y", time(), $board_config['board_timezone']);
}
#
#-----[ AFTER, ADD ]--------------------------------------
#
if ($cal_config['show_birthdays'] == 1)
{
$username = array();
$user_id = array();
$birthday = array();
$birthmonth = array();
$useryear = array();
$ii = 0;
$sql = "SELECT username, user_id, user_birthday
FROM " . USERS_TABLE . "
WHERE user_birthday < '999999'
ORDER BY username";
if( ($result = $db->sql_query($sql)) )
{
while( $row = $db->sql_fetchrow($result))
{
$ii++;
$username[$ii] = $row['username'];
$user_id[$ii] = $row['user_id'];
$birthday[$ii] = intval(substr($row['user_birthday'], 6, 2));
$birthmonth[$ii] = intval(substr($row['user_birthday'], 4, 2));
$useryear[$ii] = intval(substr($row['user_birthday'], 0, 4));
}
}
}
#
#-----[ FIND ]--------------------------------------------
#
// Changed the range to do ALL the days not require duplicate code later.
#
#-----[ AFTER, ADD ]--------------------------------------
#
$max_query = 0;
#
#-----[ FIND ]--------------------------------------------
#
$event_list = '';
$correction = 0;
#
#-----[ AFTER, ADD ]--------------------------------------
#
if ($cal_config['show_birthdays'] == 1)
{
$ii = 0;
for ($ii; $ii<=count($useryear); $ii++)
{
if ( $birthday[$ii] == $thisday AND $birthmonth[$ii] == $month)
{
$userage = $year - $useryear[$ii];
$correction++;
$event_list .= '<span class="gensmall">-> <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id[$ii]") . '">' . $username[$ii] . ' (' . $userage .')</a></span><br />';
}
}
}
#
#-----[ FIND ]--------------------------------------------
#
$query_num = count($this_date);
#
#-----[ AFTER, ADD ]--------------------------------------
#
if (($query_num + $correction) > $max_query)
{
$max_query = $query_num + $correction;
}
#
#-----[ FIND AND DELETE]----------------------------------
#
if (($query_num - $correction) < 4) {
for ($j=0; $j<(4 - ($query_num-$correction)); $j++) {
$event_list .= '<span class=gensmall>&<br></span>';
}
}
#
#-----[ FIND ]--------------------------------------------
#
$template->assign_vars(array(
'CAL_VERSION' => 'Ver: '.$cal_version,
'CALENDAR' => $lang['Calendar'],
'L_CAL_NEW' => $lang['Cal_add_event'],
'U_INDEX' => append_sid("index.$phpEx"),
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'U_CAL_HOME' => $homeurl)
);
#
#-----[ REPLACE WITH ]------------------------------------
#
if ($max_query < 5) $max_query = 5;
$max_height = $max_query * 12;
$template->assign_vars(array(
'CAL_VERSION' => 'Ver: '.$cal_version,
'CALENDAR' => $lang['Calendar'],
'L_CAL_NEW' => $lang['Cal_add_event'],
'U_INDEX' => append_sid("index.$phpEx"),
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'U_CAL_HOME' => $homeurl,
'MAX_HEIGHT' => 'height=' . $max_height . 'px')
);
maar ik ik heb aleen in mijn calendar.php dit staan
Code: Selecteer alles
<?php
/*********************************************
* Calendar Lite
*
* $Author: martin $
* $Date: 2004/08/13 02:24:41 $
* $Revision: 1.1 $
*
*********************************************/
include_once('cal_lite.php');
?>