if($discuz_user && $newpm) {
require $discuz_root.'./include/pmprompt.php';
}
//cnteacher-會員生日hack-簡洁版-開始
$birthday_today = getdate();
$birthday_month = $birthday_today['mon'];
$birthday_day = $birthday_today['mday'];
$birthday_year = $birthday_today['year'];
$birthday_to_show = 50; //改變這里,可以設置首頁顯示多少個生日會員名字。
$query = $db->query("SELECT username,bday,$birthday_year-YEAR(bday) as age FROM $table_members where MONTH(bday)='$birthday_month' and DAYOFMONTH(bday)='$birthday_day' ORDER BY bday DESC LIMIT 0,".$birthday_to_show);
$birthday_list = '';
$comma = '';
$birthday_num =0;
while ($temp = $db->fetch_array($query)) {
if($birthday_num < $birthday_to_show) {
$birthday_list .= "$comma <a href=\"viewpro.php?&username=".rawurlencode($temp['username'])."\" alt='生日:".$temp['bday']."\r\n虛度:".$temp['age']."年光陰'>".$temp['username']."</a>";
$comma = ", ";
}
$birthday_num ++;
}
if($birthday_num > $birthday_to_show) $birthday_list .= ' ...';
unset($temp,$birthday_today);
//cnteacher-會員生日hack-簡洁版-完畢
<!--{if empty($gid) && $whosonlinestatus}-->
<!--{if empty($gid)}-->
<tr><td colspan="6" class="header">
<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center">
<tr class="smalltxt" style="color: {HEADERTEXT}"><td><img src="{IMGDIR}/indexicon.gif" align="absmiddle"> <span class="bold">每日慶典</span> -
今天將有 <span class="bold">$birthday_num</span> 人收到
來自社區的生日祝福</td>
</tr></table></tr><tr>
<td bgcolor="{ALTBG1}" width="5%" align="center"><img src="{IMGDIR}/online.gif"></td>
<td bgcolor="{ALTBG2}" colspan="5" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
<table cellspacing="0" cellpadding="0" border="0" width="98%" align="center" class="smalltxt">
<tr><td valign="middle">
<!--{if $birthday_num>'0' }-->
$birthday_list
<!--{else}-->
如果今天的到訪給你帶來好心情,那么別忘了明天還來阿! <!--{/if}-->
</td></tr></table>
<!--{/if}-->
<!--{if $birthday_num>'0' }--><!--{if empty($gid)}--><tr><td colspan="6" class="header">
<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center">
<tr class="smalltxt" style="color: {HEADERTEXT}"><td><img src="{IMGDIR}/indexicon.gif" align="absmiddle">
<span class="bold">每日慶典</span> - 今天將有 <span class="bold">$birthday_num</span> 人收到來自社區的生日祝福</td>
</tr></table></tr><tr>
<td bgcolor="{ALTBG1}" width="5%" align="center"><img src="{IMGDIR}/online.gif"></td>
<td bgcolor="{ALTBG2}" colspan="5" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">
<table cellspacing="0" cellpadding="0" border="0" width="98%" align="center" class="smalltxt">
<tr><td valign="middle">
$birthday_list
</td></tr></table>
<!--{/if}--><!--{/if}-->
唔該唔好再回覆d thxthx,looklook,i want 等無謂回覆