Der Code:
Code: Alles auswählen
// For the Birthday Mod
$query = "select username, DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(date_add(\"1970-01-01\", interval(user_birthday) day))), '%Y')+1 as birthday
from ".USERS_TABLE." u
where month(date_add(\"1970-01-01\", interval(user_birthday) day)) = '".$monthView['month']."' and
dayofmonth(date_add(\"1970-01-01\", interval(user_birthday) day)) = '$day';";
if (!$result = $db->sql_query($query)) {
message_die(GENERAL_ERROR, 'Error querying dates for calendar.');
}
while ($topic = $db->sql_fetchrow($result)) {
$topic_text = "Birthday";
$username = $topic['username'];
$birthday = $topic['birthday'];
$template->assign_block_vars('date_row.date_cell.switch_date_cells.date_event', array(
'U_EVENT' => "$first_date<a href=\"#\" onMouseOver=\"createTitle(this, '<b>Birthday:</b> $username<br>Congratulations on your <b>$birthday</b> birthday.', event.pageX, event.pageY);\" onMouseOut=\"destroyTitle();\" class=\"gensmall\">$topic_text</a>")
);
}Der code wird vor dem...
Code: Alles auswählen
// Increment the day
$day++;Und wenn natürlich einer nen besseren Weg weiß oder wie ich "Geburtstag Username" da rein bekomme wäre ich auch sehr dankbar.
Egal wie. Please help.