/home/mjc1/public_html/j3demo/adm/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
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
<?php
$sub_menu 
"100100";
include(
"./_common.php");
include(
"./auth_check.php"); // 관리자 권한 체크
include($j3_adm_path."/shop_header.php");

$sql "select name,login_id from employees where login_id<>'' order by code";
$res mysql_query($sql,$connect_j3);
while(
$info=mysql_fetch_array($res)){
    
$emp_array[] = $info;
}

function 
kakao_preset_select($v$s){
    if(
$s=='0'){ $std0 "selected"; }
    if(
$s=='1'){ $std1 "selected"; }
    if(
$s=='2'){ $std2 "selected"; }
    if(
$s=='3'){ $std3 "selected"; }
    if(
$s=='4'){ $std4 "selected"; }
    if(
$s=='5'){ $std5 "selected"; }
    if(
$s=='6'){ $std6 "selected"; }
    if(
$s=='7'){ $std7 "selected"; }
    if(
$s=='8'){ $std8 "selected"; }
    if(
$s=='9'){ $std9 "selected"; }
    if(
$s=='10'){ $std10 "selected"; }
    echo 
"<select name='kakao_preset_{$v}'>";
    echo 
"<option value='0' {$std0}>[고객명]</option>";
    echo 
"<option value='1' {$std1}>[추가정보1]</option>";
    echo 
"<option value='2' {$std2}>[추가정보2]</option>";
    echo 
"<option value='3' {$std3}>[추가정보3]</option>";
    echo 
"<option value='4' {$std4}>[추가정보4]</option>";
    echo 
"<option value='5' {$std5}>[추가정보5]</option>";
    echo 
"<option value='6' {$std6}>[추가정보6]</option>";
    echo 
"<option value='7' {$std7}>[추가정보7]</option>";
    echo 
"<option value='8' {$std8}>[추가정보8]</option>";
    echo 
"<option value='9' {$std9}>[추가정보9]</option>";
    echo 
"<option value='10' {$std10}>[추가정보10]</option>";
    echo 
"</select>";
}

if(
$config['pt_index_type2_cash']==''){ $config['pt_index_type2_cash'] = 0; }
if(
$config['pt_index_type2_card']==''){ $config['pt_index_type2_card'] = 0; }
if(
$config['bbs_reg_time']==''){ $config['bbs_reg_time'] = 60; }


$sql "select max(seq) from multi_price";
$res mysql_query($sql,$connect_j3);
$multi_seq_info mysql_fetch_array($res);

$sql "select seq, pricename from multi_price_name where biztype = '1' ";
$res mysql_query($sql,$connect_j3);
$mprice_name null;
while(
$info=mysql_fetch_array($res)){
    
$mprice_name[$info['seq']] = $info['pricename'];
}
for(
$i=1;$i<=$multi_seq_info[0];$i++){
    
$info null;
    
$info['seq']    = $i;
    
$info['pricename']    = $mprice_name[$info['seq']];
    
$mprice_list[] = $info;
}

?>
<style>
.sms-txt {display:block;margin:0 0 5px 5px;}
.sms-txt textarea {padding:5px;width:197px;height:140px;font-size:13px;border-radius:7px;}
.sms_type_title { margin-left:50px; }
#send_content { font-size:17px; }
.cust_point_val { display:none; }
</style>
<input type='hidden' name='sms_max_length' value='80'>
<div id="wrap" class='container_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><a href='init.php'>경</a><a>설정</a>
            <span class="location-gt"></span>
            <a>기본환경 설정</a>
        </div>
    </div>

    <form name='config_form' method='post' action='ajax.config_process.php' enctype="multipart/form-data">

    <div class='cust_modal1'>
        <h4>기본정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">기본정보</caption>
            <colgroup>
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
            </colgroup>

            <tbody>
            <tr>
                <th>최고관리자</th>
                <td colspan=5>
                    <select name='admin'>
<?php
    
foreach($emp_array as $key=>$val){
        echo    
"        <option value='{$val['login_id']}'>{$val['login_id']}</option>";
    }
?>
                    </select>
                    &nbsp;
                    <a class='admin_pw_ch_class' style='cursor:pointer'>[암호변경]</a>
                </td>
            </tr>
            <tr>
                <th>홈페이지 제목</th>
                <td>
                    <input type='text' name='shop_title' class='' value='<?php echo $config['shop_title'];?>'>
                </td>
                <th>관리자 메일주소</th>
                <td>
                    <input type='text' name='admin_email' class='' value='<?php echo $config['admin_email'];?>'>
                </td>
                <th>관리자 메일명</th>
                <td><input type='text' name='admin_email_name' class='' value='<?php echo $config['admin_email_name'];?>' ></td>
            </tr>
            <tr>
                <th>페이지당 라인수</th>
                <td>
                    <input type='text' name='page_line' class='' value='<?php echo $config['page_line'];?>'>
                </td>
                <th>모바일시 라인수</th>
                <td >
                    <input type='text' name='page_line_mobile' class='' value='<?php echo $config['page_line_mobile'];?>'>
                </td>
                <th>회원가입시 권한</th>
                <td>
                    <select name='m_level'>
                        <option value='1' <?php if($config['m_level']=='1'){?>selected<?php }?>>1 (비회원)</option>
                        <option value='2' <?php if($config['m_level']=='2' || $config['m_level']==''){?>selected<?php }?>>2 (회원)</option>
                        <option value='3' <?php if($config['m_level']=='3'){?>selected<?php }?>>3 (회원)</option>
                        <option value='4' <?php if($config['m_level']=='4'){?>selected<?php }?>>4 (회원)</option>
                        <option value='5' <?php if($config['m_level']=='5'){?>selected<?php }?>>5 (회원)</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th>가입시 추천인 사용</th>
                <td colspan=5>
                    <input type='radio' name='recom_name_use' value='0' <?php if($config['recom_name_use']=='0' || $config['recom_name_use']==''){?>checked<?php }?>> <span class='red0'>추천인사용안함</span>
                    <input type='radio' name='recom_name_use' value='1' <?php if($config['recom_name_use']=='1'){?>checked<?php }?>> 추천인 사용함&nbsp;&nbsp;
                    <span class='help_info'>회원가입시 추천인 아이디를 입력받습니다.(직접입력방식)</span>
                </td>
            </tr>
            <tr>
                <th>사업자등록번호 중복</th>
                <td colspan=5>
                    <input type='radio' name='comp_sn_dup' value='0' <?php if($config['comp_sn_dup']=='0' || $config['comp_sn_dup']==''){?>checked<?php }?>> 중복불가
                    <input type='radio' name='comp_sn_dup' value='1' <?php if($config['comp_sn_dup']=='1'){?>checked<?php }?>> 중복가입 가능&nbsp;&nbsp;
                    <span class='help_info'>중복가입 체크하면 사업자등록번호가 동일해도 가입이 됩니다.</span>
                </td>
            </tr>
            <tr>
                <th>가입시 포인트적용법</th>
                <td colspan=5>
                    <select name='pt_index_type' class='select_bg_ch'>
                        <option value='0' <?php if($config['pt_index_type']=='0' || $config['pt_index_type']==''){?>selected<?php }?>>0 (적용안함)</option>
                        <option value='1' <?php if($config['pt_index_type']=='1'){?>selected<?php }?>>1 (거래처별)</option>
                        <option value='2' <?php if($config['pt_index_type']=='2'){?>selected<?php }?>>2 (상품별)</option>
                    </select>
                    &nbsp;
                    <span class='cus_point_val'>거래처별 기본세팅 [현금] : <input type='text' name='pt_index_type2_cash' value='<?php echo $config['pt_index_type2_cash'];?>' class='width_40'>%&nbsp; [카드] : <input type='text' name='pt_index_type2_card' value='<?php echo $config['pt_index_type2_card'];?>' class='width_40'>%</span>
                </td>
            </tr>
            <tr>
                <th>가입시 회원구분설정</th>
                <td colspan=5>
                    <input type='radio' name='join_biz_type' value='' <?php if($config['join_biz_type']==''){?>checked<?php }?>> 개인/기업 선택&nbsp;&nbsp;
                    <input type='radio' name='join_biz_type' value='0' <?php if($config['join_biz_type']=='0'){?>checked<?php }?>> 개인회원만 받기&nbsp;&nbsp;
                    <input type='radio' name='join_biz_type' value='1' <?php if($config['join_biz_type']=='1'){?>checked<?php }?>> 기업회원만 받기&nbsp;&nbsp;
                    <span class='help_info'>회원가입시 회원구분을 설정하는 옵션입니다.</span>
                </td>
            </tr>
            <tr>
                <th>가입회원 <br>다중단가 지정</th>
                <td colspan=5>
                    <select name='memreg_multi_price' class='select_bg_ch'>
                        <option value='0'>사용안함</option>
<?php
    
foreach($mprice_list as $key=>$val){
        if(
$config['memreg_multi_price']==$val['seq']){ $std "selected"; } else { $std ""; }
        if(
$val['pricename']!=''){ $name " : {$val['pricename']}"; } else { $name ""; }
        echo 
"        <option value='{$val['seq']}{$std}>{$val['seq']}{$name}</option>";
    }
?>
                    </select>
                    <br><span class='help_info'>가입한 회원에게 지정된 다중단가를 부여합니다.</span>
                </td>
            </tr>
<?php if($app_id=='ryunen' || $app_id=='csfd2019'){ ?>
            <tr>
                <th>거래처사업장 관계없이 로그인</th>
                <td colspan=5>
                    <input type='radio' name='login_free' value='0' <?php if($config['login_free']=='0' || $config['login_free']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='login_free' value='1' <?php if($config['login_free']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                    &nbsp;<span class='help_info'>사용하면 지정된 사업장 거래처가 아니어도 로그인 가능(상품 단가 매출은 지정된 사업장으로 처리됨, 로그인 거래처의 사업장으로 단가/매출 처리필요시 아래 옵션 사용)</span>
                </td>
            </tr>
            <tr>
                <th>거래처의 사업장 코드적용</th>
                <td colspan=5>
                    <input type='radio' name='customer_office' value='0' <?php if($config['customer_office']=='0' || $config['customer_office']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='customer_office' value='1' <?php if($config['customer_office']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                    &nbsp;<span class='help_info'>로그인된 거래처의 사업장으로 단가,재고와 매출이 처리됨(단 표시설정(대표자, 연락처 등등)은 현재 지정된 사업장으로 표시됨)</span>
                </td>
            </tr>
<?php ?>
        </table>
    </div>

    <div class='cust_modal2'>
        <h4>메일 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">메일 정보</caption>
            <colgroup>
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
            </colgroup>

            <tbody>
            <tr>
                <th>메일발송 사용</th>
                <td>
                    <input type='radio' name='mail_use' value='0' <?php if($config['mail_use']=='0' || $config['mail_use']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_use' value='1' <?php if($config['mail_use']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
                <th>게시판글->관리자</th>
                <td>
                    <input type='radio' name='mail_bbs_admin' value='0' <?php if($config['mail_bbs_admin']=='0' || $config['mail_bbs_admin']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_bbs_admin' value='1' <?php if($config['mail_bbs_admin']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
                <th>게시판글->작성자</th>
                <td>
                    <input type='radio' name='mail_bbs_writer' value='0' <?php if($config['mail_bbs_writer']=='0' || $config['mail_bbs_writer']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_bbs_writer' value='1' <?php if($config['mail_bbs_writer']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <th>회원가입시->관리자</th>
                <td>
                    <input type='radio' name='mail_join_admin' value='0' <?php if($config['mail_join_admin']=='0' || $config['mail_join_admin']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_join_admin' value='1' <?php if($config['mail_join_admin']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
                <th>회원가입시->회원</th>
                <td colspan=1>
                    <input type='radio' name='mail_join_mem' value='0' <?php if($config['mail_join_mem']=='0' || $config['mail_join_mem']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_join_mem' value='1' <?php if($config['mail_join_mem']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
                <th>1:1문의 답변시>회원</th>
                <td colspan=1>
                    <input type='radio' name='mail_1n1_mem' value='0' <?php if($config['mail_1n1_mem']=='0' || $config['mail_1n1_mem']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='mail_1n1_mem' value='1' <?php if($config['mail_1n1_mem']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <th>SMTP 서버 사용</th>
                <td colspan=3>
                    <select name='smtp_use' class='select_bg_ch'>
                        <option value='0' <?php if($config['smtp_use']=='0' || $config['smtp_use']==''){?>selected<?php }?>>사용안함</option>
                        <option value='1'  <?php if($config['smtp_use']=='1'){?>selected<?php }?>>사용함</option>
                    </select>
                    &nbsp;<span class='help_info'>SMTP서버 사용시 관리자 메일주소도 해당서버의 메일을 사용해야 합니다.</span>
                </td>
                <th>보내는 메일서버(smtp)</th>
                <td>
                    <select name='uc_smtp' class='width_200'>
                        <option value='smtp.naver.com' <?php if($config['uc_smtp']=='smtp.naver.com'){?>selected<?php }?>>네이버 (smtp.naver.com)</option>
                        <option value='smtp.daum.net' <?php if($config['uc_smtp']=='smtp.daum.net'){?>selected<?php }?>>다음 (smtp.daum.net)</option>
                        <option value='smtp.gmail.com' <?php if($config['uc_smtp']=='smtp.gmail.com'){?>selected<?php }?>>지메일 (smtp.gmail.com)</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th>포트번호</th>
                <td>
                    <select name='uc_port' class='width_120'>
                        <option value='465' <?php if($config['uc_port']=='465'){?>selected<?php }?>>465 (SSL)</option>
                        <option value='587' <?php if($config['uc_port']=='587'){?>selected<?php }?>>587 (TLS)</option>
                    </select>
                </td>
                <th>이메일 아이디</th>
                <td class='linetxt'>
                    <input type='text' name='uc_id' value='<?php echo $config['uc_id'];?>' class='width_200'>
                </td>
                <th >이메일 비밀번호</th>
                <td class='linetxt'>
                    <input type='password' name='uc_pw' value='<?php echo $config['uc_pw'];?>' class='width_200' style='border:1px solid #e0e0e0;height:24px;'>
                </td>
            </tr>
        </table>
    </div>

    <div class='cust_modal2'>
        <h4>SMS 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">SMS 정보</caption>
            <colgroup>
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
            </colgroup>

            <tbody>
            <tr>
                <th>SMS 사용</th>
                <td>
                    <select name='sms_use' class='width200 select_bg_ch'>
                        <option value=''  <?php if($config['sms_use']==''){ echo "selected"; }?>>사용안함</option>
                        <option value='mjsoft' <?php if($config['sms_use']=='mjsoft'){ echo "selected"; }?>>엠제이소프트</option>
                    </select>
                </td>
                <th>SMS 아이디</th>
                <td>
                    <input type='text' name='sms_id' value='<?php echo $config['sms_id'];?>'>
                </td>
                <th>SMS 비밀번호</th>
                <td>
                    <input type='password' name='sms_pw' value='<?php echo $config['sms_pw'];?>'>
                </td>
            </tr>
            <tr>
                <th>SMS 잔액</th>
                <td colspan=1><span class='sms_cnt'></span> 건.</td>
                <th>보내는 사람 번호</th>
                <td colspan=3>
                    <select name='send_hp' id='send_hp'>
                        
                    </select>
                    <span class='help_info'>발신번호 사전등록제도로 인해서 등록된 전화번호만 발송가능합니다.</span>
                </td>
            </tr>
            <tr>
                <th>주문시 -> 관리자 핸드폰</th>
                <td colspan=3>
                    <input type='text' name='rtn_hpno' value='<?php echo $config['rtn_hpno'];?>' class='telno_class'> <span class='help_info'>주문시 관리자로 통보받을 핸드폰번호.</span>
                </td>
                <th>배송안내시 SMS/알림톡</th>
                <td colspan=1>
                    <input type='radio' name='deli_sms_who' value='0' <?php if($config['deli_sms_who']=='0' || $config['deli_sms_who']==''){?>checked<?php }?>> 주문자
                    <input type='radio' name='deli_sms_who' value='1' <?php if($config['deli_sms_who']=='1'){?>checked<?php }?>> 배송자&nbsp;&nbsp;
                </td>
            </tr>
        </table>
        <table class="order-sheet ">
            <caption class="screen_out">SMS 정보</caption>
            <colgroup>
                <col style="width:192px;"><col style="width:192px;">
                <col style="width:192px;"><col style="width:192px;">
                <col style="width:192px;">
            </colgroup>

            <tbody>
            <tr>
                <th>회원가입시 -> 고객<br>
                        <select name='shop_sms_use1' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_sms_use1']=='0' || $config['shop_sms_use1']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_sms_use1']=='1'){ echo "selected"; }?>>사용</option>
                            <option value='2' <?php if($config['shop_sms_use1']=='2'){ echo "selected"; }?>>사용(LMS)</option>
                        </select>
                </th>
                <th>주문시 -> 고객<br>
                        <select name='shop_sms_use2' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_sms_use2']=='0' || $config['shop_sms_use2']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_sms_use2']=='1'){ echo "selected"; }?>>사용</option>
                            <option value='2' <?php if($config['shop_sms_use2']=='2'){ echo "selected"; }?>>사용(LMS)</option>
                        </select>        
                </th>
                <th>주문시 -> 관리자<br>
                        <select name='shop_sms_use3' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_sms_use3']=='0' || $config['shop_sms_use3']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_sms_use3']=='1'){ echo "selected"; }?>>사용</option>
                            <option value='2' <?php if($config['shop_sms_use3']=='2'){ echo "selected"; }?>>사용(LMS)</option>
                        </select>
                </th>
                <th>입금시 -> 고객<br>
                        <select name='shop_sms_use4' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_sms_use4']=='0' || $config['shop_sms_use4']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_sms_use4']=='1'){ echo "selected"; }?>>사용</option>
                            <option value='2' <?php if($config['shop_sms_use4']=='2'){ echo "selected"; }?>>사용(LMS)</option>
                        </select>
                </th>
                <th>배송시 -> 고객<br>
                        <select name='shop_sms_use5' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_sms_use5']=='0' || $config['shop_sms_use5']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_sms_use5']=='1'){ echo "selected"; }?>>사용</option>
                            <option value='2' <?php if($config['shop_sms_use5']=='2'){ echo "selected"; }?>>사용(LMS)</option>
                        </select>
                </th>
            </tr>
            <tr>
                <td>
                    <div class="txt_length"><label class='sms_type_title'>SMS</label> <span><a class='cur_txt_length' id="sms_bytes1">0</a> / <a class='max_txt_length'>80</a>byte</span></div>
                    <div class="sms-txt">
                        <textarea name='shop_sms_cont1' id='send_content1' onkeyup="byte_check('send_content1', 'sms_bytes1');"><?php echo $config['shop_sms_cont1'];?></textarea>
                    </div>
                </td>
                <td>
                    <div class="txt_length"><label class='sms_type_title'>SMS</label> <span><a class='cur_txt_length' id="sms_bytes2">0</a> / <a class='max_txt_length'>80</a>byte</span></div>
                    <div class="sms-txt">
                        <textarea name='shop_sms_cont2' id='send_content2' onkeyup="byte_check('send_content2', 'sms_bytes2');"><?php echo $config['shop_sms_cont2'];?></textarea>
                    </div>
                </td>
                <td>
                    <div class="txt_length"><label class='sms_type_title'>SMS</label> <span><a class='cur_txt_length' id="sms_bytes3">0</a> / <a class='max_txt_length'>80</a>byte</span></div>
                    <div class="sms-txt">
                        <textarea name='shop_sms_cont3' id='send_content3' onkeyup="byte_check('send_content3', 'sms_bytes3');"><?php echo $config['shop_sms_cont3'];?></textarea>
                    </div>
                </td>
                <td>
                    <div class="txt_length"><label class='sms_type_title'>SMS</label> <span><a class='cur_txt_length' id="sms_bytes4">0</a> / <a class='max_txt_length'>80</a>byte</span></div>
                    <div class="sms-txt">
                        <textarea name='shop_sms_cont4' id='send_content4' onkeyup="byte_check('send_content4', 'sms_bytes4');"><?php echo $config['shop_sms_cont4'];?></textarea>
                    </div>
                </td>
                <td>
                    <div class="txt_length"><label class='sms_type_title'>SMS</label> <span><a class='cur_txt_length' id="sms_bytes5">0</a> / <a class='max_txt_length'>80</a>byte</span></div>
                    <div class="sms-txt">
                        <textarea name='shop_sms_cont5' id='send_content5' onkeyup="byte_check('send_content5', 'sms_bytes5');"><?php echo $config['shop_sms_cont5'];?></textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan=5>
                    <strong class='blue'>[사전에 정의된 SMS프리셋]</strong><br>
                    회원가입시    : {고객명} {회원아이디}<br>
                    주문서작성 : {고객명} {받는분} {주문번호} {주문금액} <?php if($app_id=='mjflower'){ echo "{주문내용}"; }?><br>
                    입금확인시 : {고객명} {입금액} {주문번호}<br>
                    상품배송시 : {고객명} {택배회사} {운송장번호} {주문번호}

                    <?php if($app_id=='mjflower'){ echo "<br><span class='help_info'>※ {주문내용}은 화환주문시에만 처리되는 항목입니다. 일반주문에서는 적용안됩니다.</span>"; }?>
                </td>
            </tr>
        </table>
    </div>

    <div class='cust_modal2'>
        <h4>알림톡 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">알림톡 정보</caption>
            <colgroup>
                <col style="width:140px;"><col style="width:340px;">
                <col style="width:140px;"><col style="width:340px;">
                <!--<col style="width:120px;"><col style="width:200px;">-->
            </colgroup>

            <tbody>
            <tr>
                <th>알림톡 사용</th>
                <td >
                    <select name='kakako_use' class='width200 select_bg_ch'>
                        <option value=''  <?php if($config['kakako_use']==''){ echo "selected"; }?>>사용안함</option>
                        <option value='orange' <?php if($config['kakako_use']=='orange'){ echo "selected"; }?>>오렌지메시지</option>
                    </select>
                    <!--<span class='help_info'>※ 알림톡을 사용하게되면 상단의 회원가입~배송까지의 SMS정보의 사용은 중지됩니다. SMS관리의 SMS대량발송은 여전히 사용가능합니다.</span>-->
                </td>
                <th>알림톡 발신번호</th>
                <td colspan=1><input type='text' name='kakao_sender' value='<?php echo $config['kakao_sender'];?>'></td>
            </tr>
            <tr>
                <th>알림톡 API</th>
                <td colspan=3><input type='text' name='kakao_api' value='<?php echo $config['kakao_api'];?>' style='width:650px;'></td>
            </tr>
            <tr>
                <th>대체문자발송</th>
                <td colspan=1>
                    <select name='kakako_sms_send' class='width100 select_bg_ch'>
                        <option value=''  <?php if($config['kakako_sms_send']==''){ echo "selected"; }?>>사용안함</option>
                        <option value='S' <?php if($config['kakako_sms_send']=='S'){ echo "selected"; }?>>SMS발송</option>
                        <option value='L' <?php if($config['kakako_sms_send']=='L'){ echo "selected"; }?>>LMS발송</option>
                    </select>
                    <span class='help_info'>알림톡 실패시 대체문자 발송</span>
                </td>
                <th>080 무료수신거부 사용</th>
                <td colspan=1>
                    <select name='kakako_sms_080' class='width50'>
                        <option value='Y'  <?php if($config['kakako_sms_080']=='Y'){ echo "selected"; }?>>Y</option>
                        <option value='N' <?php if($config['kakako_sms_080']=='N'){ echo "selected"; }?>>N</option>
                    </select>
                    <span class='help_info'>대체문자발송시 080 무료수신거부를 사용하시는 경우에는 Y</span>
                </td>
            </tr>
            <tr>
                <th>관리자 수신번호</th>
                <td colspan=3>
                    <input type='text' name='kakao_reciever' value='<?php echo $config['kakao_reciever'];?>'>
                </td>
            </tr>
        </table>
        <table class="order-sheet ">
            <caption class="screen_out">알림톡 정보</caption>
            <colgroup>
                <col style="width:192px;"><col style="width:192px;">
                <col style="width:192px;"><col style="width:192px;">
                <col style="width:192px;">
            </colgroup>

            <tbody>
            <tr>
                <th>회원가입시 -> 고객<br>
                        <select name='shop_kakao_use1' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_kakao_use1']=='0' || $config['shop_kakao_use1']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_kakao_use1']=='1'){ echo "selected"; }?>>사용</option>
                        </select>
                </th>
                <th>주문시 -> 고객<br>
                        <select name='shop_kakao_use2' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_kakao_use2']=='0' || $config['shop_kakao_use2']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_kakao_use2']=='1'){ echo "selected"; }?>>사용</option>
                        </select>
                </th>
                <th>주문시 -> 관리자<br>
                        <select name='shop_kakao_use3' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_kakao_use3']=='0' || $config['shop_kakao_use3']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_kakao_use3']=='1'){ echo "selected"; }?>>사용</option>
                        </select>
                </th>
                <th>입금시 -> 고객<br>
                        <select name='shop_kakao_use4' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_kakao_use4']=='0' || $config['shop_kakao_use4']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_kakao_use4']=='1'){ echo "selected"; }?>>사용</option>
                        </select>
                </th>
                <th>배송시 -> 고객<br>
                        <select name='shop_kakao_use5' class='select_bg_ch'>
                            <option value='0' <?php if($config['shop_kakao_use5']=='0' || $config['shop_kakao_use5']==''){ echo "selected"; }?>>사용안함</option>
                            <option value='1' <?php if($config['shop_kakao_use5']=='1'){ echo "selected"; }?>>사용</option>
                        </select>
                </th>
            </tr>
            <tr>
                <td>템플릿번호<br><input type='text' name='kakao_tn_1' value='<?php echo $config['kakao_tn_1'];?>'></td>
                <td>템플릿번호<br><input type='text' name='kakao_tn_2' value='<?php echo $config['kakao_tn_2'];?>'></td>
                <td>템플릿번호<br><input type='text' name='kakao_tn_3' value='<?php echo $config['kakao_tn_3'];?>'></td>
                <td>템플릿번호<br><input type='text' name='kakao_tn_4' value='<?php echo $config['kakao_tn_4'];?>'></td>
                <td>템플릿번호<br><input type='text' name='kakao_tn_5' value='<?php echo $config['kakao_tn_5'];?>'></td>
            </tr>
        </table>
        <table class="order-sheet ">
            <caption class="screen_out">알림톡 정보</caption>
            <colgroup>
                <col style="width:120px;"><col style="width:120px;">
                <col style="width:120px;"><col style="width:120px;">
                <col style="width:120px;"><col style="width:120px;">
                <col style="width:120px;"><col style="width:120px;">
            </colgroup>
            <tr>
                <th colspan=8>알림톡 프리셋 정의</th>
            </tr>
            <tr>
                <td>{고객명}<br><?php echo kakao_preset_select('0'$config['kakao_preset_0']);?></td>
                <td>{회원아이디}<br><?php echo kakao_preset_select('1'$config['kakao_preset_1']);?></td>
                <td>{받는분}<br><?php echo kakao_preset_select('2'$config['kakao_preset_2']);?></td>
                <td>{주문번호}<br><?php echo kakao_preset_select('3'$config['kakao_preset_3']);?></td>
                <td>{주문금액}<br><?php echo kakao_preset_select('4'$config['kakao_preset_4']);?></td>
                <td>{입금액}<br><?php echo kakao_preset_select('5'$config['kakao_preset_5']);?></td>
                <td>{택배회사}<br><?php echo kakao_preset_select('6'$config['kakao_preset_6']);?></td>
                <td>{운송장번호}<br><?php echo kakao_preset_select('7'$config['kakao_preset_7']);?></td>
            </tr>
        </table>
        <span class='help_info'>1. 알림톡 템플릿을 만드실때 맞는 프리셋을 정의하시기 바랍니다. 특별한경우 아닌이상 고객명은 [고객명] 나머지 회원아이디~운송장번호까지 1~7번 맞춰주시고 템플릿에 추가정보1~7까지 맞춰 생성해주세요.</span><br>
        <span class='help_info'>2. 주문,주문(관리자),입금일경우 주문확인 버튼을 처리하실수 있습니다. 아래링크를 링크URL에 등록하시면 됩니다. (임시도메인일 경우 사용하지 마세요.)</span><br>
        <span class='help_info'> - 모바일 : <?php echo $j3_shopm_url;?>/orderview.php?enckey=#{}</span><br>
        <span class='help_info'> - PC : <?php echo $j3_shopp_url;?>/orderview.php?enckey=#{}</span>
    </div>

    <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 btn_customer_save" id=''>저장</a>
                <a class="gray-btn btn_cancel_save" id=''>취소</a>
            </div>
        </div>
    </div>

    <div class='cust_modal2'>
        <h4>추가 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">추가 정보</caption>
            <colgroup>
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
                <col style="width:120px;"><col style="width:200px;">
            </colgroup>

            <tbody>
            <tr>
                <th>회원가입 약관</th>
                <td colspan=5>
                    <textarea name='join_agree' class='meta_ta'><?php echo $config['join_agree'];?></textarea>
                </td>
            </tr>
            <tr>
                <th>개인정보처리방침</th>
                <td colspan=5>
                    <textarea name='personal_info' class='meta_ta'><?php echo $config['personal_info'];?></textarea>
                </td>
            </tr>
            <tr>
                <th>추가 메타태그</th>
                <td colspan=5>
                    <textarea name='add_meta' class='meta_ta'><?php echo $config['add_meta'];?></textarea>
                </td>
            </tr>
            <tr>
                <th>방문자분석 스크립트</th>
                <td colspan=5>
                    <textarea name='add_log_script' class='meta_ta'><?php echo $config['add_log_script'];?></textarea>
                </td>
            </tr>
            <tr>
                <th>추가 script, css</th>
                <td colspan=5>
                    <textarea name='add_head' class='meta_ta'><?php echo $config['add_head'];?></textarea>
                </td>
            </tr>
            <tr>
                <th>파비콘 등록</th>
                <td colspan=5>
                    <input type='file' name='favicon' >
                    <?php if(file_exists("{$j3_data_path}/ico/favicon")){?>
                        <img src='<?php echo "{$j3_data_url}/ico/favicon";?>' style='max-width:600px;'>
                        <input type='checkbox' name='favicon_del' value='Y'> 삭제
                    <?php }?>
                    <br><span class='help_info'><a href='https://www.favicon.cc' target='_blank'>https://www.favicon.cc</a>에 가서 파비콘 만들어서 등록하심됩니다.</span>
                </td>
            </tr>
        </table>
    </div>

    <div class='cust_modal2'>
        <h4>SSL(보안서버) 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">SSL(보안서버) 정보</caption>
            <colgroup>
                <col style="width:110px;"><col style="width:890px;">
            </colgroup>

            <tbody>
            <!--<tr>
                <th>보안서버 사용시 <br>도메인</th>
                <td >
                    <input type='text' name='ssl_domain' value='<?php echo $config['ssl_domain'];?>' class='width_300'> ex) www.domain.com 형식으로 입력...http같은거 붙히면 안됨
                </td>
            </tr>-->
            <tr>
                <th>보안서버 사용시 URL</th>
                <td >
                    <input type='text' name='ssl_domain' value='<?php echo $config['ssl_domain'];?>' class='width_500'> ex) https://www.domain.com:443 형식으로 입력 https://와 :포트번호 꼭 붙힐것
                </td>
            </tr>
        </table>
    </div>
<?php if($app_id=='ryunen'){ ?>
    <div class='cust_modal2'>
        <h4>소셜 로그인 관련</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">소셜로그인 정보</caption>
            <colgroup>
                <col style="width:140px;"><col style="width:340px;">
                <col style="width:140px;"><col style="width:340px;">
            </colgroup>

            <tbody>
            <tr>
                <th>네이버 로그인사용</th>
                <td colspan=5>
                    <input type='radio' name='naver_login_use' value='0' <?php if($config['naver_login_use']=='0' || $config['naver_login_use']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='naver_login_use' value='1' <?php if($config['naver_login_use']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <th>네이버 Client ID</th>
                <td >
                    <input type='text' name='naver_client_id' value='<?php echo $config['naver_client_id'];?>' class='width_300'>
                </td>
                <th>네이버 Client Secret</th>
                <td >
                    <input type='text' name='naver_client_secret' value='<?php echo $config['naver_client_secret'];?>' class='width_300'>
                </td>
            </tr>
            <tr>
                <th>네이버 Callback URL<br>(PC웹)</th>
                <td>
                    <input type='text' name='naver_callback_url' value='<?php echo $config['naver_callback_url'];?>' class='width_400'>
                </td>
                <th>네이버 Callback URL<br>(Mobile웹)</th>
                <td>
                    <input type='text' name='naver_callback_url_m' value='<?php echo $config['naver_callback_url_m'];?>' class='width_400'>
                </td>
            </tr>
            <tr>
                <th>카카오 로그인사용</th>
                <td colspan=5>
                    <input type='radio' name='kakao_login_use' value='0' <?php if($config['kakao_login_use']=='0' || $config['kakao_login_use']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='kakao_login_use' value='1' <?php if($config['kakao_login_use']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <th>카카오 JavaScript 키</th>
                <td >
                    <input type='text' name='kakao_js_key' value='<?php echo $config['kakao_js_key'];?>' class='width_300'>
                </td>
                <th>카카오 REST API 키</th>
                <td >
                    <input type='text' name='kakao_rest_key' value='<?php echo $config['kakao_rest_key'];?>' class='width_300'>
                </td>
            </tr>
            <tr>
                <th>카카오 Callback URL</th>
                <td >
                    <input type='text' name='kakao_callback_url' value='<?php echo $config['kakao_callback_url'];?>' class='width_400'>
                </td>
                <th></th>
                <td >

                </td>
            </tr>
            <tr>
                <th>페이스북 로그인사용</th>
                <td colspan=5>
                    <input type='radio' name='face_login_use' value='0' <?php if($config['face_login_use']=='0' || $config['face_login_use']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='face_login_use' value='1' <?php if($config['face_login_use']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <th>페이스북 APP ID</th>
                <td >
                    <input type='text' name='face_app_id' value='<?php echo $config['face_app_id'];?>' class='width_300'>
                </td>
                <th>페이스북 APP SECRET</th>
                <td >
                    <input type='text' name='face_app_secret' value='<?php echo $config['face_app_secret'];?>' class='width_300'>
                </td>
            </tr>
            <tr>
                <th>페이스북 Callback URL</th>
                <td colspan=3>
                    <input type='text' name='face_callback_url' value='<?php echo $config['face_callback_url'];?>' class='width_400'>
                    <br><span class='help_info'>페이스북 로그인은 정책상 무조건 https://(보안서버 SSL)을 적용해야만 가능합니다. callback url은 https://로 시작하는 url을 사용하셔야 합니다.</span>
                </td>
            </tr>
        </table>
    </div>
<?php ?>
    <div class='cust_modal2'>
        <h4>기타 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">기타 정보</caption>
            <colgroup>
                <col style="width:110px;"><col style="width:890px;">
            </colgroup>

            <tbody>
            <tr>
                <th>쇼핑몰db버젼</th>
                <td >
                    <?php echo $config['shop_db_ver']?>
                </td>
            </tr>
            <tr>
                <th>체크박스<br>(드래그 체크)</th>
                <td >
                    <input type='radio' name='checkbox_drag' value='0' <?php if($config['checkbox_drag']=='0'){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='checkbox_drag' value='1' <?php if($config['checkbox_drag']=='1' || $config['checkbox_drag']==''){?>checked<?php }?>> 사용&nbsp;&nbsp;
                    &nbsp;<span class='help_info'>관리자에서 여러개의 체크박스를 드래그를 이용해서 체크하고 해제할수 있는 기능을 사용/사용안함 처리</span>
                </td>
            </tr>
            <tr>
                <th>www 명시적 변경</th>
                <td >
                    <select name='domain_www'>
                        <option value='' <?php if($config['domain_www']==''){ echo "selected"; }?>>변경없음</option>
                        <option value='www1' <?php if($config['domain_www']=='www1'){ echo "selected"; }?>>www.사용</option>
                        <option value='www0' <?php if($config['domain_www']=='www0'){ echo "selected"; }?>>www.제거</option>
                    </select>
                    <br><span class='help_info'>외부접속시 고정적으로 도메인에 www.를 붙히거나 제거하는 설정을 합니다. 알림톡 링크나 이나 SSL처리같은 문제시 해당설정을 사용하시면 됩니다. 변경없음은 www붙히거나 제거 처리하지 않습니다.</span>
                </td>
            </tr>
            <tr>
                <th>게시판 글쓰기 간격</th>
                <td >
                    <input type='text' name='bbs_reg_time' value='<?php echo $config['bbs_reg_time'];?>'> 초
                    <br><span class='help_info'>한사람이 게시판이나 댓글의 글쓰기를 중복적으로 올리지 못하게 막는 기능입니다. 해당 초마다 한번식 게시글이나 댓글을 작성할수 있습니다.</span>
                </td>
            </tr>
            <tr>
                <th>모바일 도메인 사용</th>
                <td >
                    <input type='text' name='mobile_domain' value='<?php echo $config['mobile_domain'];?>'> 
                    <br><span class='help_info'>모바일시 사용하길 원하는 도메인을 입력하세요. http://는 제외하고 입력하세요. </span>
                    <br><span class='help_info'>모바일에서 접속시 입력한 <?php echo $config['mobile_domain'];?> 도메인으로 리다이렉션 됩니다. PC에서 <?php echo $config['mobile_domain'];?>으로 접속시 바로 모바일페이지로 접속 됩니다. </span>
                </td>
            </tr>
<?php if($app_id=='ryunen' || $app_id=='europe0515'  || $app_id=='lulucosmetic'){ ?>
            <tr>
                <th>인트로 화면 사용</th>
                <td >
                    <input type='radio' name='intro_use' value='0' <?php if($config['intro_use']=='0' || $config['intro_use']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='intro_use' value='1' <?php if($config['intro_use']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                    &nbsp;<span class='help_info'>인트로화면을 사용할지 결정할수 있습니다. 회원가입 및 로그인을 해야만 쇼핑몰 페이지를 확인가능합니다.</span>
                </td>
            </tr>
            <tr>
                <th>팝업표시 위치 선택</th>
                <td >
                    <input type='radio' name='popup_position' value='0' <?php if($config['popup_position']=='0' || $config['popup_position']==''){?>checked<?php }?>> 메인페이지만 표시
                    <input type='radio' name='popup_position' value='1' <?php if($config['popup_position']=='1'){?>checked<?php }?>> 인트로페이지만 표시
                    <input type='radio' name='popup_position' value='2' <?php if($config['popup_position']=='2'){?>checked<?php }?>> 메인+인트로 둘다 표시
                    &nbsp;<span class='help_info'>팝업을 표시할 위치를 지정합니다.</span>
                </td>
            </tr>
<?php ?>
<?php 
if($app_id=='ryunen' || $app_id=='wittenglish'){ ?>
            <tr>
                <th>xmllnb용 xml등록</th>
                <td >
                    <a name='xmllnb'></a>
                    <input type='file' name='xmllnb' >
                    <?php if(file_exists("{$j3_data_path}/ico/xmllnb")){?>
                        <a href='<?php echo $j3_adm_url;?>/simp_download.php?file=ico/xmllnb&original=lnb.txt'>lnb.txt</a>
                        <input type='checkbox' name='xmllnb_del' value='Y'> 삭제
                    <?php }?>
                    <br><span class='help_info'>해당부분은 상당모듈중 xmllnb스킨모듈을 사용할경우만 동작합니다.</span>
                    <br><span class='help_info'>수정시 위의 lnb.txt파일을 다운로드받아서 노트패드로 수정해서 업로드 하세요 xml형태의 구성이어야 합니다.</span>
                </td>
            </tr>
<?php ?>
<?php 
if($app_id=='ryunen'){ ?>
            <tr>
                <th>회원 판매기능 추가</th>
                <td >
                    <input type='radio' name='cust_sell' value='0' <?php if($config['cust_sell']=='0' || $config['cust_sell']==''){?>checked<?php }?>> <span class='red0'>사용안함</span>
                    <input type='radio' name='cust_sell' value='1' <?php if($config['cust_sell']=='1'){?>checked<?php }?>> 사용&nbsp;&nbsp;
                    &nbsp;<span class='help_info'>판매자가 판매를 사용가능하게 기능추가</span>
                </td>
            </tr>
<?php }?>
        </table>
    </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 btn_customer_save" id=''>저장</a>
                <a class="gray-btn btn_cancel_save" id=''>취소</a>
            </div>
        </div>
    </div>
</div> <!-- wrap end-->
<script>
function form_save(){ // 상품 저장/수정
    var form_obj = $("form[name='config_form']");

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

function sms_cnt(){
    $.post("ajax.sms_pt.php",function(rtn){
        $(".sms_cnt").html(rtn);
    });
}

function byte_check(wr_message, sms_bytes)
{
    var conts = document.getElementById(wr_message);
    var bytes = document.getElementById(sms_bytes);

    $idx =sms_bytes.substr(9,1);
    $opt_val = $("select[name='shop_sms_use"+$idx+"'] option:selected").val();
    $td_obj = $("#send_content"+$idx).closest("td");
    if($opt_val=='2'){
        $("input[name='sms_max_length']").val('2000');
        $td_obj.closest("td").find(".max_txt_length").text("2000");
    } else {
        $("input[name='sms_max_length']").val('80');
        $td_obj.closest("td").find(".max_txt_length").text("80");
    }
    
    var i = 0;
    var cnt = 0;
    var exceed = 0;
    var ch = '';

    for (i=0; i<conts.value.length; i++)
    {
        ch = conts.value.charAt(i);
        if (escape(ch).length > 4) {
            cnt += 2;
        } else {
            cnt += 1;
        }
    }

    bytes.innerHTML = cnt;

    
    max_byte = $("input[name='sms_max_length']").val();

    if (cnt > max_byte)
    {
        exceed = cnt - max_byte;
        alert('메시지 내용은 '+max_byte+'바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
        var tcnt = 0;
        var xcnt = 0;
        var tmp = conts.value;
        for (i=0; i<tmp.length; i++)
        {
            ch = tmp.charAt(i);
            if (escape(ch).length > 4) {
                tcnt += 2;
            } else {
                tcnt += 1;
            }

            if (tcnt > max_byte) {
                tmp = tmp.substring(0,i);
                break;
            } else {
                xcnt = tcnt;
            }
        }
        conts.value = tmp;
        bytes.innerHTML = xcnt;
        return;
    }
}

function send_hp_init(){ // 보내는사람 받아오기
    $.ajax({type:"post", url:"ajax.sms_sender.php",  async:false, 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_telno = $(xml).find("telno");

            if(v_mode_ok=='Y'){
                for(i=0;i<v_telno.length;i++){
                    $("#send_hp").append("<option value='"+v_telno.eq(i).text()+"'>"+v_telno.eq(i).text()+"</option>");                    
                }
            } else {
                //alert(v_msg);
            }
        },
        error:function(rtn,status,error){    alert(error);        }
    });
}

$(function(){

    $(".admin_pw_ch_class").click(function(){
        $("#modal_member_box6").dialog({
                resizable: true, height:280, width:530, modal: true, title:"암호변경",
        });    
    });

    $(".btn_pwd_save").click(function(){
        if($("#pwd_ch_form").find("input[name='old_pwd']").val()==''){
            alert("기존비밀번호를 입력하세요."); return;
        }
        if($("#pwd_ch_form").find("input[name='new_pwd']").val()==''){
            alert("새로운 비밀번호를 입력하세요."); return;
        }
        if($("#pwd_ch_form").find("input[name='new_pwd2']").val()==''){
            alert("새로운 비번확인을 입력하세요."); return;
        }
        if($("#pwd_ch_form").find("input[name='new_pwd']").val()!=$("#pwd_ch_form").find("input[name='new_pwd2']").val()){
            alert("새로운 비번확인이 일치하지 않습니다."); return;
        }

        $admin_id = $("select[name='admin'] option:selected").val();
        $("#pwd_ch_form").find("input[name='admin_id']").val($admin_id);

        if(confirm('정말로 최고관리자 암호를 변경하시겠습니까?')){
            form_data = $("#pwd_ch_form").serialize();
            $.post("ajax.admin_pwd_ch_process.php",form_data,function(rtn){
                if(rtn=='OK'){
                    alert('암호변경이 완료되었습니다.');
                    $("#modal_member_box6").dialog("close");
                    $("#pwd_ch_form").find("input[name='old_pwd']").val('');
                    $("#pwd_ch_form").find("input[name='new_pwd']").val('');
                    $("#pwd_ch_form").find("input[name='new_pwd2']").val('');
                } else {
                    alert(rtn);
                }
            });
        }
    });
    $(".btn_cancel_pwd").click(function(){
        $("#modal_member_box6").dialog("close");
    });

    $(document).on("click","input[name='code_auto']",function(){ // 코드자동 선택시
        if($(this).is(":checked")){
            $("input[name='code1']").addClass("input_readonly").attr("readonly",true).val("");

        } else {
            $("input[name='code1']").removeClass("input_readonly").attr("readonly",false);
        }    
    });

    $(".btn_customer_save").click(function(){
        form_save();
    });

    $(".btn_cancel_save").click(function(){ // 취소 버튼
        document.location.href='<?php echo $j3_adm_url;?>';    
    });

    $("select[name='pt_index_type']").change(function(){
        if($(this).val()=='1'){ 
            $(".cus_point_val").show();
        } else {     
            $(".cus_point_val").hide();     
        }
    });
    if('<?php echo $config['pt_index_type'];?>'=='1'){ $(".cus_point_val").show(); }

    sms_cnt();
    send_hp_init();
})

</script>
<?php
    
//_pr($_COOKIE['qstr']);
    
include($j3_adm_path."/shop_footer.php");
?>
<div id="modal_member_box6" title="변경용" style="display:none;width:100%; height:100%; padding-top:3px;padding-left:3px;background-color:#FFFFFF;position:relative;">
    <div class='cust_modal3 p10_20' style='width:500px !important;'><!-- style='width:100% !important;' -->
        <h4 class="mb10">관리자암호변경</h4>
<form name='pwd_ch_form' id='pwd_ch_form' method='post' action='ajax.admin_pwd_ch_process.php'>
    <input type='hidden' name='c_mode' value='pwd_ch'>
    <input type='hidden' name='admin_id' value=''>
        <table class="order-sheet table-top-border">
            <tfoot class='dcomm_reg_tfoot'>
            <tr>
                <td>
                    <label class="l_height30 ">기존 비밀번호 : </label><input type='password' name='old_pwd' class='mr10 box150_25 gray_line board_passwd_class'>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="l_height30 ">새로운 비밀번호 : </label><input type='password' name='new_pwd' class='mr10 box150_25 gray_line board_passwd_class'>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="l_height30 bold">새로운 비번확인 : </label><input type='password' name='new_pwd2' class='mr10 box150_25 gray_line board_passwd_class'>
                </td>
            </tr>
            </tfoot>
        </table>
</form>
    </div>
    <div id="sub-contents-area" style='padding-left:150px;padding-top:20px;'>
        <div class="sub-btn-area">
            <div class="sub-btn">
                <a class="lignt-blue-btn btn_pwd_save" id=''>저장</a>
                <a class="gray-btn btn_cancel_pwd" id=''>취소</a>
            </div>
        </div>
    </div>
</div>
<?php
//_pr($_SESSION);
?>