예제 #1
0
            alert($alert_msg, './item.php?it_id=' . $it_id . '&ca_id=' . $ca_id . '#itemuse');
        } else {
            if ($move == "3") {
                //내용으로
                alert($alert_msg, './itemuseview.php?is_id=' . $is_id . '&ca_id=' . $ca_id . '&page=' . $page);
            } else {
                //목록으로
                alert($alert_msg, './itemuselist.php?page=' . $page);
            }
        }
    } else {
        if ($move == "1") {
            //아이템으로
            goto_url('./item.php?it_id=' . $it_id . '&ca_id=' . $ca_id . '#itemqa');
        } else {
            if ($move == "3") {
                //내용으로
                goto_url('./itemuseview.php?is_id=' . $is_id . '&ca_id=' . $ca_id . '&page=' . $page);
            } else {
                //목록으로
                goto_url('./itemuselist.php?page=' . $page);
            }
        }
    }
} else {
    if ($w == 'd') {
        apms_alert($alert_msg);
    } else {
        apms_opener('itemuse', $alert_msg, './itemuse.php?it_id=' . $it_id . '&ca_id=' . $ca_id . '&irows=' . $irows . '&page=' . $page);
    }
}
예제 #2
0
                $is_owner = false;
                if ($write['wr_reply'] && $member['mb_id']) {
                    $sql = " select mb_id from {$write_table}\n\t\t\t\t\t\t\t\twhere wr_num = '{$write['wr_num']}'\n\t\t\t\t\t\t\t\tand wr_reply = ''\n\t\t\t\t\t\t\t\tand wr_is_comment = 0 ";
                    $row = sql_fetch($sql);
                    if ($row['mb_id'] == $member['mb_id']) {
                        $is_owner = true;
                    }
                }
                $ss_name = 'ss_secret_' . $bo_table . '_' . $write['wr_num'];
                if (!$is_owner) {
                    //$ss_name = "ss_secret_{$bo_table}_{$wr_id}";
                    // 한번 읽은 게시물의 번호는 세션에 저장되어 있고 같은 게시물을 읽을 경우는 다시 비밀번호를 묻지 않습니다.
                    // 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
                    //if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
                    if (!get_session($ss_name)) {
                        apms_alert('1|비밀글은 본인과 관리자만 볼 수 있습니다.');
                    }
                }
            }
        }
    }
    // 보드설정
    $boset = array();
    $boset = apms_boset();
}
// 신고
$is_shingo = $board['as_shingo'] > 0 ? true : false;
include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
$captcha_html = "";
if ($is_guest && $board['bo_comment_level'] < 2) {
    $captcha_html = captcha_html('_comment');
예제 #3
0
}
$comment_reply = substr($write['wr_comment_reply'], 0, $len);
$sql = " select count(*) as cnt from {$write_table}\n            where wr_comment_reply like '{$comment_reply}%'\n            and wr_id <> '{$comment_id}'\n            and wr_parent = '{$write[wr_parent]}'\n            and wr_comment = '{$write[wr_comment]}'\n            and wr_is_comment = 1 ";
$row = sql_fetch($sql);
if ($row['cnt'] && !$is_admin) {
    apms_alert('1|이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.');
}
// 코멘트 포인트 삭제
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '댓글')) {
    insert_point($write['mb_id'], $board['bo_comment_point'] * -1, "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 댓글삭제");
}
// 코멘트 삭제
sql_query(" delete from {$write_table} where wr_id = '{$comment_id}' ");
// 코멘트가 삭제되므로 해당 게시물에 대한 최근 시간을 다시 얻는다.
$sql = " select max(wr_datetime) as wr_last from {$write_table} where wr_parent = '{$write['wr_parent']}' ";
$row = sql_fetch($sql);
// 원글의 코멘트 숫자를 감소
sql_query(" update {$write_table} set wr_comment = wr_comment - 1, wr_last = '{$row['wr_last']}' where wr_id = '{$write['wr_parent']}' ");
// 코멘트 숫자 감소
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment - 1 where bo_table = '{$bo_table}' ");
// 새글 삭제
sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' ");
// 신고글
sql_query(" delete from {$g5['apms_shingo']} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' ", false);
// 사용자 코드 실행
@(include_once $board_skin_path . '/delete_comment.skin.php');
@(include_once $board_skin_path . '/delete_comment.tail.skin.php');
delete_cache_latest($bo_table);
//goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$write['wr_parent'].'&amp;page='.$page. $qstr);
apms_alert('');
예제 #4
0
                    if ($member['mb_id']) {
                        if ($member['mb_id'] != $comment['mb_id']) {
                            apms_alert('1|자신의 글이 아니므로 수정할 수 없습니다.');
                        }
                    } else {
                        if ($comment['wr_password'] != $wr_password) {
                            apms_alert('1|댓글을 수정할 권한이 없습니다.');
                        }
                    }
                }
            }
        }
        $sql = " select count(*) as cnt from {$write_table}\n                where wr_comment_reply like '{$comment_reply}%'\n                and wr_id <> '{$comment_id}'\n                and wr_parent = '{$wr_id}'\n                and wr_comment = '{$tmp_comment}'\n                and wr_is_comment = 1 ";
        $row = sql_fetch($sql);
        if ($row['cnt'] && !$is_admin) {
            apms_alert('1|이 댓글와 관련된 답변댓글이 존재하므로 수정 할 수 없습니다.');
        }
        $sql_ip = "";
        if (!$is_admin) {
            $sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
        }
        $sql_secret = "";
        if ($wr_secret) {
            $sql_secret = " , wr_option = '{$wr_secret}' ";
        }
        $sql = " update {$write_table}\n                set wr_subject = '{$wr_subject}',\n                     wr_content = '{$wr_content}',\n\t\t\t\t\t as_icon = '{$as_icon}',\n                     wr_1 = '{$wr_1}',\n                     wr_2 = '{$wr_2}',\n                     wr_3 = '{$wr_3}',\n                     wr_4 = '{$wr_4}',\n                     wr_6 = '{$wr_6}',\n                     wr_7 = '{$wr_7}',\n                     wr_8 = '{$wr_8}',\n                     wr_9 = '{$wr_9}',\n                     wr_10 = '{$wr_10}',\n                     wr_option = '{$wr_option}'\n                     {$sql_ip}\n                     {$sql_secret}\n              where wr_id = '{$comment_id}' ";
        sql_query($sql);
    }
}
// 자동 글추천/비추천 기능
if ($board['as_good'] && isset($wr_good)) {
예제 #5
0
        if ($is_admin == 'super') {
            // 최고관리자 통과
        } else {
            if ($member['mb_id']) {
                if ($member['mb_id'] != $comment['mb_id']) {
                    apms_alert('1|자신의 댓글이 아니므로 수정할 수 없습니다.');
                }
            } else {
                if ($comment['wr_password'] != $wr_password) {
                    apms_alert('1|댓글을 수정할 권한이 없습니다.');
                }
            }
        }
        $sql = " select count(*) as cnt from {$comment_table}\n                where wr_comment_reply like '{$comment_reply}%'\n                and wr_id <> '{$comment_id}'\n                and wr_comment = '{$tmp_comment}' ";
        $row = sql_fetch($sql);
        if ($row['cnt'] && !$is_admin) {
            apms_alert('1|이 댓글와 관련된 대댓글이 존재하므로 수정할 수 없습니다.');
        }
        $sql_ip = "";
        if (!$is_admin) {
            $sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
        }
        $sql_secret = "";
        if ($wr_secret) {
            $sql_secret = " , wr_option = '{$wr_secret}' ";
        }
        $sql = " update {$comment_table}\n                set wr_subject = '{$wr_subject}',\n                     wr_content = '{$wr_content}',\n                     wr_1 = '{$wr_1}',\n                     wr_2 = '{$wr_2}',\n                     wr_3 = '{$wr_3}',\n                     wr_4 = '{$wr_4}',\n                     wr_option = '{$wr_option}'\n                     {$sql_ip}\n                     {$sql_secret}\n              where wr_id = '{$comment_id}' ";
        sql_query($sql);
        apms_alert('0|댓글을 수정 하였습니다.');
    }
}