Edgein |
8th December 2009 11:18 |
[FTS 1.1] birthdays visible on the index.php
1 Attachment(s)
place it where you want to see
PHP Code:
///////////////// BIRTHDAY MOD ///////////////////// $b = 0; //print(""); print "<table width=80% align=center class=bottom border=0 cellspacing=0 cellpadding=0><tr><td class=embedded><div align=left>"; print "<img border=0 src=pic/birthday.gif>"; print "</td><td class=embedded><div align=center>"; print "<font size=5 color=33CCFF><i><b>Today's Birthdays</b></i></font>"; print "</td><td class=embedded><div align=right>"; print "<img border=0 src=pic/birthday.gif>"; print "</td></tr></table>";
$currentdate = date("Y-m-d", time() + $CURUSER['tzoffset'] * 60); list($year1, $month1, $day1) = split('-', $currentdate); $res2 = mysql_query("SELECT birthday, id, username FROM users WHERE birthday != '0000-00-00'") or sqlerr(); while ($arr2 = mysql_fetch_assoc($res2)) { $birthday = date($arr2["birthday"]); $username = $arr2["username"]; $id = $arr2["id"]; list($year2, $month2, $day2) = split('-', $birthday); if (($month1 == $month2) && ($day1 == $day2)) { if ($b > 0) print(", "); print("<center><a href=userdetails.php?id=$id><font size=2 color=FF7AE4><b>$username</b></a></center>"); $b = $b + 1; } } if ($b == 0) print "<font size=5 color=33CCFF><i><b>There are today no Birthdays.</b></i></font>"; print("</font>"); ///////////////// BIRTHDAY MOD /////////////////////
place the attachment into the pic folder
http://www.edgein.org/verjaardag.jpg
|