hero412

음력생일자를 양력으로 표시하고싶습니다.

그누보드 에서 종전에 생일자 리스트를 메인으로 뽑는 팁이 있어 사용하고 있는데

저희가 회원가입시 양력과 음력을 구분해서 생일를 입력하게끔 되어 있는데 ( 여분필드를 사용)

현재는 양력생일자만 리스트 되고 있어서 음력생일자는 실제 생일과 맞지않아 많이 답답하네요.

아래는 현재사용중인 팁입니다. 고수님들 좀 봐주세요.. 음력생일자를 양력으로 노출시키고 싶습니다.



----- 여기서부터 ------

$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];


$birthday = date("md"); //오늘 날짜(월일)

//회원테이블에서 오늘이 생일인 회원 목록 추출
$sql = " select * from {$g4['member_table']} where substring(mb_birth,5,4) = '{$birthday}' ";
$result = sql_query($sql);
echo "<table width=94% border=0 cellpadding=0 cellspacing=0 ><tr>";
echo "<td height=25 align='center' ><b>$b_mon 월 $b_day 일</b> 생일자</td></tr>";
echo "<tr><td height=1 bgcolor=#efefef></td></tr>";
// echo "<tr><td height=1></td></tr>";
// echo "<tr><td height=2></td></tr>";
echo "<tr><td height=2></td></tr>";
echo "</table>";
echo "<marquee direction=down trueSpeed scrollamount='1' scrolldelay=40 onmouseover='this.stop();' onmouseout='this.start();' height=40 ><table width=190 border=0 cellpadding=0 cellspacing=0 ><tr>";
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 "<tr>";
echo "<td>";
echo "<table border=0 cellpadding=0 cellspacing=0><tr>";
echo "<td width=10></td>";
//echo "<td title=$row[mb_id] valign=middle><img src='$g4[path]/include/birth/img/icl.gif' border=0>$row[mb_nick] 님</td>";
echo "<td title=$row[mb_id] valign=middle><img src='$g4[path]/include/birth/img/icl.gif' border=0><a href='$g4[path]/bbs/memo_form.php?me_recv_mb_id=$row[mb_id]' target='_blank'>$row[mb_nick]($row[mb_name]) 님</a></td>";


//echo "<td>&nbsp;$birth_day 일</td>";
echo "</tr></table>";
echo "</td></tr>";
}

}
echo "<tr><td height=2></td></tr>";
echo "</table></marquee>";
?>
|

댓글 1개

1700-2100년까지 음력 데이터(mysql) 갖고 있는데 필요하시면 연락주세요.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 713
17년 전 조회 754
17년 전 조회 753
17년 전 조회 773
17년 전 조회 693
17년 전 조회 673
17년 전 조회 693
17년 전 조회 1,513
17년 전 조회 3,301
17년 전 조회 1,064
17년 전 조회 879
17년 전 조회 948
17년 전 조회 671
17년 전 조회 736
17년 전 조회 741
17년 전 조회 738
17년 전 조회 795
17년 전 조회 721
17년 전 조회 688
17년 전 조회 928
🐛 버그신고