/home/mjc1/public_html/otms_old/base_config.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
<?php
$dir 
".";
include_once(
$dir."/_common.php");
include(
'./header.php'); 

if(
$eid==''){
    
alert('로그인 후에 이용가능합니다.',"index.php"); exit;
}

//_pr($otms_options);

$sql "select code, comp_name from offices where 1=1 ";
$res mysql_query($sql,$connect_om);
while(
$info=mysql_fetch_array($res)){
    
$office_array[$info['code']] = $info['comp_name'];
}

//_pr($otms_options);
?>
<style>
    .cust_modal2 { border:0px solid #e1e1e1; width:700px; padding:10px; font-size:13px }
</style>

<div id="contents" style="height:2px;border-bottom:1px solid #eee;background:#2f6ba9">
    <span class="screen_out">header 하단 선</span>
</div>

<div id="wrap">
    <div id="sub-title">
        <h2>오픈마켓 정보관리</h2>
        <div class="sub-location">
            <a href="./index.php" class="home"><span class="screen_out">홈</span></a>
            <span class="location-gt"></span>
            <a>기초항목관리</a>
            <span class="location-gt"></span>
            <a>오픈마켓 정보관리</a>
        </div>
    </div>

    <div class="item_tab">
        <div class="item_tab_navi">
            <a value='0' class="on"><span>오픈마켓 설정관리</span></a>
            <a value='1' ><span>기초항목 관리</span></a>
        </div>
    </div><!--//item_tab-->
<form name='base_config_form' id="base_config_form" method='post' action="base_config_reg_process.php" enctype="multipart/form-data">
    <input type='hidden' name='sel_del' value=''>
    <input type='hidden' name='all_del' value=''>
    <input type='hidden' name='sel_del_list' value=''>

    
    <div class="sub-write-area" style='display:block;width:1200px;'>
        <h4 style='font-size:14px; font-weight:bold;margin-top:10px;'>11번가 정보</h4>
        <div class="order-sheet-area" style='width:1200px;'>
            <table class="order-sheet">
                <caption class="screen_out">11번가 정보</caption>
                <colgroup>
                    <col style="width:130px;"><col style="width:260px;">
                    <col style="width:130px;"><col style="width:260px;">
                    <col style="width:130px;"><col style="width:260px;">
                </colgroup>

                <tbody>
                <tr>
                    <th>11번가 아이디</th>
                    <td class='linetxt'>
                        <input type='text' name='otms_site_id_11' value='<?php echo $otms_options['otms_site_id_11'];?>' class= 'width_80'>
                    </td>
                    <th >openapi key</th>
                    <td colspan=3 class='linetxt'>
                        <input type='text' name='otms_apikey_11' value='<?php echo $otms_options['otms_apikey_11'];?>' class='width_500' >
                    </td>
                </tr>
                <tr>
                    <th>적용사업장</th>
                    <td class='linetxt'>
                        <select name='otms_ocode' class='width_200'>
                            <option value=''>-선택-</option>
<?php
    
foreach($office_array as $key=>$val){
        if(
$otms_options['otms_ocode']==$key){ $std "selected";    } else { $std ""; }
        echo    
"        <option value='{$key}{$std}>{$val} ({$key})</option>";
    }
?>
                        </select>
                    </td>
                    <th>매출동기화 거래처</th>
                    <td class='linetxt'>
                        <select name='otms_ccode' class='width_200'>

                        </select>
                    </td>
                </tr>
                <tr>
                    <th>현금입금 적용계좌</th>
                    <td class='linetxt' colspan=3>
                        <select name='otms_bankbook_code' class='width_200'>

                        </select>
                    </td>
                </tr>
            </table>
        </div>
        <span class='help_info'>거래처, 계좌정보가 정확하지 않을경우 먼저 적용사업장을 선택후 저장하면 해당되는 사업장의 거래처와 계좌정보가 표시됩니다. 그때 해당항목 선택후 다시 저장해주세요.</span>
    </div>
</form>
<div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'>
        <div class="sub-btn-area">
            <div class="sub-btn">
                <a class="lignt-blue-btn" id='btn_office_save'>저장</a>
            </div>
        </div>
</div>
</div>
<script>
$(function(){

    $(".item_tab_navi a").click(function(){ //네비게이션 탭 처리
        v = $(this).attr("value");
        if(v==0){
            document.location.href="./base_config.php";
        } else if(v==1){
            document.location.href="./base.php";
        }
    });

    $("#btn_office_save").click(function(){

        if(confirm('저장하시겠습니까?')){
            $("#base_config_form").submit();
        }
    });

    ccode_list_get();
    bankcode_list_get();
});

function ccode_list_get(){
    $ocode = $("select[name='otms_ocode'] option:selected").val();
    $.get("ajax.base_config_list_get.php?mode=ccode&ocode="+$ocode,function(rtn){
        $("select[name='otms_ccode']").html(rtn);
    });
}

function bankcode_list_get(){
    $ocode = $("select[name='otms_ocode'] option:selected").val();
    $.get("ajax.base_config_list_get.php?mode=bankcode&ocode="+$ocode,function(rtn){
        $("select[name='otms_bankbook_code']").html(rtn);
    });
}
</script>
<?php include('./footer.php'); ?>