삼

곰순이푸님 도움을 청해 봅니다!

며칠전에 질문 드렸었는데요.
적용해보니 잘 안되어서 다시 질문드립니다.
번거롭게 해 드려서 정말 죄송합니다.
한번만 더 시간을 내어 주시면 정말 감사하겠습니다.

며칠전 질문 주소는 아래입니다.
http://sir.co.kr/bbs/tb.php/g4_qa/122077/2ab5c5facaa989b0b24e15bfb0a093fa

댓글 3개

if ($bo_table !== 'banner' || $bo_table !== 'banner1' || $bo_table !== 'banner2' || $bo_table !== 'banner3' || $bo_table !== 'banner4'|| $bo_table !== 'banner5')
{
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");


}

내용에서

$bo_table !== 'banner' || $bo_table !== 'banner1' || $bo_table !== 'banner2' || $bo_table !== 'banner3' || $bo_table !== 'banner4'|| $bo_table !== 'banner5')
이부분에 오류가 있을수도 있겠네요.

만약에 배너 게시판말고 다른게시판에 banner 라는 테이블명이 없다는 전제하에.

$banner = substr($bo_table, 0, 6);

if ($baner == 'banner')
{
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");


}
다른 방법으로는 switch 를 이용해서

switch ($bo_table) {
case "banner" :
$banner = "1";
case "banner1" :
$banner = "1";
case "banner2" :
$banner = "1";
case "banner3" :
$banner = "1";
case "banner4" :
$banner = "1";
case "banner5" :
$banner = "1";
default :
$banner = "0";
break;

if ($baner == '0')
{
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");


}
푸님~
그래도 안됩니다.
뭐가 문제인지
delete.php 에 아래와 같이 했습니다.

// 원글이라면
if (!$row[wr_is_comment])
{
// 원글 포인트 삭제
switch ($bo_table) {
case "banner" :
$banner = "1";
case "banner1" :
$banner = "1";
case "banner2" :
$banner = "1";
case "banner3" :
$banner = "1";
case "banner4" :
$banner = "1";
case "banner5" :
$banner = "1";
default :
$banner = "0";
break;

if ($banner == '0')
{
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");


}
// 업로드된 파일이 있다면
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
// 파일삭제
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
@unlink("$g4[path]/data/file/$bo_table/main_h2/$write[wr_id]"); //최근게시물 썸네일 삭제
@unlink("$g4[path]/data/file/$bo_table/main_h3/$write[wr_id]"); //최근게시물 썸네일 삭제



// 파일테이블 행 삭제
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ");

$count_write++;
}


} else


{
// 코멘트 포인트 삭제
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '코멘트'))
insert_point($row[mb_id], $board[bo_comment_point] * (-1), "$board[bo_subject] {$write[wr_id]}-{$row[wr_id]} 코멘트삭제");

$count_comment++;
}
}

그리고 괄호 에러가 자꾸 생겨서 else 앞에 }를 하나 더 붙여보고, 지우고도 해보고 했습니다.
둘다 안되더라고요.

그리고 delete_all.php도 같이 처리 해줘봤고요.
그래도 안됩니다.

그래도 친절하게 답변 주셔서 너무 감사합니다.
좋은 하루 되시길 바랍니다.^^
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
09-03-06 조회 1,341
09-03-06 조회 898
09-03-06 조회 1,446
09-03-06 조회 994
09-03-06 조회 1,790
09-03-06 조회 1,018
09-03-06 조회 868
09-03-05 조회 807
09-03-05 조회 877
09-03-05 조회 825
09-03-05 조회 834
09-03-05 조회 1,816
09-03-05 조회 991
09-03-05 조회 1,391
09-03-05 조회 820
09-03-05 조회 831
09-03-05 조회 1,060
09-03-05 조회 840
09-03-05 조회 785
09-03-04 조회 916