자신이 쓴 글을 수정할때도 포인트가 차감되게 하고 싶습니다. 정보
자신이 쓴 글을 수정할때도 포인트가 차감되게 하고 싶습니다.본문
며칠전에 아래에 질문했다가 시원한 답변을 못 받아서 다시 질문 드립니다.
자신이 쓴글을 수정할때에도 정해진 포인트가 차감되게(-) 할려고 합니다.
글을쓸때도 차감,
글을 수정할때도 차감,
이렇게 하고 싶은데 방법을 모르겠네요.
고수님들의 해답을 부탁드립니다.
감사합니다.
자신이 쓴글을 수정할때에도 정해진 포인트가 차감되게(-) 할려고 합니다.
글을쓸때도 차감,
글을 수정할때도 차감,
이렇게 하고 싶은데 방법을 모르겠네요.
고수님들의 해답을 부탁드립니다.
감사합니다.
댓글 전체

bbs/write_update.php
if ($w == "" || $w == "r")
{
여기 있는 insert_point를
}
else if ($w == "u")
{
여기에도 넣어 주세요.
if ($w == "" || $w == "r")
{
여기 있는 insert_point를
}
else if ($w == "u")
{
여기에도 넣어 주세요.
엑스엠엘님
현재 전체 게시판에 적용할 것이 아니고 특정게시판에만 위와 같이 적용할려고 합니다.
해당스킨에는 아래와 같은 부분이 있습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($w != "u") {
insert_point($member[mb_id], "-$wr_6", "$board[bo_subject] $wr_id 등록", $bo_table, $wr_id, '등록');
echo "<script>alert('등록되었습니다');opener.location.reload();close();</script>";
}else{
$sql = mysql_query(" update $g4[point_table] set po_point = '-$wr_6' where po_rel_table = '$bo_table' and po_rel_id = '$wr_id' and po_rel_action = '등록' and mb_id = '$write_mb_id' ");
// 포인트 내역의 합을 구하고
$sql = " select sum(po_point) as sum_po_point from $g4[point_table] where mb_id = '$write_mb_id' ";
$row = sql_fetch($sql);
$sum_point = $row[sum_po_point];
// 포인트 UPDATE
$sql = " update $g4[member_table] set mb_point = '$sum_point' where mb_id = '$write_mb_id' ";
sql_query($sql);
echo "<script>alert('수정되었습니다');</script>";
}
?>
위 부분에서 어떻게 처리하면 될까요?
도움 부탁드립니다.
현재 전체 게시판에 적용할 것이 아니고 특정게시판에만 위와 같이 적용할려고 합니다.
해당스킨에는 아래와 같은 부분이 있습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($w != "u") {
insert_point($member[mb_id], "-$wr_6", "$board[bo_subject] $wr_id 등록", $bo_table, $wr_id, '등록');
echo "<script>alert('등록되었습니다');opener.location.reload();close();</script>";
}else{
$sql = mysql_query(" update $g4[point_table] set po_point = '-$wr_6' where po_rel_table = '$bo_table' and po_rel_id = '$wr_id' and po_rel_action = '등록' and mb_id = '$write_mb_id' ");
// 포인트 내역의 합을 구하고
$sql = " select sum(po_point) as sum_po_point from $g4[point_table] where mb_id = '$write_mb_id' ";
$row = sql_fetch($sql);
$sum_point = $row[sum_po_point];
// 포인트 UPDATE
$sql = " update $g4[member_table] set mb_point = '$sum_point' where mb_id = '$write_mb_id' ";
sql_query($sql);
echo "<script>alert('수정되었습니다');</script>";
}
?>
위 부분에서 어떻게 처리하면 될까요?
도움 부탁드립니다.