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

포인트 만료일이 지나도 포인트가 마이너스 되지 않네요~ 부탁드립니다. ㅠㅠ 채택완료

코니팡 5년 전 조회 2,388

사이트를 운영한지 1년이 딱 되서

회원들의 포인트 등을 살펴보는데

만료일이 8월19일 이전의 모든 포인트가 그대로 살아있습니다.

 

테스트 아이디 여러개로 체크 해봤는데도

만료일이라고는 표시되어 있고, 만료는 안되어 있고 여전히 포인트는 그대로 살아있더락요.

 

무언가 잘못 건들인것 같긴한데... 기억이 나질 않습니다.

 

혹시나해서 여기 사이트 오랜만에 로그인해보니

로그인 싯점으로 만료포인트가 체크되어 만료 -8500 이런식으로 뜨더라구요.

 

제 홈페이지는 날짜를 모르는걸까요?ㅠㅠ

왜 만료일은 되어 있는데

이후 로그인해도 만료가 되지 않는걸까요?~ㅠㅠ

 

어디를 손봐야하는지

부탁드립니다.

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

답변 2개

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

lib\common.lib.php 파일에 아래부분이 그 역할을 합니다.

</p>

<p>// 소멸포인트 삭제</p>

<p>function delete_expire_point($mb_id, $point)</p>

<p>

</p>

<p>        // 유효기간이 있을 때 기간이 지난 포인트 expired 체크</p>

<p>        $sql = " update {$g5['point_table']}</p>

<p>                    set po_expired = '1'</p>

<p>                    where mb_id = '$mb_id'</p>

<p>                      and po_expired <> '1'</p>

<p>                      and po_expire_date <> '9999-12-31'</p>

<p>                      and po_expire_date < '".G5_TIME_YMD."' ";</p>

<p>        sql_query($sql);</p>

<p>

 

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

답변에 대한 댓글 3개

코니팡
5년 전
죄송합니다.
위 답변으로 코드를 입력했는데 부탁드립니다.ㅠㅠ
달아주신 부분부터 마무리 부분까지입니다.

특이점을 찾지 못하겠습니다.
ㅠㅠ
e
eyekiss
5년 전
영카트 최신버전을 다운받아서 거기 소스를 참조하세요..
코니팡
5년 전
정발 정발 죄송합니다. ㅠㅠ
귀찮게 해드리는것 같네요 ㅠㅠ

영카드5 최신버전의 lib/common.lib.php 에서 point로도 검색하여 모두 확인하였지만
제 파일과 차이가 없었습니다. ㅠㅠ

어디서부터 이상해진걸까요~ㅠㅠㅠㅠ

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

코니팡
5년 전
<span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">// 소멸포인트 삭제
</span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">function </span><span style="background-color: rgb(247, 250, 255);">delete_expire_point(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point</span><span style="background-color: rgb(247, 250, 255);">)
</span><span style="background-color: rgb(247, 250, 255);">{
</span><span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">global </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$config</span><span style="background-color: rgb(247, 250, 255);">;
</span>
<span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point1 </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="font-style: italic; background-color: rgb(247, 250, 255);">abs</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">" select po_id, po_use_point, po_expired, po_expire_date
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                from </span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'point_table'</span><span style="background-color: rgb(247, 250, 255);">]}</span>
<span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                where mb_id = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                  and po_expired = '1'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                  and po_point >= 0
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                  and po_use_point > 0
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                order by po_expire_date desc, po_id desc "</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$result </span><span style="background-color: rgb(247, 250, 255);">= sql_query(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">for</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$i</span><span style="background-color: rgb(247, 250, 255);">=</span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">0</span><span style="background-color: rgb(247, 250, 255);">; </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$row</span><span style="background-color: rgb(247, 250, 255);">=sql_fetch_array(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$result</span><span style="background-color: rgb(247, 250, 255);">); </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$i</span><span style="background-color: rgb(247, 250, 255);">++) {
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point2 </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$row</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'po_use_point'</span><span style="background-color: rgb(247, 250, 255);">];
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expired </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'0'</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'9999-12-31'</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">if</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$config</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'cf_point_term'</span><span style="background-color: rgb(247, 250, 255);">] > </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">0</span><span style="background-color: rgb(247, 250, 255);">)
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="font-style: italic; background-color: rgb(247, 250, 255);">date</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'Y-m-d'</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="font-style: italic; background-color: rgb(247, 250, 255);">strtotime</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'+'</span><span style="background-color: rgb(247, 250, 255);">.(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$config</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'cf_point_term'</span><span style="background-color: rgb(247, 250, 255);">] - </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">1</span><span style="background-color: rgb(247, 250, 255);">).</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">' days'</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold; background-color: rgb(247, 250, 255);">G5_SERVER_TIME</span><span style="background-color: rgb(247, 250, 255);">));
</span>
<span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">if</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point2 </span><span style="background-color: rgb(247, 250, 255);">> </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point1</span><span style="background-color: rgb(247, 250, 255);">) {
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">" update </span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'point_table'</span><span style="background-color: rgb(247, 250, 255);">]}</span>
<span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                        set po_use_point = po_use_point - '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point1</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expired = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expired</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expire_date = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                        where po_id = '</span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$row</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'po_id'</span><span style="background-color: rgb(247, 250, 255);">]}</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">' "</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            sql_query(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">break</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">        } </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">else </span><span style="background-color: rgb(247, 250, 255);">{
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">" update </span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'point_table'</span><span style="background-color: rgb(247, 250, 255);">]}</span>
<span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                        set po_use_point = '0',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expired = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expired</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expire_date = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                        where po_id = '</span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$row</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'po_id'</span><span style="background-color: rgb(247, 250, 255);">]}</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">' "</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            sql_query(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql</span><span style="background-color: rgb(247, 250, 255);">);
</span>
<span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point1 </span><span style="background-color: rgb(247, 250, 255);">-= </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point2</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">        }
</span><span style="background-color: rgb(247, 250, 255);">    }
</span><span style="background-color: rgb(247, 250, 255);">}
</span>
<span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">// 포인트 내역 합계
</span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">function </span><span style="background-color: rgb(247, 250, 255);">get_point_sum(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">)
</span><span style="background-color: rgb(247, 250, 255);">{
</span><span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">global </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$config</span><span style="background-color: rgb(247, 250, 255);">;
</span>
<span style="background-color: rgb(247, 250, 255);">    </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">if</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$config</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'cf_point_term'</span><span style="background-color: rgb(247, 250, 255);">] > </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">0</span><span style="background-color: rgb(247, 250, 255);">) {
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">// 소멸포인트가 있으면 내역 추가
</span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$expire_point </span><span style="background-color: rgb(247, 250, 255);">= get_expire_point(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">if</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$expire_point </span><span style="background-color: rgb(247, 250, 255);">> </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">0</span><span style="background-color: rgb(247, 250, 255);">) {
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb </span><span style="background-color: rgb(247, 250, 255);">= get_member(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'mb_point'</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$content </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'포인트 소멸'</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_table </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'@expire'</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_id </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_action </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'expire'</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'-'</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="font-style: italic; background-color: rgb(247, 250, 255);">uniqid</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">''</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$expire_point </span><span style="background-color: rgb(247, 250, 255);">* (-</span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">1</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_mb_point </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'mb_point'</span><span style="background-color: rgb(247, 250, 255);">] + </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold; background-color: rgb(247, 250, 255);">G5_TIME_YMD</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expired </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">1</span><span style="background-color: rgb(247, 250, 255);">;
</span>
<span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">" insert into </span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'point_table'</span><span style="background-color: rgb(247, 250, 255);">]}</span>
<span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                        set mb_id = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_datetime = '"</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold; background-color: rgb(247, 250, 255);">G5_TIME_YMDHIS</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">"',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_content = '"</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="font-style: italic; background-color: rgb(247, 250, 255);">addslashes</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$content</span><span style="background-color: rgb(247, 250, 255);">).</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">"',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_point = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_use_point = '0',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_mb_point = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_mb_point</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expired = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expired</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_expire_date = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$po_expire_date</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_rel_table = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_table</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_rel_id = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_id</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">',
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                            po_rel_action = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$rel_action</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">' "</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">            sql_query(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql</span><span style="background-color: rgb(247, 250, 255);">);
</span>
<span style="background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">// 포인트를 사용한 경우 포인트 내역에 사용금액 기록
</span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">            </span><span style="color: rgb(0, 0, 128); font-weight: bold; background-color: rgb(247, 250, 255);">if</span><span style="background-color: rgb(247, 250, 255);">(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point </span><span style="background-color: rgb(247, 250, 255);">< </span><span style="color: rgb(0, 0, 255); background-color: rgb(247, 250, 255);">0</span><span style="background-color: rgb(247, 250, 255);">) {
</span><span style="background-color: rgb(247, 250, 255);">                insert_use_point(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="background-color: rgb(247, 250, 255);">, </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$point</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">            }
</span><span style="background-color: rgb(247, 250, 255);">        }
</span>
<span style="background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">// 유효기간이 있을 때 기간이 지난 포인트 expired 체크
</span><span style="color: rgb(128, 128, 128); font-style: italic; background-color: rgb(247, 250, 255);">        </span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql </span><span style="background-color: rgb(247, 250, 255);">= </span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">" update </span><span style="background-color: rgb(247, 250, 255);">{</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$g5</span><span style="background-color: rgb(247, 250, 255);">[</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'point_table'</span><span style="background-color: rgb(247, 250, 255);">]}</span>
<span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                    set po_expired = '1'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                    where mb_id = '</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$mb_id</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                      and po_expired <> '1'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                      and po_expire_date <> '9999-12-31'
</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">                      and po_expire_date < '"</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="color: rgb(102, 14, 122); font-style: italic; font-weight: bold; background-color: rgb(247, 250, 255);">G5_TIME_YMD</span><span style="background-color: rgb(247, 250, 255);">.</span><span style="color: rgb(0, 128, 0); font-weight: bold; background-color: rgb(247, 250, 255);">"' "</span><span style="background-color: rgb(247, 250, 255);">;
</span><span style="background-color: rgb(247, 250, 255);">        sql_query(</span><span style="color: rgb(102, 0, 0); background-color: rgb(247, 250, 255);">$sql</span><span style="background-color: rgb(247, 250, 255);">);
</span><span style="background-color: rgb(247, 250, 255);">    }
</span>
로그인 후 평가할 수 있습니다

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

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

로그인