New Feeds

[질답/버그/제안] 채택게시판 질문입니다.

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

채택게시판같은 경우 포인트를 설정하고 채택시 그 포인트가 상대방에게 가는 게시판인데,


포인트를 양수 말고 음수로 두고 싶습니다.


가령 100포인트 설정하고 채택하면, 100포인트 빠져나가는 방식으로요.


혹시 어디를 수정하면 음수로 포인트가 빠져나가게 만들 수 있을까요?


// 보드설정$boset = array();$boset = apms_boset();// 채택포인트가 있을 경우$point = (int)$write['as_choice'];if($point > 0) {	// 보유포인트가 부족할 경우	if($point > $member['mb_point']) {		$error = '보유 '.AS_MP.' 부족으로 채택을 완료하지 못했습니다.nn'.AS_MP.'를 확인 후 다시 채택해 주시기 바랍니다.';		print_result($error, $success);	}	// 수수료	$fee = (int)$boset['cpoint'];	$fee_per = $fee / 100;	$fee_point = round($point * $fee_per);	// 포인트 차감	$sp_point = (!$boset['fee'] || $boset['fee'] == '1') ? $point + $fee_point : $point; //수수료	$sp_point = $sp_point * (-1);	insert_point($member['mb_id'], $sp_point, "{$board['bo_subject']} $wr_id 채택포인트", $bo_table, $wc_id, "채택", 0, 1); //중복등록 가능	// 포인트 등록	$po_point = (!$boset['fee'] || $boset['fee'] == '2') ? $point - $fee_point : $point; //수수료	insert_point($cmt['mb_id'], $po_point, "{$board['bo_subject']} $wr_id 채택포인트", $bo_table, $wc_id, "채택", 0, 1); //중복등록 가능}// 글 업데이트sql_query(" update $write_table set as_choice_cnt = as_choice_cnt + 1 where wr_id = '$wr_id' ");// 댓글 업데이트sql_query(" update $write_table set as_choice = '{$write['as_choice']}', as_choice_cnt = as_choice_cnt + 1 where wr_id = '$wc_id' ");// APMS : 내글반응apms_response('wr', 'choice', '', $bo_table, $wr_id, $write['wr_subject'], $cmt['mb_id'], $member['mb_id'], '채택됨', $wc_id);$success = "이 댓글을 채택하셨습니다.";print_result($error, $success);



관련자료

댓글 0
등록된 댓글이 없습니다.
전체 1,963 / 16 페이지
번호
제목
이름

Favorites


최근글


새댓글


  • 댓글이 없습니다.
알림 0