채택완료
균이님의 다른게시판리스트 include 하기를 보고..

위 스킨의 '월간달력' 왼편에 '일간'을 같이 보이게 하려고 합니다(위 사진참조)
위 스킨의 list.skin.php를 살펴보니 중간에
<?
switch ($mode) {
case "d" :
include "$board_skin_path/list.day.php";
break;
case "w" :
include "$board_skin_path/list.week.php";
break;
case "m2" :
include "$board_skin_path/list.month2.php";
break;
default :
include "$board_skin_path/list.month2.php";
}
?>
이렇게 되어있었습니다. 일간보기를 클릭하면 게시판 주소 끝에 "&mode=d" 가 붙더군요..
저는 schedule.php를 만들어서 그누보드root에 업로드후, 균이님이 알려주신 아래 코드를 사용하였습니다
<?
include_once("./_common.php");
if(!$member[mb_id]) goto_url("$g4[bbs_path]/login.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./head.php");
?>
<table width="100%" >
<tr>
<td>
<?
$bo_table='schedule';//게시판명
$write_table=$g4[write_prefix].$bo_table;
$board=sql_fetch("select * from $g4[board_table] where bo_table='$bo_table'");
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}";
$bo_table='schedule';//게시판명
$write_table=$g4[write_prefix].$bo_table;
$board=sql_fetch("select * from $g4[board_table] where bo_table='$bo_table'");
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}";
$mode = 'm2'; //월간보기
include "$g4[bbs_path]/list.php";
?>
include "$g4[bbs_path]/list.php";
?>
</td>
<td>
<?
$bo_table='schedule';//게시판명
$write_table=$g4[write_prefix].$bo_table;
$board=sql_fetch("select * from $g4[board_table] where bo_table='$bo_table'");
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}";
$bo_table='schedule';//게시판명
$write_table=$g4[write_prefix].$bo_table;
$board=sql_fetch("select * from $g4[board_table] where bo_table='$bo_table'");
$board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}";
$mode = 'd'; //일간보기
include "$g4[bbs_path]/list.php";
?>
include "$g4[bbs_path]/list.php";
?>
</td>
</tr>
</table>
그런데 먼저 나온 월간보기만 정상적으로 출력되고, 일간보기는 출력되지 않습니다..
$mode = 'd'; //일간보기 <- 이게 먼저 나오면 일간보기만 출력됩니다. 두개가 동시에 출력이 안되는것 같습니다..
어떻게 하면 동시에 include 할 수 있을지 계속 고민하다 올려봅니다.
답변 2개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.