답변 3개
채택된 답변
+20 포인트
5년 전
포인트 설정에 따른 지급 루틴은 insert_point () 라는 함수를 사용합니다. common.lib.php 내
그 함수 내에 회원레벨이 조건에 맞는다면 $point * 2 해서 포인트를 부여하시면 될듯합니다.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 5개
�
요고꽁
5년 전
�
요고꽁
5년 전
//회원레벨별 포인트 지급
$sql_m = " select * from g5_member where mb_id = '$mb_id'";
$result_m = sql_query($sql_m);
$row_m=sql_fetch_array($result_m);
if ($row_m[mb_level] == '3') {
$point_total = $point * 1.5;
$po_mb_point = $mb_point + $point_total;
} else if ($row_m[mb_level] == '4') {
$point_total = $point * 2;
$po_mb_point = $mb_point + $point_total;
} else {
$point_total = $point;
$po_mb_point = $mb_point + $point_total;
}
이렇게 하니까 먹히네요 ㅎㅎ 감사합니다.
$sql_m = " select * from g5_member where mb_id = '$mb_id'";
$result_m = sql_query($sql_m);
$row_m=sql_fetch_array($result_m);
if ($row_m[mb_level] == '3') {
$point_total = $point * 1.5;
$po_mb_point = $mb_point + $point_total;
} else if ($row_m[mb_level] == '4') {
$point_total = $point * 2;
$po_mb_point = $mb_point + $point_total;
} else {
$point_total = $point;
$po_mb_point = $mb_point + $point_total;
}
이렇게 하니까 먹히네요 ㅎㅎ 감사합니다.
�
유찬아빠
5년 전
해당 함수내에 global $member; 라는 전역변수를 포함하는 구문이 선행되어야 맴버레벨이라는 변수 값이 적용되지 않을 까요?
�
유찬아빠
5년 전
이미 $member 라는 변수에서 쿼리를 해서 사용하는 부분이므로 추가 쿼리를 하는 것은 효율적이지 않습니다. 기존 선언된 변수를 끌어다 쓰는 것을 추천드립니다.
�
요고꽁
5년 전
//회원레벨별 포인트 지급
global $member
if ($member[mb_level] == '3') {
$point_total = $point * 1.5;
$po_mb_point = $mb_point + $point_total;
} else if ($member[mb_level] == '4') {
$point_total = $point * 2;
$po_mb_point = $mb_point + $point_total;
} else {
$point_total = $point;
$po_mb_point = $mb_point + $point_total;
}
이렇게 하라는거죵?
global $member
if ($member[mb_level] == '3') {
$point_total = $point * 1.5;
$po_mb_point = $mb_point + $point_total;
} else if ($member[mb_level] == '4') {
$point_total = $point * 2;
$po_mb_point = $mb_point + $point_total;
} else {
$point_total = $point;
$po_mb_point = $mb_point + $point_total;
}
이렇게 하라는거죵?
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
�
요고꽁
5년 전
포인트 지정되어 있는 모든거 포함해서용~ ^^
회원가입 게시판 글쓰기 읽기 댓글 ..등등 관리자에서 포인트로 지정해 놓는거 모두 ㅠ
회원가입 게시판 글쓰기 읽기 댓글 ..등등 관리자에서 포인트로 지정해 놓는거 모두 ㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
if ($member[mb_level] == '3') {
$po_mb_point = $mb_point + ($point * 2);
} else if ($member[mb_level] == '4') {
$po_mb_point = $mb_point + ($point * 3);
} else {
$po_mb_point = $mb_point + $point;
}
약930줄에 있던데 이게 맞을가요?
제가 수정해 보았는데 레벨 3으로 하니까 곱하기 2 지급은 안되네요 ㅠ 게시글 읽기나 쓰기등 해도 ㅠㅠ