테스트 사이트 - 개발 중인 베타 버전입니다

자동폭파일에 팝업창 띄울경우 채택완료

마조 8년 전 조회 2,881

https://sir.kr/g4_tiptech/12417">https://sir.kr/g4_tiptech/12417

자동폭파일에 게시글 삭제가 아닌

아래와 같은 팝업창 소스가 실행되게 하려고 합니다.

list.skin.php 에 어떻게 넣어 주어야 하나요??

echo ""; 

아래처럼 수정해서

list.skin.php 아래 부분에 넣어주었는데.. 화면 출력이 안됩니다.

echo " " . $list[$i][icon_new];        //echo " " . $list[$i][icon_file];        //echo " " . $list[$i][icon_hot];        //echo $nobr_end;       ?>

<<여기에 넣음>>

=====================================

 

 $count_write = 0;  $count_comment = 0;

 if($list[$i][wr_45]) {   $g4[time_ymd] = date("Y-m-d H:i", $g4[server_time]);   $stoday = $g4[time_ymd];

  $bombdate = $list[$i][wr_45];

  $By = substr($bombdate,0,4);   $Bm = substr($bombdate,5,2);   $Bd = substr($bombdate,8,2) + 7;   $Bh = substr($bombdate,11,2);   $Bi = substr($bombdate,14,2);

  $bombdate7 = date("Y-m-d H:i",mktime($Bh,$Bi,0,$Bm,$Bd,$By) );

  $bombc = $list[$i][wr_id];

  if ($stoday > $bombdate7) {

   //자동폭파일에 팝업창 띄우기  echo "";  //자동폭파일에 팝업창 띄우기

} ?>

=======================================

자동폭파 list.skin.ph 소스부분

list.skin.php 의 상단에 아래 소스를 추가합니다

//자폭 시작 for ($i=0; $i

 $count_write = 0;  $count_comment = 0;

 if($list[$i][wr_10]) {   $g4[time_ymd] = date("Y-m-d H:i", $g4[server_time]);   $stoday = $g4[time_ymd];

  $bombdate = $list[$i][wr_10];

  $By = substr($bombdate,0,4);   $Bm = substr($bombdate,5,2);   $Bd = substr($bombdate,8,2) + 7;   $Bh = substr($bombdate,11,2);   $Bi = substr($bombdate,14,2);

  $bombdate7 = date("Y-m-d H:i",mktime($Bh,$Bi,0,$Bm,$Bd,$By) );

  $bombc = $list[$i][wr_id];

  if ($stoday > $bombdate7) {   $sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '$bombc' order by wr_id ";   $result = sql_query($sql);   while ($row = sql_fetch_array($result))   {    // 원글이라면    if (!$row[wr_is_comment])    {     // 원글 포인트 삭제     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/thumb/$write[wr_id]"); //썸네일 삭제      @unlink("$g4[path]/data/file/$bo_table/latest_thumb/$write[wr_id]"); //최근게시물 썸네일 삭제     }

    //추천기록 삭제     sql_query(" delete from g4_board_good where wr_id = '$row[wr_id]' AND bo_table = '$bo_table' "); //수정           // 파일테이블 행 삭제     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] {$view[wr_id]}-{$row[wr_id]} 코멘트삭제");     $count_comment++;    }   }   // 게시글 삭제   sql_query(" delete from $write_table where wr_parent = '$bombc' ");   // 최근게시물 삭제   sql_query(" delete from $g4[board_new_table] where bo_table = '$bo_table' and wr_parent = '$bombc' ");   // 스크랩 삭제   sql_query(" delete from $g4[scrap_table] where bo_table = '$bo_table' and wr_id = '$bombc' ");

  // 공지사항 삭제   $notice_array = explode("\n", trim($board[bo_notice]));   $bo_notice = "";   for ($k=0; $k

  // 글숫자 감소   if ($count_write > 0 || $count_comment > 0)    sql_query(" update $g4[board_table] set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");   $bend = 1;   }  }  if(count($list) == $i+1 && $bend == 1){   goto_url("./board.php?bo_table=$bo_table&page=$page");} } //자폭 끝

그리고 echo $list[$i][subject]; 이부분 위에 아래 소스를 추가합니다. 제목을 나타내는 부분위에 넣으세요

  if($list[$i][wr_10]){    echo "";   }

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

답변 1개

채택된 답변
+20 포인트
8년 전

조건은 현재 날짜 Y-m-d H:i 이보다 클때인데 이조건이 만족하는지 먼저 체크해보세요

 echo $stoday." > ".$bombdate7."; exit;

후 조건이 맞는지 먼저 체크하신후 원하는 조건에 맞는지 확인후 작업을 진행하는게 좋을것 같네요

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

마조
8년 전
도움말씀 감사드립니다.
알려주신대로 좀더 확인후 살펴봐야 겠습니다.
즐거운 하루되세요.

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

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

로그인