미채택 완료

연혁 스킨을 받아서 사용하고 있습니다.

2015-12-24 (목) 09:37:22 4,615

연혁 스킨을 받아서 사용하고 있습니다.

카테고리 분류가 필요할 듯하여 다른 분의 도움을 받아 수정을 하였는데요.

내용의 삭제가 되지 않고 있습니다.

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
?>

<!-- 게시판 목록 시작 { -->

<nav id="bo_cate">
    <h2><?php echo $board['bo_subject'] ?> 카테고리</h2>
    <ul id="bo_cate_ul">
        <?php echo $category_option ?>
    </ul>
</nav>

<div id="bo_list" style="width:<?php echo $width; ?>">

 <?
 
 if($sca) {
   $sql_search = " and ca_name = '$sca'";
 } else {
   $sql_search = "";
 }
 
 
 $sql = "select * from ".$write_table."  where wr_is_comment = '0' ".$sql_search." group by wr_subject  order by  wr_subject  desc";
 $result = sql_query($sql);
 for ($i=0; $history_y=sql_fetch_array($result); $i++) {
 ?>
  <div class="list_year">
  <?php echo $history_y[wr_subject]?>
   <?
   $sql2 = "select * from ".$write_table."  where wr_is_comment = '0' ".$sql_search."  and wr_subject = '{$history_y[wr_subject]}' order by  wr_1 desc";
   $result2 = sql_query($sql2);
   for ($i=0; $history_m=sql_fetch_array($result2); $i++) {
   ?>
   <div class="mc_con">
    <div  class="list_month"><?php echo $history_m[wr_1]?></div>
    <div class="list_content">
     <?php echo nl2br($history_m[wr_content]);?>
      <?php if ($is_admin) { ?>
      <a href="<?php echo G5_BBS_URL?>/write.php?w=u&bo_table=<?php echo $bo_table?>&wr_id=<?php echo $history_m[wr_id]?>" class="m_btn">M</a>
      <label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $history_m['wr_subject'] ?></label>
      <input type="checkbox" name="chk_wr_id[]" value="<?php echo $history_m['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
     <?php } ?>
    </div>
   </div>
   <?php } ?>
  </div>
 
 <?php } ?>
</div>

<?php if ($list_href || $is_checkbox || $write_href) { ?>
    <div class="bo_fx">
        <?php if ($is_checkbox) { ?>
        <ul class="btn_bo_adm">
            <li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"></li>
        </ul>
        <?php } ?>

        <?php if ($list_href || $write_href) { ?>
        <ul class="btn_bo_user">
            <?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li><?php } ?>
            <?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
        </ul>
        <?php } ?>
    </div>
    <?php } ?>
</form>
<?php if ($is_admin) { ?>
<script>
function all_checked(sw) {
    var f = document.fboardlist;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]")
            f.elements[i].checked = sw;
    }
}

function fboardlist_submit(f) {
    var chk_count = 0;

    for (var i=0; i<f.length; i++) {
        if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
            chk_count++;
    }

    if (!chk_count) {
        alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
        return false;
    }

    if(document.pressed == "선택복사") {
        select_copy("copy");
        return;
    }

    if(document.pressed == "선택이동") {
        select_copy("move");
        return;
    }

    if(document.pressed == "선택삭제") {
        if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
            return false;

        f.removeAttribute("target");
        f.action = "./board_list_update.php";
    }

    return true;
}

// 선택한 게시물 복사 및 이동
function select_copy(sw) {
    var f = document.fboardlist;

    if (sw == "copy")
        str = "복사";
    else
        str = "이동";

    var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");

    f.sw.value = sw;
    f.target = "move";
    f.action = "./move.php";
    f.submit();
}
</script>
<?php } ?>
<!-- } 게시판 목록 끝 -->
 

|

답변을 작성하려면 로그인이 필요합니다.