로그인 상태 유지... > 그누4 질문답변

그누4 질문답변

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

로그인 상태 유지... 정보

로그인 상태 유지...

본문

로그인 스킨을 안 쓰고 이미지를 따로 사용해서 작성 시켰는데,
다른페이지로 가면 로그인이 풀어져 버리네요 ㅠㅠ
도와주세여~!~!~!~!!~
login.php란 파일로 작성해서
index랑 head파일에 인클루드 시켰습니다.

<?if ($mb_id){?>
<!-- 로그아웃-->
<table width="210" height="141" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td colspan="4">
   <img src="images/logout_01.jpg" width="210" height="35" alt=""></td>
 </tr>
 <tr>
  <td colspan="4" backgound="images/logout_02.jpg" width="210" height="50" align="center">
  <b><?=$mb_id;?></b><font color="red"> 님 환영합니다.</font>
  </td>
 </tr>
 <tr>
  <td colspan="2">
   <img src="images/logout_03.jpg" width="100" height="25" alt=""></td>
  <td colspan="2">
   <a href="./bbs/logout.php" onFocus="this.blur();"><img src="images/logout_04.jpg" width="110" height="25" alt=""></a></td>
 </tr>
 <tr>
  <td>
   <a href="./bbs/member_confirm.php?url=register_form.php" onFocus="this.blur()"><img src="images/logout_05.jpg" width="70" height="30" alt=""></a></td>
  <td colspan="2">
   <a href="./shop/orderinquiry.php" onFocus="this.blur();"><img src="images/logout_06.jpg" width="55" height="30" alt=""></a></td>
  <td>
   <a href="./shop/mypage.php" onFocus="this.blur()"><img src="images/logout_07.jpg" width="85" height="30" alt=""></a></td>
 </tr>
 <tr>
  <td>
   <img src="images/spacer.gif" width="70" height="1" alt=""></td>
  <td>
   <img src="images/spacer.gif" width="30" height="1" alt=""></td>
  <td>
   <img src="images/spacer.gif" width="25" height="1" alt=""></td>
  <td>
   <img src="images/spacer.gif" width="85" height="1" alt=""></td>
 </tr>
</table>
<!-- 로그아웃 End -->
<?}else{?>
<!-- 로그인 -->
<form name="fhead" method="post" onsubmit="return fhead_submit(this);" autocomplete="off" style="margin:0px;">
<input type="hidden" name="url" value="<?=$url?>">

<table width="210" height="141" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td colspan="5">
   <img src="../images/login_01.jpg" width="210" height="35" alt=""></td>
 </tr>
 <tr>
  <td colspan="2">
   <img src="../images/login_02.jpg" width="70" height="25" alt=""></td>
  <td colspan="3" background="../images/login_03.jpg" width="140" height="25" style="padding:0px 0px 0px 10px">

   <input name=mb_id type=text class='box22' required itemname="아이디" value='아이디' onMouseOver='chkReset(this.form);' onFocus='chkReset(this.form);' size="15">
  </td>
 </tr>
 <tr>
  <td colspan="2">
   <img src="../images/login_04.jpg" width="70" height="25" alt=""></td>
  <td colspan="3" background="../images/login_05.jpg" width="140" height="25" style="padding:0px 0px 0px 10px"><input name=password type=text class='box22' itemname="패스워드" value="패스워드" onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);' onKeyPress="check_capslock(event, 'outlogin_mb_password');" size="15"></td>
 </tr>
 <tr>
  <td>
   <img src="../images/login_06.jpg" width="40" height="25" alt=""></td>
  <td colspan="2">
   <img src="../images/login_07.jpg" width="60" height="25" alt="" ></td>
  <td colspan="2">
   <!--<img src="../images/login_08.jpg" width="110" height="25" alt="">--><input type="image" style="border:0;" src="../images/login_08.jpg" border='0' width="110" height="25" onFocus="this.blur();"></td>
 </tr>

 <tr>
  <td colspan="2">
   <a href="./bbs/register.php" onFocus="this.blur();"><img src="../images/login_09.jpg" width="70" height="30" alt=""></a></td>
  <td colspan="2">
   <a href="javascript:win_password_forget();" onFocus="this.blur();"><img src="../images/login_10.jpg" width="55" height="30" alt=""></a></td>
  <td>
   <a href="javascript:win_password_forget();" onFocus="this.blur();"><img src="../images/login_11.jpg" width="85" height="30" alt=""></a></td>
 </tr>
 <tr>
  <td>
   <img src="../images/spacer.gif" width="40" height="1" alt=""></td>
  <td>
   <img src="../images/spacer.gif" width="30" height="1" alt=""></td>
  <td>
   <img src="../images/spacer.gif" width="30" height="1" alt=""></td>
  <td>
   <img src="../images/spacer.gif" width="25" height="1" alt=""></td>
  <td>
   <img src="../images/spacer.gif" width="85" height="1" alt=""></td>
 </tr>
</table>
<script type="text/javascript" src="<?=$g4[path]?>/js/capslock.js"></script>
<script type="text/javascript">
// 엠파스 로긴 참고
var bReset = true;
function chkReset(f)
{
    if (bReset) { if ( f.mb_id.value == '아이디' ) f.mb_id.value = ''; bReset = false; }
    document.getElementById("pw1").style.display = "none";
    document.getElementById("pw2").style.display = "";
}
</script>
<script language="JavaScript">
function fhead_submit(f)
{
    if (!f.mb_id.value) {
        alert("회원아이디를 입력하십시오.");
        f.mb_id.focus();
        return false;
    }

    if (document.getElementById('pw2').style.display!='none' && !f.mb_password.value) {
        alert("패스워드를 입력하십시오.");
        f.mb_password.focus();
        return false;
    }

    <?
    if ($g4[https_url])
        echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
    else
        echo "f.action = '$g4[bbs_path]/login_check.php';";
    ?>

    return true;
}
</script>
</form>
<!-- 로그인 End -->
<?}?>

댓글 전체

젤 윗줄에 include_once("./_common.php");

추가 시켜줬구요, head, index파일에도 있습니다.
($member[mb_id]) 로 하니까 안불러오네요 ㅡㅡ;
음..,

일단 지금상태로 하면 로그인이 한번은 되고 세션도 잘 생성 됩니다.
근데, 그상태에서 새로고침을하면 로그인이 되있는데,
똑같은 주소를 그대로 써서 넣거나, 다른페이지로 넘어가면 로그인이 풀리네요ㅠ

index.php랑 head.php 빼고는 로그인 관련된 다른 페이지는 전혀 손댄곳이 없는데..
혹시 영카트를 쓰고 있는게 이유가 될 수 있나여..?
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT