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

move.php 수정하여 사용중인데요.. 체크한 게시물은 어케 구분하는지요? 채택완료

소수리꼬 11년 전 조회 5,174
if ($sw == "move")     $act = "이동"; else if ($sw == "copy")     $act = "복사"; else     alert("sw 값이 제대로 넘어오지 않았습니다.");
//$g4[title] = "게시물 " . $act; include_once("$g4[path]/head.sub.php");
$wr_id_list = ""; if ($wr_id)     $wr_id_list = $wr_id; else {     $comma = "";     for ($i=0; $i
$sql = " select * from $g4[board_table] a, $g4[group_table] b  where a.gr_id = b.gr_id  and bo_table <> '$bo_table' "; if ($is_admin == 'group')     $sql .= " and b.gr_admin = '$member[mb_id]' "; else if ($is_admin == 'board')     $sql .= " and a.bo_admin = '$member[mb_id]' "; $sql .= " order by a.gr_id, a.bo_order_search, a.bo_table "; $sql = " select *  from $g4[board_table] a, $g4[group_table] b where a.gr_id = b.gr_id  and a.bo_table = 'BBB' and a.gr_id = '$gr_id'";
$result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) {     $list[$i] = $row; }
 
//이동시킬 게시물중 체크한 것 중에서 wr_10에 1이 기록되어 있다면 $cart_chk=sql_fetch("select count(*) as cnt from AAA where mb_id='$member[mb_id]' and wr_10 ='1' "); alert_close("{$cart_chk[cnt]}개는 이동할 수 없습니다. 선택체크를 풀고 다시 시도하세요.");
?>
 
############################################################################
상기는 move.php 파일을 수정한것입니다.
기능인 즉,
AAA게시판을 BBB게시판으로 이동하는 기능입니다.
게시판 리스트에서 체크를 하고 이동버튼을 누르게 되면 move.php 파일이 실행되면서 생성된 게시판테이블이 출력되지 않고 지정된 게시판 한개만 나오도록 하였고 그 게시판에 체크를 하면 이동을 하게 됩니다. 즉 , 특정 게시판 한곳으로만 이동시킬려다 보니까 이렇게 밖에 실력이 안되어서요... 이 기능은 물론 관리자가 이용하는 것이 아니라 일반 가입회원들이 사용할 수 있도록 하였습니다.
 
그러다보니..
게시판 리스트에서 이동을 원하는 AAA게시판의 게시물을 체크한 후 이동시킬때요.. 체크한 AAA게시판의 게시물의 wr_10에 1이 입력되었다면 BBB게시판으로 이동을 금지하고 싶거든요.. 그렇게 하려면 어떻게 해야하는지 좀 알려주세요.
 
$cart_chk=sql_fetch("select count(*) as cnt from AAA where mb_id='$member[mb_id]' and wr_10 ='1' "); alert_close("{$cart_chk[cnt]}개는 이동할 수 없습니다. 선택체크를 풀고 다시 시도하세요.");
 
위와 같이 해보니까. AAA 게시판에서 체크여부를 묻지 않고 단순히 아이디가 같고 wr_1이 기록된것을 모두 카운트 하드라구요..
 
정리하여 질문드리면,
접속아이디가 같고, 이동시킬려고 체크한 게시물 중에서 wr-10에 1이 기록되어 잇는 게시물이 있다면 메세지를 뿌리고 이동금지 하려면 어떻게 해야하는지좀 알려주세요.
 
감사드립니다.
 
 
######################
추가
//체크한것 중에서 기존에 사진바구니 담은것, 또는 구매사진 즉wr_10에 마크가 있다면 체크함 $cart_chk=sql_fetch("select count(*) as cnt from AAA where mb_id='$member[mb_id]' and wr_10 ='1' and wr_id = '{$wr_id_list}' "); alert_close("{$cart_chk[cnt]} / {$wr_id_list}");
 
이렇게 해서 찍어보면요..
$wr_id_list 함수에는 선택한 id 값이 모두 담기네요..
이걸 이용할 수는 없나요?
댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
11년 전
<div><span style="font-family: gulim, helvetica; line-height: 23.53125px">$cart_chk=sql_fetch("select count(*) as cnt from AAA where mb_id='$member[mb_id]' and wr_10 ='1' ");</span></div>
<div>if(<span style="font-family: gulim, helvetica; line-height: 23.53125px">$cart_chk[cnt]) {</span></div>
<div><span style="font-family: gulim, helvetica; line-height: 23.53125px"><span class="Apple-tab-span" style="white-space: pre">	</span>alert_close("{$cart_chk[cnt]}개는 이동할 수 없습니다. 선택체크를 풀고 다시 시도하세요.");</span></div>
<div><span style="font-family: gulim, helvetica; line-height: 23.53125px">} else {</span></div>
<div><font face="gulim, helvetica"><span style="line-height: 23.53125px">movie.php 내용 넣으시면 됨</span></font></div>
<div><font face="gulim, helvetica"><span style="line-height: 23.53125px">}</span></font></div>
<div><font face="gulim, helvetica"><span style="line-height: 23.53125px">
</span></font></div>
<div><font face="gulim, helvetica"><span style="line-height: 23.53125px">
로그인 후 평가할 수 있습니다

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

7년 전

많은 도움이 되었습니다. 감사합니다.

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

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

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

로그인