메인페이지의 형태를 유지하면서, 좌측메뉴를 통한 개별적인 html페이지 이동 및 구현

main_test.png
1. head.php의 기본적인 구조

<?
/*
사용자 화면 상단과 좌측을 담당하는 페이지입니다.
상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.
*/
include "./$cfg[bbs_dir]/gblayer.php";
?>

<table width=100% align=center><tr><td>

<table width=100% cellpadding=0 cellspacing=0>
<tr bgcolor=#6B8AB5>
<td height=60>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td><a href='<?="./$cfg[index]"?>'><img src='logo.gif' border=0 alt=''></a></td>
</tr>
</table>
</td>
</tr>
<tr class='subjectbg ht'>
<td>
<table width=100%>
<tr>
<td width=50%>
&nbsp;
<?
echo "<a href='./$cfg[index]'>HOME</a> | ";
if (!$member[mb_id]) {
echo "<a href='./$cfg[index]?doc=$cfg[bbs_dir]/mblogin.php&url=$urlencode'>로그인</a> |";
echo "<a href='./$cfg[index]?doc=$cfg[bbs_dir]/mbform.php'>회원가입</a>";
} else {
echo "<a href='./$cfg[index]?doc=$cfg[bbs_dir]/mblogout.php&url=$urlencode'>로그아웃</a> |";
echo "<a href='./$cfg[index]?doc=$cfg[bbs_dir]/mbform.php&w=u'>정보수정</a> |";
echo "<a href='./$cfg[chat_dir]/frame.php'>실시간채팅</a> |";
if ($is_admin == "default" || $is_admin == "group") {
echo " (<a href='./$cfg[index]?doc=$cfg[bbs_dir]/admin/index.php'><u>ADMIN</u></a>)";
}
}
?>
&nbsp;
</td>
<td width=50% align=right>
<!-- 그누보드 외부 검색 폼 -->
<table cellpadding=0 cellspacing=0>
<form name=fgnusearch method=get action='<?="./$cfg[index]"?>'>
<tr>
<td>
<input type='hidden' name='doc' value='<?="$cfg[bbs_dir]/gnusearch.php"?>'>
<input type='hidden' name='sselect' value='wr_subject|wr_content'>
<input type='hidden' name='soperator' value='0'>
<input type='hidden' name='srch_rows' value='5'>
<input type='hidden' name='srch_comment' value='1'>
<input type='hidden' name='srch_days' value='0'>

<input type=text class=input name='stext' size=15 required minlength=2 itemname='검색어' value='<?=hsc($stext)?>'>
<input type=submit value='검색'>
&nbsp;
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor=#6B8AB5>
<td height=1></td>
</tr>
</table>

<!-- 공백 -->
<table width=100% height=5><tr><td></td></tr></table>

<table width='100%' cellpadding=0 cellspacing=0>
<colgroup width=150>
<colgroup width=5>
<colgroup width=''>
<tr>
<!-- 왼쪽 메뉴 부분 -->
<td valign=top>

<!-- 외부 로그인 -->
<? include "./$cfg[bbs_dir]/outlogin.php"; ?>

<!-- 공백 -->
<table width=100% height=5><tr><td></td></tr></table>

<a href='<?="?doc=profile.html"; ?>'>자기소개</a>

<!-- 공백 -->
<table width=100% height=5><tr><td></td></tr></table>

</td>
<td></td><!--head.php와 main.php의 기본적인 구조의 틀을 흐뜨리지 않기 위해 사용.-->
<td valign=top>

//head.php파일 내용 끝


2. profile.html(메인페이지의 형태를 유지한 자기소개 페이지)

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
define("_DOCTYPE_", "DESIGN");
$html_title = "메인페이지에서 형태를 유지하고 html파일 불러오기";
include "./lib/latest.lib.php";
?>


<table width='100%' cellpadding=0 cellspacing=0>
<colgroup width=''>
<colgroup width=5>
<colgroup width=150>
<tr>
<td valign=top>
<b>자기소개 테스트<b><p>
메인페이지 좌측 head.php에서 개별적인 자기소개(profile.html)파일을 불러오기<br>
단, 게시판의 형태 및 메인페이지 형태를 유지하기<p>
<b>참고사항</b><p>
개별페이지를 불러오는 방법은 상단 1~6라인 삭제하고, 동봉한 head.php파일에서 profile.html파일의<br>
링크를 수정.<br>
즉, ?doc=...형식이 아니라, <a href=./profile2.html>자기소개</a>의 형식
</td>
<td></td>
<td valign=top>
<!-- 투표 -->
<? include "./$cfg[bbs_dir]/vote.php"; ?>
</td>
</tr>

//메인구조 유지한 페이지 끝


3. profile2.html

<table width='100%' cellpadding=0 cellspacing=0>
<colgroup width=''>
<colgroup width=5>
<colgroup width=150>
<tr>
<td valign=top>
<b>자기소개 테스트<b><p>
메인페이지 좌측 head.php에서 개별적인 자기소개(profile.html)파일을 불러오기<br>
단, 게시판의 형태 및 메인페이지 형태를 유지하기<p>
<b>참고사항</b><p>
개별페이지를 불러오는 방법은 상단 1~6라인 삭제하고, 동봉한 head.php파일에서 profile.html파일의<br>
링크를 수정.
</td>
<td></td>
<td valign=top>
</td>
</tr>

//profile2.html 파일 끝

첨부파일

main_test.png (22 KB)
3회 2004-02-18 22:21
testfile.zip (2.3 KB) 31회 2004-02-18 22:21
|

댓글 1개

답변 정말 감사드립니다... 이런 방법으로 하면 되는거군요....^^
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누3질답

+
제목 글쓴이 날짜 조회
22년 전 조회 381
22년 전 조회 319
22년 전 조회 732
22년 전 조회 302
22년 전 조회 314
22년 전 조회 340
22년 전 조회 310
22년 전 조회 298
22년 전 조회 499
22년 전 조회 935
22년 전 조회 387
22년 전 조회 371
22년 전 조회 348
22년 전 조회 495
22년 전 조회 508
알마겔
22년 전 조회 4,451
22년 전 조회 564
22년 전 조회 459
22년 전 조회 517
22년 전 조회 425
🐛 버그신고