![]() |
|
【首页生日会员】 -DZ plugin - 打印版本 +- MyTFLS社区 (https://community.mytfls.com) +-- 论坛: 电脑区 (https://community.mytfls.com/forum-19.html) +--- 论坛: 系统+网络+硬件 (https://community.mytfls.com/forum-20.html) +--- 主题: 【首页生日会员】 -DZ plugin (/thread-5462.html) |
【首页生日会员】 -DZ plugin - taiyuan123 - 2004-10-16 1.修改 index.php 文件。 查找 代码: include template('index');在其..上...面增加以下内容 代码: $month_names =array("","01","02","03","04","05","06","07","08","09","10","11","12");
$now = time() + ($timeoffset * 3600);
$today = $month_names[gmdate("n",$now)]."-".gmdate("d",$now);
$query = $db->query("SELECT username FROM $table_members WHERE bday LIKE'%$today'");
if($db->num_rows($query) != 0) {
while($happy = mysql_fetch_array($query)) {
$memlink = "<a href='viewpro.php?username=$happy[username]'>$happy[username]</a>";
if ($happybday == "")
{
$happybday = "$memlink";
}else{
$happybday .= "$comma$memlink";
}
$comma = ", ";
}
}elseif ($happy == "") {
$happybday = "";
}2.修改index模板 查找 代码: <!--{else}-->
{lang online_only_guests}
<!--{/if}-->
<!--{/if}-->
</td></tr></table></td></tr>
<!--{/if}-->增加 代码: <!-- {if $happybday} -->
<!-- happy birthday HACK -->
<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">Happy Birthday to:</span>
</td></tr></table></tr>
<tr>
<td bgcolor="{ALTBG2}" colspan="6" 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 colspan="6" valign="middle">
<img src="{IMGDIR}/happybirthday.gif" align=left width=32 height=32> $happybday
</td>
</tr></table></td></tr>
<!-- happybirthday HACK -->
<!-- {/if} -->呵呵 回来我弄弄 几天没看服务器了 - donet - 2004-10-17 呵呵 回来我弄弄 几天没看服务器了 - taiyuan123 - 2004-10-17 有一个happybirthday.gif 你到这里拿~ http://taiyuan123.mytfls.com/bbs/images/default/happybirth.gif - 羽枫 - 2004-10-19 晕.拉来这种超级专业知识.我们这种半专业的压根看不懂... - 骑扫帚的胖女巫 - 2004-10-20 DONET 重装完本本 那些保存的用户名和登陆都没了 。。。发给我吧 |