nativePop.php 2.09 KB
<?php
/**
 * Created by PhpStorm.
 * User: sayho
 * Date: 2017-11-15
 * Time: 오전 11:52
 */
?>

<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
<?
    $obj = new AdminBoard($_REQUEST);
    $popText = $obj->getNativePop();
?>
    <script>
        $(document).ready(function(){
            $(".jSave").click(function(){
                var popText = $("#popText").val();
                if(confirm("저장하시겠습니까?")){
                    $.ajax({
                        url : "/action_front.php?cmd=AdminBoard.saveNativePop",
                        async : true,
                        cache : false,
                        dataType : "json",
                        data : {"popText"	: popText},
                        success : function(data) {
                            alert(data.returnMessage) ;
                            if(data.returnCode == 1){
                                location.reload();
                            }
                        }
                    });
                }
            });

        });
    </script>

    <div id="Contents"  class="notice">
        <h1>오늘의 팝업</h1>
        <h2>게시물관리 > <span>오늘의 팝업</span></h2>
        <div class="data">
            <table class="datav" style="width:100%;">
                <colgroup>
                    <col width="20%" />
                    <col width="80%" />
                </colgroup>
                <tr>
                    <th style="height:25px;">내용</th>
                    <td class="l">
                        <textarea rows="5" name="popText" style="width:95%;" id="popText"><?=$popText?></textarea>
                    </td>
                </tr>
            </table>

            <div class="btngroupcenter" style="width:100%;">
                <span class="button bigrounded blue jSave" >저장</span>
            </div>
        </div>
    </div>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/footer.php" ?>