생일자 명단나오는거 질문이요.... 정보
생일자 명단나오는거 질문이요....본문
여기 뒤져보니깐 G3용을 G4용으로 바꿔서 올려놓은게 있는데...
각 커뮤니티 별로 나타내려하는데 중등부,고등부의 각 게시판에 생일자 명단나오게 해야되는데..
지금 있는거는 전체 회원으로 나와서 문제에요..
어떻게 해결할까요??
아래 소스입니다...
<?
include_once("./_common.php");
?>
<html>
<head></head>
<body bgcolor="white">
<?
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
$sql = "select * from $g4[member_table] order by mb_birth";
$result = sql_query($sql);
echo "<table width=147 border=0 cellpadding=0 cellspacing=0><tr>";
echo "<td align=center valign=bottom background='./birth/images/top.gif' border=0 width=147 height=28>▒ <b>$b_year 년 $b_mon 월</b> ▒</td></tr>";
// echo "<tr><td height=2 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
// echo "<tr><td height=1 background='./birth/images/underline.gif' border=0 width=147 height=1></td></tr>";
// echo "<tr><td height=2 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td height=5 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td background='./birth/images/body.gif' border=0 width=147 height=20>";
echo "<marquee direction=up scrolldelay=400 loop=true height=120>";
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$birth_month = substr("$row[mb_birth]",-4,2);
$birth_day = substr("$row[mb_birth]",-2,2);
if ($birth_month == $b_mon) {
echo "<table border=0 cellpadding=0 cellspacing=0><tr>";
echo "<td width=10></td>";
echo "<td width=8 align=center valign=middle><img src='./birth/images/today_on.gif' border=0></td>";
echo "<td width=80 title=$row[mb_id]> $row[mb_name] 님</td>";
echo "<td> $birth_day 일</td>";
echo "</tr></table>";
}
}
echo "</marquee></td></tr>";
echo "<tr><td height=5 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td align=center background='./birth/images/bottom.gif' border=0 width=147 height=20>";
echo "<font color='#F07F0E'>생일축하합니다.</font>";
echo "</td></tr></table>";
?>
</body>
</html>
각 커뮤니티 별로 나타내려하는데 중등부,고등부의 각 게시판에 생일자 명단나오게 해야되는데..
지금 있는거는 전체 회원으로 나와서 문제에요..
어떻게 해결할까요??
아래 소스입니다...
<?
include_once("./_common.php");
?>
<html>
<head></head>
<body bgcolor="white">
<?
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
$sql = "select * from $g4[member_table] order by mb_birth";
$result = sql_query($sql);
echo "<table width=147 border=0 cellpadding=0 cellspacing=0><tr>";
echo "<td align=center valign=bottom background='./birth/images/top.gif' border=0 width=147 height=28>▒ <b>$b_year 년 $b_mon 월</b> ▒</td></tr>";
// echo "<tr><td height=2 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
// echo "<tr><td height=1 background='./birth/images/underline.gif' border=0 width=147 height=1></td></tr>";
// echo "<tr><td height=2 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td height=5 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td background='./birth/images/body.gif' border=0 width=147 height=20>";
echo "<marquee direction=up scrolldelay=400 loop=true height=120>";
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$birth_month = substr("$row[mb_birth]",-4,2);
$birth_day = substr("$row[mb_birth]",-2,2);
if ($birth_month == $b_mon) {
echo "<table border=0 cellpadding=0 cellspacing=0><tr>";
echo "<td width=10></td>";
echo "<td width=8 align=center valign=middle><img src='./birth/images/today_on.gif' border=0></td>";
echo "<td width=80 title=$row[mb_id]> $row[mb_name] 님</td>";
echo "<td> $birth_day 일</td>";
echo "</tr></table>";
}
}
echo "</marquee></td></tr>";
echo "<tr><td height=5 background='./birth/images/body2.gif' border=0 width=147 height=2></td></tr>";
echo "<tr><td align=center background='./birth/images/bottom.gif' border=0 width=147 height=20>";
echo "<font color='#F07F0E'>생일축하합니다.</font>";
echo "</td></tr></table>";
?>
</body>
</html>
댓글 전체
가입할때 여분필드등의 활용으로 어떤 옵션을 두어 회원을 그룹단위로 나누지 않았다면...
수정이 불가능하실거 같네요...
수정이 불가능하실거 같네요...