레벨별 다른 페이지 보내기?

· 16년 전 · 1516 · 5
2222.jpf.jpg
우측 상단에      HOME / 로그인 / 회원가입 / SIteMap  부분 중 ...

HOME 버튼의 경우

비회원은                 -    index.html

로그인 한 후 ... HOME 버튼 클릭 시 .. 각기 다른 페이지로 보내고자 합니다.

레벨 5이하는            -   member.html
레벨 6이상 8이하는   -    vip.html
레벨 9이상은            -   admin.html   로 이동 시키 고자 합니다.

1. 어떤 식으로 php구문 작성 해야 하는지 ?
2. 세션을 이용한다면 그누보드에선 어떻게 적용해야 하는지 ?
asp하다가 php한지 얼마 안되어서 헛갈립니다.
예문 좀 부탁 드립니다.


첨부파일

2222.jpf.jpg (16.8 KB)
0회 2009-06-10 02:09
|

댓글 5개

switch( intval($member['mb_level'])) {
case 10:
case 9: $home_href='admin.html'; break;

case 8:
case 7:
case 6: $home_href='vip.html'; break;

case 5:
case 4:
case 3:
case 2: $home_href='member.html'; break;
case 1:
case 0:
default: $home_href='index.html';
}
<td><div align="center"><a href="<? switch( intval($member['mb_level'])) {
case 10: $home_href='http://notredame.or.kr/bbs/board.php?bo_table=cal_01' ; break;
case 9: $home_href='http://notredame.or.kr/bbs/board.php?bo_table=cal_01' ; break;
case 8: $home_href='http://notredame.or.kr/bbs/board.php?bo_table=cal_01' ; break;
case 7: $home_href='http://notredame.or.kr/bbs/board.php?bo_table=cal_01' ; break;
case 6: $home_href='index.html'; break;
case 5: $home_href='index.html'; break;
case 4: $home_href='index.html'; break;
case 3: $home_href='index.html'; break;
case 2: $home_href='index.html'; break;
case 1: $home_href='index.html'; break;
case 0: $home_href='index.html'; break;
default: $home_href='index.html'; break;
}
?>">
<img src="img/home.gif" width="50" height="19"></a></div></td>
switch 끝나고
echo $home_href;
추가 하세요.
엑스엠엘님 감사 합니다.... 덕분에 잘 해결 했습니다.
감사합니다.
참고 하겠습니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
16년 전 조회 1,497
16년 전 조회 1,143
16년 전 조회 809
16년 전 조회 811
16년 전 조회 1,003
16년 전 조회 1,510
16년 전 조회 975
16년 전 조회 1,898
16년 전 조회 1,046
16년 전 조회 1,517
16년 전 조회 1,780
16년 전 조회 1,121
16년 전 조회 944
16년 전 조회 1,372
16년 전 조회 1,614
16년 전 조회 1,552
16년 전 조회 1,522
16년 전 조회 1,078
16년 전 조회 946
16년 전 조회 943
🐛 버그신고