드

if 구문

로그인 head와
로그인전 head와
admin 로그인 head를 다르게 하고싶은데
if/elseif/else를 하는게 맞나요?
완전 초보인지라...ㅠㅠ

소스는 아래와 같습니다. 제가 고쳤는데 (완전 무식..ㅋㅋㅋ) 어떻게 고쳐야 하는건가요?
고수님들 부탁드리겠습니다.... ㅠㅠㅠ

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");

//print_r2(get_defined_constants());

// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.

$table_width = 980;
?>

<!-- 상단 배경 시작 --><style type="text/css">
<!--
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 background-image: url(images/bg.jpg);
 background-repeat: repeat;
}
-->
</style>
<? if (!$member['mb_id']) { ?>
            <!-- 로그인 이전 -->
<table width="<?=$table_width?>" align="center" cellpadding="0" cellspacing="0">
   <tr>
        <td><embed src="<?=$g4['path']?>/images/02.main/main_menu.swf" width="100%" height="112" WMode="Transparent"></td>
  </tr>
</table>
<? } elseif { ?>
            <!-- 로그인 이후 -->
<table width="<?=$table_width?>" align="center" cellspacing="0" cellpadding="0">
   <tr>
        <td><embed src="<?=$g4['path']?>/images/02.main/main_menu_out.swf" width="100%" height="112" WMode="Transparent"></td>
  </tr>
</table>
<? } ?>

<? else ($is_admin == "super" || $is_auth) { ?>
            <!-- admin 이후 -->
<table width="<?=$table_width?>" align="center" cellspacing="0" cellpadding="0">
   <tr>
        <td><embed src="<?=$g4['path']?>/images/02.main/main_menu_out_adm.swf" width="100%" height="112" WMode="Transparent"></td>
  </tr>
</table>
            <? } ?>

댓글 1개

그누 기본세팅시 풀리는 head.php 참고하세요

<? if (!$member['mb_id']) { ?>
로그인 | 회원가입
<? } else { ?>
로그아웃 | 정보수정
<? } ?>
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
09-10-19 조회 1,470
09-10-19 조회 1,059
09-10-19 조회 1,018
09-10-19 조회 1,056
09-10-19 조회 1,151
09-10-19 조회 922
09-10-19 조회 1,160
09-10-19 조회 1,481
09-10-19 조회 1,989
09-10-19 조회 1,077
09-10-19 조회 1,721
09-10-19 조회 1,065
09-10-19 조회 1,676
09-10-19 조회 1,591
09-10-19 조회 1,167
09-10-19 조회 1,075
09-10-19 조회 1,749
09-10-19 조회 1,631
09-10-19 조회 1,591
09-10-18 조회 1,097