로그인 후 메뉴가 사라지는데요.
본문
초짜이다 보니
질문을 너무 많이 드리네요.
답변해주시는 모든 분들
감사합니다.
로그인 전에는
메뉴가 나타나는데 (떠있는 레이어?)
로그인 후에는
메뉴가 사라지는 현상이 있습니다.
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<!-- <li><a href="<?php echo G5_ADMIN_URL ?>/shop_admin/"><b>관리자</b></a></li>-->
<?php } ?>
<?php } else { ?>
<div id="pd">
<a href="../"><div class="dn"></div></a><!--홈으로-->
<a href="<?php echo G5_SHOP_URL; ?>/category.php" target="_blank"><div class="dn2"></div></a> <!--카테고리-->
<a href="<?php echo G5_SHOP_URL; ?>/mypage.php"><div class="dn3"></div></a><!--마이페이지-->
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B22"><div class="dn4"></div></a><!--고객센터-->
</div>
<?php } ?>
이부분이 사라지는데
도통 모르겠습니다.
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$admin = get_admin("super");
// 사용자 화면 우측과 하단을 담당하는 페이지입니다.
// 우측, 하단 화면을 꾸미려면 이 파일을 수정합니다.
?>
</div><!-- container End -->
<?php
if(G5_DEVICE_BUTTON_DISPLAY && G5_IS_MOBILE) {
$seq = 0;
$p = parse_url(G5_URL);
$href = $p['scheme'].'://'.$p['host'].$_SERVER['PHP_SELF'];
if($_SERVER['QUERY_STRING']) {
$sep = '?';
foreach($_GET as $key=>$val) {
if($key == 'device')
continue;
$href .= $sep.$key.'='.$val;
$sep = '&';
$seq++;
}
}
if($seq)
$href .= '&device=pc';
else
$href .= '?device=pc';
?>
<div class="dc">
<div id="device_change"><a href="<?php echo $href; ?>">PC Shop</a></div>
<a href="#" id="device_change2">상단으로</a>
</div>
<div id="pa">
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<a href="<?php echo G5_ADMIN_URL ?>/shop_admin/"><div style="width:10%; height:26px; padding:0px; text-align:center; float:left; background: url('../shop/img/admin.jpg') no-repeat 50% 0;"></div></a>
<?php } ?>
<a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php"><div style="width:20%; height:26px; padding:0px; text-align:center; float:left; background: url('../shop/img/info.jpg') no-repeat 50% 0;"></a></div>
<a href="<?php echo G5_BBS_URL; ?>/logout.php?url=shop"><div style="width:20%; height:26px; padding:0px; text-align:center; float:left; background: url('../shop/img/logout.jpg') no-repeat 50% 0;"></div></a>
<?php } else { ?>
<a href="<?php echo G5_BBS_URL ?>/register.php"><div class="ps"></div></a>
<a href="<?php echo G5_BBS_URL; ?>/login.php?url=<?php echo $urlencode; ?>"><div class="ps2"></div></a>
<?php } ?>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B01&on=30"><div class="ps3"></div></a>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B13&wr_id=1"><div class="ps4"></div></a>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B12"><div class="ps5"></div></a>
<?php if(!$default['de_root_index_use']) { ?>
<?php } ?>
</div>
<div id="ft">
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B11&wr_id=1"><font color="#fff"><b>회사소개</b>|</font></a>
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B41"><font color="#fff"><b>소식알리미</b>|</font></a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy"><font color="#fff"><b>개인정보취급방침</b>|</font></a>
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision"><font color="#fff"><b>이용약관</b></font></a>
<h2><?php echo $config['cf_title']; ?> 정보</h2>
<!-- <a href="<?php echo $default['de_root_index_use'] ? G5_URL : G5_SHOP_URL; ?>/"><img src="<?php echo G5_DATA_URL; ?>/common/mobile_logo_img2" alt="처음으로"></a>-->
<p>
<span><font color="#ed8fb9"><?php echo $default['de_admin_company_name']; ?></font></span>
<span><font color="#ed8fb9">대표 : <?php echo $default['de_admin_company_owner']; ?></font></span><br>
<span><font color="#ed8fb9">주소 : <?php echo $default['de_admin_company_addr']; ?></font></span><br>
<span><font color="#ed8fb9">사업자 등록번호 : <?php echo $default['de_admin_company_saupja_no']; ?></font></span>
<br><span><font color="#ed8fb9">전화 : <?php echo $default['de_admin_company_tel']; ?></font></span>
<span><font color="#ed8fb9">팩스 : <?php echo $default['de_admin_company_fax']; ?></font></span><br>
<!-- <span><b>운영자</b> <?php echo $admin['mb_name']; ?></span><br> -->
<span><font color="#ed8fb9">통신판매업신고번호 : <?php echo $default['de_admin_tongsin_no']; ?></font></span><br>
<span><font color="#ed8fb9">개인정보관리책임자 : <?php echo $default['de_admin_info_name']; ?></font></span>
<br>
<font color="#ed8fb9">Copyright © 2015 <?php echo $default['de_admin_company_name']; ?>. All Rights Reserved.</font>
</p>
<br><br><br><br><br>
<style>
#pd {
width:100%; height:70px; position:fixed; bottom:0; background: url('/shop/img/top.menu/m/f/f_bg.jpg'); z-index:200;}
.dn {
margin-top:5px;
width:25%;
height:60px;
float:left;
background: url('../shop/img/top.menu/m/f/01.jpg') no-repeat 50% 0;
}
.dn2 {
margin-top:5px;
width:25%;
height:60px;
float:left;
background: url('../shop/img/top.menu/m/f/02.jpg') no-repeat 50% 0;
}
.dn3 {
margin-top:5px;
width:25%;
height:60px;
float:left;
background: url('../shop/img/top.menu/m/f/03.jpg') no-repeat 50% 0;
}
.dn4 {
margin-top:5px;
width:25%;
height:60px;
float:left;
background: url('../shop/img/top.menu/m/f/04.jpg') no-repeat 50% 0;
}
</style>
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<!-- <li><a href="<?php echo G5_ADMIN_URL ?>/shop_admin/"><b>관리자</b></a></li>-->
<?php } ?>
<?php } else { ?>
<div id="pd">
<a href="../"><div class="dn"></div></a><!--홈으로-->
<a href="<?php echo G5_SHOP_URL; ?>/category.php" target="_blank"><div class="dn2"></div></a> <!--카테고리-->
<a href="<?php echo G5_SHOP_URL; ?>/mypage.php"><div class="dn3"></div></a><!--마이페이지-->
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B22"><div class="dn4"></div></a><!--고객센터-->
</div>
<?php } ?>
</div>
<?php
}
$sec = get_microtime() - $begin_time;
$file = $_SERVER['PHP_SELF'];
if ($config['cf_analytics']) {
echo $config['cf_analytics'];
}
?>
<script src="<?php echo G5_JS_URL; ?>/sns.js"></script>
<?php
include_once(G5_PATH.'/tail.sub.php');
?>
답변 1
현재 님이 올려주신 아래의 소스를 보면, 로그인이 안되었을때는 소스에서 else부분이 실행이 되고, 로그인 한 상태라면, 즉.. $is_member값이 있으므로 if($is_member)가 실행이 되므로, 아래의 소스에서 보여질 내용이 없기 때문에 메뉴 내용은 당연히 안 나오는 것이 맞겠는데요.
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<!-- <li><a href="<?php echo G5_ADMIN_URL ?>/shop_admin/"><b>관리자</b></a></li>-->
<?php } ?>
<?php } else { ?>
<div id="pd">
<a href="../"><div class="dn"></div></a><!--홈으로-->
<a href="<?php echo G5_SHOP_URL; ?>/category.php" target="_blank"><div class="dn2"></div></a> <!--카테고리-->
<a href="<?php echo G5_SHOP_URL; ?>/mypage.php"><div class="dn3"></div></a><!--마이페이지-->
<a href="<?php echo G5_BBS_URL; ?>/board.php?bo_table=B22"><div class="dn4"></div></a><!--고객센터-->
</div>
<?php } ?>