/home/mjc1/public_html/emillennium/index_20170707.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<?php
$dir 
".";
include_once(
$dir."/_common.php");
include(
'./include/header.php'); 

?>

<style>
.bx-wrapper .bx-controls {position:relative; }
.bx-wrapper .bx-prev {
    left: 10px;
    background: url(/js/bxslider/images/controls.png) no-repeat 0 -32px;
}

.bx-wrapper .bx-next {
    right: 10px;
    background: url(/js/bxslider/images/controls.png) no-repeat -43px -32px;
}

.bx-wrapper .bx-prev:hover {
    background-position: 0 0;
}

.bx-wrapper .bx-next:hover {
    background-position: -43px 0;
}

.bx-wrapper .bx-controls-direction a {
    position: absolute;
    top: 0%;
    margin-top: -10%;
    outline: 0;
    width: 32px;
    height: 32px;
    text-indent: -9999px;
    z-index: 9999;
}

.bx-wrapper .bx-controls-direction a.disabled {
    display: none;
}
</style>

<script src="./js/bxslider/jquery.bxslider.min.js"></script>

<div id="contents">
    <img src="./images/index/main_rolling1.png" alt="롤링배너1">
    <img src="./images/index/main_rolling2.png" alt="롤링배너2">
    <img src="./images/index/main_rolling3.png" alt="롤링배너3">
</div>
<script>
    $(function(){
            $('#contents').bxSlider({
                mode: 'vertical',
                pause : 6000,
                auto : true,
                pager : false,
                controls :  true,
                responsive : true,
            });
    });
</script>


<div id="main-member-area">
    <h2 class="screen_out">로그인 및 메뉴버튼</h2>
    <div id="wrap" style='position:relative;'>
        <!--로그인 전-->
<?php if($eid==''){ ?>
        <div class="main-login">
        <div class='div_app_name'>천년CS</div>
        <form id='index_login_form' onsubmit='return false;'>
            <input type='hidden' name='rtn_url' value='<?php echo $_SERVER['PHP_SELF']?>'>
            <fieldset>
                <legend class="screen_out">로그인</legend>
                <input type="text" name='cid' id="id1" placeholder="회원아이디" value='<?php echo $eadminid?>'><br /><br/>
                <input type="password" name='upass' id="pwd" placeholder="비밀번호" value='<?php echo $epw?>'>
            </fieldset>
            <a href="#" class="login-submit"><span>로그인</span></a>
            <div class='login_su_ck'><input type='checkbox' name='remember_id' value='Y' <?php if($_COOKIE['onlinecs_cid']!=''){ echo "checked"; } ?>> 아이디 저장</div>
            <div class='login_pw_ck'><input type='checkbox' name='remember_tid' value='Y' <?php if($_COOKIE['contract_id']!=''){ echo "checked"; } ?>> 암호 저장</div>
            <input name='sa_type' type='hidden' value='<?php echo $said?>' size=1>
        </form>
        </div>
<?php } else { ?>
        <!--로그인 후-->
        <div class="main-logout">
            <p class="shop-name">
                <em>회사명(ID) : </em>
                <b><?php echo $sa_name;?>(<?php echo $eid;?>)</b>
                <a href="#" class="logout-btn"><span>로그아웃</span></a>
            </p>
            <p class="gray">
                <b><?php echo $saname;?></b>님 환영합니다.<br>
                이용해 주셔서 감사합니다.
            </p>
            <p class="light-blue">★ 사용후에는 반드시 로그아웃 하세요.</p>
        </div>
<?php ?>
        
        <div class="main-order-menu">
            <h3><span style='color:#F7F7F7;'>발주관리</span></h3>
            <ol>
                <li><a href="sell.php" class="menu1"><span>매입관리</span></a></li>
                <li><a href="buy.php" class="menu2"><span>매출관리</span></a></li>
                <li><a href="sell_list.php" class="menu3"><span>매입원장</span></a></li>
                <li><a href="buy_list.php" class="menu4"><span>매출원장</span></a></li>
            </ol>
        </div>
    <div>
</div>


<div id="wrap" class='notice-wrap'>
    <div id="main-contents-area">
        <h2 class="screen_out">콘텐츠영역</h2>
        <div class="main-costomer-notice">
            <div class="costomer-notice">
                <h3>공지사항<a href="javascript:notice_view();">더보기 ></a></h3>
                <ul>
<?php include_once("notice_main.php"); ?>
<!--                    <li><a href="#"><span class="news">온라인수발주에 오신 것을 환영합니다.</span><span class="date">2016-03-07</span></a></li>
                    <li><a href="#"><span class="news">온라인수발주에 오신 것을 환영합니다.</span><span class="date">2016-03-07</span></a></li>
                    <li><a href="#"><span class="news">온라인수발주에 오신 것을 환영합니다.</span><span class="date">2016-03-07</span></a></li>
                    <li><a href="#"><span class="news">온라인수발주에 오신 것을 환영합니다.</span><span class="date">2016-03-07</span></a></li>-->
                </ul>
            </div>
            <div class="costomer-notice-view" style='overflow-y:scroll;padding:5px;background:#f9f9f9;margin:10px 0px;'>
                <?php echo $f_content;?>
            </div>
        </div>
        
        <div class="main-costomer-cscenter">
            <div class="costomer-tel">
                <h3 class="screen_out">고객센터</h3>
                <div class="tel-account">
                    <h4>계좌번호</h4>
                    <p><?php echo $bank1[0];?></p>
                    <p><?php echo $bank1[1];?></p>
                </div>
                <div class="tel-num">
                    <h4 class="screen_out">고객센터</h4>
                    <p><em class="title">전화 : </em><span class="blue"><?php echo $tel1;?></span></p>
                    <p><em class="title">팩스 : </em><span class="black"><?php echo $fax1;?></span></p>
                </div>
                <div class="tel-memo">
                    <h4>메모</h4>
                    <p><?php /*if($optmemo_use=='1'){*/ echo "<textarea name='memo_textarea'>{$optmemo_content}</textarea>"/*}*/?></p>
                </div>
            </div>
            <div class="costomer-link">
                <h3>고객지원</h3>
                <ol>
                    <li><a href="./faq.php" class="faq"></a><span>자주묻는질문</span></li>
                    <li><a href="./include/online_user.hwp" class="file"></a><span>주문자 메뉴얼</span></li>
                    <li><a href="./include/online_costomer.hwp" class="file"></a><span>관리자 메뉴얼</span></li>
                </ol>
            </div>
        </div>
    </div>
</div><!--//wrap-->
<!-- 하단 footer div 안맞아서... 아래 div 추가함 -->
</div>
<?php 
//_pr($_SERVER);
?>

<script>

$(function(){
    $("#index_login_form .login-submit").click(function(){
        if($("#index_login_form #id1").val()==''){ alert('아이디를 입력하세요.'); $("#index_login_form #id1").focus(); return;    }
        if($("#index_login_form #pwd").val()==''){ alert('비밀번호를 입력하세요.'); $("#index_login_form #pwd").focus(); return;    }

        if(index_login_form.remember_id.checked == true){
            setsave("onlinecs_cid", $("#index_login_form #id1").val(), 31);
        }else{
            setsave("onlinecs_cid", "", -1);
        }
        
        if(index_login_form.remember_tid.checked == true){
            setsave("contract_id", $("#index_login_form #pwd").val(), 31);
        }else{
            setsave("contract_id", "", -1);
        }

        var form_data =     $("#index_login_form").serialize();
        //alert(form_data); return;
        $.ajax({type:"post", url:"ajax_loginprocess.php",data:form_data, dataType : "xml", 
            success:function(xml){    
                //alert(xml);
                var v_login_ok = $(xml).find("login_ok").text();
                var v_msg = $(xml).find("msg").text();
                var v_rtn_url = $(xml).find("rtn_url").text();
                if(v_login_ok=='Y'){
                    if(index_login_form.remember_id.checked == true){
                        setsave("sa_type_id", $("#index_login_form input[name='sa_type']").val(), 31);
                    } else {
                        setsave("sa_type_id", "", -1);
                    }
                    document.location.href=v_rtn_url;
                } else {
                    alert($(xml).find("msg").text());
                }

            },
            error:function(rtn,status,error){

            }
        });
    });

    $("#index_login_form #pwd").keyup(function(){
        if(event.keyCode==13){
            $("#index_login_form .login-submit").click();
        }
    });

    $(".logout-btn").click(function(){
        location.href='logout.php';
    });

    $("#index_login_form #id1").blur(function(){
        $("input[name='sa_type']").val("");
        select_app_choice();
    });

    $(".div_app_choice a").click(function(){
        flag1=0;
        $("input[name='sa_type_sel']").each(function(){
            if($(this).is(":checked")){ flag1 = 1; flag_val = $(this).val()}
        });
        if(flag1==0){ alert('선택하시기 바랍니다.'); } else {
            //alert(flag_val);
            $("input[name='sa_type']").val(flag_val);
            $(".div_app_choice").hide();
            select_app_choice()
        }
    });

    // 거래처 아이디는 무조건 대문자로 처리
    $("#index_login_form #id2").blur(function(){
        var v = $(this).val();
        var vv = v.toUpperCase();
        $(this).val(vv);
    });
    $("#pop_login_form #id2").blur(function(){
        var v = $(this).val();
        var vv = v.toUpperCase();
        $(this).val(vv);
    });

});

function select_app_choice(){
    $(".div_app_name").hide();
    var form_data =     $("#index_login_form").serialize();
    //alert(form_data); return;
    $.ajax({type:"post", url:"ajax_id1process.php",data:form_data, dataType : "xml", 
        success:function(xml){    
            //alert(xml);
            var v_app_cnt = $(xml).find("app_cnt").text();
            var v_sa_type = $(xml).find("sa_type").text();
            var v_sa_name = $(xml).find("sa_name").text();
            var v_msg = $(xml).find("msg").text();
            if(v_app_cnt==0){
                alert('수주처 아이디를 확인하시기 바랍니다.');
            } else {
                v_sa_type_array = v_sa_type.split(",");
                v_sa_name_array = v_sa_name.split(",");
                if(v_app_cnt>1){
                    $(".div_app_choice").show();
                    $(".div_app_choice ul li").remove();
                    for(i=0;i<v_app_cnt;i++){
                        $(".div_app_choice ul").append("<li><input type='radio' name='sa_type_sel' value='"+v_sa_type_array[i]+"'>&nbsp;"+v_sa_name_array[i]+"</li>");
                    }
                } else {
                    $(".div_app_name").text("");
                    $(".div_app_name").text(v_sa_name_array[0]);
                    $(".div_app_name").show();
                    $("input[name='sa_type']").val(v_sa_type_array[0]);
                }
            }
        },
        error:function(rtn,status,error){

        }
    });
}


function setsave(name, value, expiredays){
    value = encodeURI(value); // 한글깨짐문제 처리
    var today = new Date();
    today.setDate( today.getDate() + expiredays );
    document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"
}
    
</script>

<?php //_pr($_SESSION);
include('./include/footer.php'); ?>