/home/mjc1/public_html/j3demo/adm/order_print_res.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
<?php
include("./_common.php");
include_once(
$j3_path."/header.sub.php");

if(
$order_key==''){ 
    if(
$_COOKIE['ok_product']!=''){
        
$_COOKIE['ok_product'] = str_replace("%20"," ",$_COOKIE['ok_product']);
        
$order_key $_COOKIE['ok_product']; 
    } else {
        
$order_key 'a.code1 desc'
    }
}

$where2 "  ";

if(
$ordstate_tab!=''){
    if(
$ordstate_tab=='9'){
        
$where2 .= " and ord_cancel = '1' ";
    } else if(
strlen($ordstate_tab)==1){
        
$where2 .= " and ordstate = '".substr($ordstate_tab,0,1)."' ";
    } else {
        
$where2 .= " and ordstate = '".substr($ordstate_tab,0,1)."' and deposit = '".substr($ordstate_tab,1,1)."' ";
    }
}

if(
$sdate!=''){
    
$where2 .= " and b.orddate >= '{$sdate}' ";
}
if(
$edate!=''){
    
$where2 .= " and b.orddate <= '{$edate}' ";
}
if(
$pay_type!=''){
    
$where2 .= " and pay_type = '{$pay_type}' ";
}

$stx urldecode($stx);
if(
$stx!=''){
    if(
$sti=='pname'){ // 상품명일때 처리
        
$pname_s $stx;
    } else {
        
$where2 .= " and {$sti} like '%{$stx}%' ";
    }
}

if (
$page 1) { $page 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$list_array customer_order_list($pname_s$where2$page999998); // 주문정보를 가져온다.

$col_cnt $list_array[0]['col_cnt'];
array_pop($list_array[0]); // col_cnt 받아오고 배열에서 날려버림

?>
<link href="<?php echo $j3_adm_url;?>/css/admin.css" rel="stylesheet" />
<style>
    .cust_modal1, 
    .cust_modal2 { border:0px solid #e1e1e1; width:700px; padding:10px; font-size:13px }
    .cust_modal1 h4, 
    .cust_modal2 h4 { position:relative; top:-5px; font-size:14px; font-weight:bold; }
    .cust_modal2 { margin-top:0px; }
    .table-top-border tbody { border-top:1px solid #e1e1e1;}
    .cust_modal1 table tbody td,
    .cust_modal2 table tbody td { text-align:left; padding-left:5px; line-height:22px; }
    .cust_modal1 table tbody td input,
    .cust_modal2 table tbody td input{ border:1px solid #e9e9e9;  }
    .input_readonly {background:#E9E9E9; }
    .width_500 { width:500px !important; }
    .width_80 { width:80px !important; }
    .width_120 { width:120px !important; }
</style>
<div style='margin:10px;color:gray;font-weight:bold;font-size:20px;'><?php echo $sdate?> 부터 <?php echo $sdate?>까지 <?php echo $od_state_tit[$ordstate_tab];?>내역</div>
<hr>
<?php
    
foreach($list_array as $key=>$oinfo){
        if(
$oinfo['midx']!=''){
?>
<div style='page-break-before:always;'>
    <div style='margin:10px;color:red;font-weight:bold;font-size:16px;'>주문번호 : <?php echo $oinfo['od_id'];?></div>

    <div class='cust_modal2'>
        <h4>주문자 배송 정보</h4>
        <table class="order-sheet table-top-border">
            <caption class="screen_out">주문자 배송 정보</caption>
            <colgroup>
                <col style="width:100px;"><col style="width:285px;">
                <col style="width:100px;"><col style="width:285px;">
            </colgroup>

            <tbody>
            <tr>
                <th>주문자명</th>
                <td colspan=1><?php echo $oinfo['s_name'];?></td>                
                <th>배송자명</th>
                <td colspan=1><?php echo $oinfo['consignee_name'];?></td>                
            </tr>
            <tr>
                <th>주문 전화번호</th>
                <td colspan=1><?php echo $oinfo['s_telno'];?></td>                
                <th>배송 전화번호</th>
                <td colspan=1><?php echo $oinfo['consignee_telno'];?></td>                
            </tr>
            <tr>
                <th>주문 핸드폰</th>
                <td colspan=1><?php echo $oinfo['s_hpno'];?></td>                
                <th>배송 핸드폰</th>
                <td colspan=1><?php echo $oinfo['consignee_hpno'];?></td>
            </tr>
            <tr>
                <th>주문 주소</th>
                <td colspan=1 >
                    우편번호 : <?php echo $oinfo['s_zipcode'];?><br>
                    <?php echo $oinfo['s_addr_m']." ".$oinfo['s_addr_d'];?>
                </td>                
                <th>배송 주소</th>
                <td colspan=1 >
                    우편번호 : <?php echo $oinfo['consignee_zipcode'];?><br>
                    <?php echo $oinfo['consignee_addr_m'];?><br>
                    <?php echo $oinfo['consignee_addr_d'];?>
                </td>                
            </tr>
            <tr>
                <th>주문 이메일</th>
                <td colspan=1><?php echo $oinfo['s_email'];?></td>                
                <th>배송 메모</th>
                <td colspan=1><?php echo $oinfo['transport_msg'];?></td>                
            </tr>
            <tr>
                <th>배송회사</th>
                <td colspan=1>
                    <?php echo $oinfo['deli_company'];?> <?php echo $configshop['deli_company'];?>
                </td>                
                <th>운송장번호</th>
                <td colspan=1>
                    <?php echo $oinfo['tracking_number'];?>
                </td>                
            </tr>
        </table>
    </div>

    <div class='cust_modal1'>
        <h4>상품정보</h4>
        <div class="cust-list-area">
            <table class="order-sheet2 table-top-border">
                <caption class="screen_out">상품정보<caption>
                <colgroup>
                <col style="width:80px;"><col style=""><col style="">
                <col style="width:90px;"><col style="width:60px;"><col style="width:100px;">
                </colgroup>

                <thead>
                    <tr>
                        <th scope="col">이미지</th><!--<th scope="col">상품코드</th>--><th scope="col">상품명</th>
                        <!--<th scope="col">옵션코드</th>--><th scope="col">옵션명</th>
                        <th scope="col">매출단가</th><th scope="col">수량</th><th scope="col">합계금액</th>
                    </tr>
                </thead>
                <tbody class='change_check_class'  style='border-top:0px; !important;'>
<?php 
    $list_array 
$oinfo['row'];
    
$sum_qty 0$sum_amt 0;
    for(
$i=0;$i<count($list_array);$i++){ 
        
$info $list_array[$i];
?>
                    <tr>
                        <td class="tcenter <?php echo $click_edit;?> padd_5px">
                            <img src='<?php echo $thumb_file get_it_thumbnail($info['sc_pcode'],$info['pic1'],50,50);?>'>
                            <input type='hidden' name='thumb_file[]' value='<?php echo $thumb_file;?>'>
                        </td>
                        <!--<td class="tcenter "><?php echo $info['sc_pcode'];?></td>-->
                        <td class="linetxt "><?php echo $info['pname'];?></td>
                        <!--<td class="tcenter "><?php if($info['opt_mode']!=''){ echo $info['opt_pcode']; }?></td>-->
                        <td class="linetxt "><?php if($info['opt_mode']!=''){ echo $info['opt_name']; }?></td>
                        <td class="cost "><?php echo number_format($info['price']); ?></td>
                        <td class="cost "><?php echo number_format($info['qty']); ?></td>
                        <td class="cost "><?php echo number_format($info['tot_amt']); ?></td>
                        
                    </tr>
<?php 
        $sum_qty
+=$info['qty'];
        
$sum_amt+=$info['tot_amt'];
    } 
?>
                </tbody>
                <tfoot>
                    <tr>
                        <td colspan=4 class="tcenter">합 계</td>
                        <td colspan=1 class="cost "><?php echo $sum_qty;?></td>
                        <td colspan=1 class="cost "><?php echo $sum_amt;?></td>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>

    <div style='margin-right:50px;color:blue;font-weight:bold;font-size:14px;text-align:right;'>결제방법 : <?php echo $oinfo['pay_type']?> / 결제금액 : <?php echo number_format($oinfo['deposit_price']);?></div>
</div>
<?php
        
}
    }
?>