/home/mjc1/public_html/j3demo/adm/index_old.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
$no_login 
"Y";
include(
"./_common.php");
include(
$j3_path."/header.sub.php");
if(
$id_code!=''){
?>
    <script>
        document.location.href='intro.php';
    </script>
<?php
}
?>
<style>
body {background:#3b6ea5;}
</style>
<div class="adminLoginWrap">
    <div class="adminLoginContainer">
        <h1 class="screen_out">administer Login</h1>
        <div class="loginArea">
        <form name="logFrm" method="post" action="admin_login_process.php" onSubmit="return false;">
            <p class="id_save">
                <label for="checksaveid">아이디 저장</label>
                <input type="checkbox" name="checksaveid" id="checksaveid" <?php if($_COOKIE['save_adminid']!=''){?>checked<?php }?>>
            </p>
            
            <dl class="userid">
                <dt><label for="userid" class="screen_out">아이디</label></dt>
                <dd class="inputBox"><input tabindex="1" name="userid" type="text" id="userid" size="15" placeholder="아이디" style="" value='<?php echo $_COOKIE['save_adminid'];?>'></dd>
            </dl>
            
            <dl class="passwd">
                <dt><label for="passwd" class="screen_out">비밀번호</label></dt>
                <dd class="inputBox"><input tabindex="2" name="passwd" type="password" id="passwd" size="15" onKeyPress="if (13 == event.keyCode) $('.loginBtn').click();" placeholder="비밀번호" style=""></dd>
            </dl>

            <a class="loginBtn"><img src="../adm/img/admin_login_button.png" alt="로그인버튼" tabindex="3"></a>

            <input type='hidden' name='Chk' value='1'> 

        </form>
        </div><!--//loginArea-->
    </div><!--//adminLoginContainer-->
</div><!--//adminLoginWrap-->

<script>
$(function(){
    $(".loginBtn").css("cursor","pointer").click(function(){
        if($("#userid").val()=='')    {
            alert('아이디를 입력하세요.'); return;
        }
        if($("#passwd").val()=='')    {
            alert('비밀번호를 입력하세요.'); return;
        }
        var form_data = $("form[name='logFrm']").serialize();
        $.ajax({type:"post", url:"ajax.login_process.php",data:form_data, dataType : "xml", 
            success:function(xml){    
                var v_mode = $(xml).find("mode").text();
                var v_mode_ok = $(xml).find("mode_ok").text();
                var v_msg = $(xml).find("msg").text();
                var v_adminid = $(xml).find("adminid").text();
                if(v_mode_ok=='Y'){
                    if($("#checksaveid").is(":checked")){
                        setsave("save_adminid", v_adminid, 31);
                    } else {
                        setsave("save_adminid", "", -1);
                    }
                    document.location.href='<?php echo $j3_adm_url;?>/intro.php';
                } else {
                    alert(v_msg);
                }
            },
            error:function(rtn,status,error){ alert(error);    }
        });
    });
});
</script>
<?php
_pr
($_SESSION);
_pr($_COOKIE);
include(
$j3_path."/footer.sub.php");
?>