/home/mjc1/public_html/j3demo/shopm/item_qa_view.inc.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
<?php
include_once("./_common.php");
if(
$idx!=''){
    
$sql "select a.*, b.name from shop_prod_qa a left join product_m b on a.pcode = b.code where idx = '{$idx}' ";
    
$cinfo sql_fetch($sql,$connect_j3);

    if(
$cinfo['iq_secret']=='1'){
        if(
$cinfo['ccode']=='0'){ // 비회원일경우
            
if($_SESSION['iq_'.$idx]!='Y'){
                echo 
"password"; exit;
            }
        } else if(
$cinfo['ccode']!=$id_ccode){ // 권한이 없을 경우
            
echo "secret"; exit;
        }
    }
}

if(
$cinfo['iq_answer']==''){ $r_mode "wait"; } else { $r_mode "comp"; }

?>

<form name='prod_qa_reg_form' id='stock_reg_form' method='post' action=''>
<input type='hidden' name='qstr' value=''>
<input type='hidden' name='code' value='<?php echo $cinfo['idx'];?>'>
<input type='hidden' name='ccode' value='<?php echo $cinfo['ccode'];?>'>

<div class="width_full">
    <h1 class="screen_out">상품문의</h1>
    <table class="width_full txt13 black_line_t">
        <caption class="mt15 mb5 l_height24 txt15 align_l bold">상품문의 확인</caption>
        <colgroup>
            <col class="width_quarter"><col class="width_quarter"><col class="width_half">
        </colgroup>
        <thead>
        <tr>
            <th colspan="3" class="p3 align_c bold gray_line_b bg_gray">문의/답변</th>
        </tr>
        <tr>
            <td colspan="2" class="p3 gray2 align_c bold gray_line_b bg_gray">작성자</td>
            <td class="p3 gray2 align_c bold gray_line_b bg_gray">작성일</td>
        </tr>
        </thead>

        <tbody>
        <tr>
            <th class="txt13 bold l_height30 gray_line_b2">
<?php if($r_mode=='comp'){?>
<span class="p3 mr5 white txt13 bold bg_custom2">답변완료</span>
<?php } else {?>
<span class="p3 mr5 white txt13 bold bg_custom3">답변대기</span>
<?php }?>
            </th>
            <th colspan="2" class="txt13 bold align_l space_1 gray_line_b2"><?php echo $cinfo['iq_subject'];?></th>
        </tr>
        <tr>

            <td colspan="2" class="pl10 gray2 l_height24 gray_line_b">
                <?php echo cut_hangul_last(substr($cinfo['iq_name'],0,3))."**";?>
            </td>
            <td class="pr10 gray2 l_height24 gray_line_b">
                <?php echo $cinfo['iq_time'];?>
            </td>
        </tr>
        </tbody>

        <tfoot>
        <tr>
            <td colspan="3" class="p5 gray_line_b bg_gray">
                <span class="float_l mr5 box17 white align_c circle bg_custom1">Q</span>
                <?php echo $cinfo['iq_question'];?>
            </td>
        </tr>
<?php if($r_mode=='comp'){?>
        <tr>
            <td colspan="3" class="p5 gray_line_b bg_gray">
                <span class="float_l mr5 box17 white align_c circle bg_custom3">A</span>
                <?php echo $cinfo['iq_answer'];?>
            </td>
        </tr>
<?php }?>
        </tfoot>
    </table>
</div>
</form>