코멘트를 남겨야 다운로드 받을 수 있음 + 포인트 삭감 > 그누보드&그샵

본문 바로가기

사이트 내 전체검색

뒤로가기 그누보드&그샵

팁텍 코멘트를 남겨야 다운로드 받을 수 있음 + 포인트 삭감

본문

<script>
    function pointdel(point)
    {
        window.open('./?doc=<?=$board_skin?>/pointdel.php&bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>&point='+point, 'PointDelWin', 'left=10000,top=10000,width=100,height=100');
    }
</script>


<?
// 파일 업로드 설정한 값만큼 출력
$sql = " select count(*) from {$cfg[write_table_prefix]}{$bo_table}
          where wr_parent_id = '$wr_id' ";
if ($member[mb_id]) {
    $sql .= " and mb_id = '$member[mb_id]' ";
} else {
    $sql .= " and wr_ip = '$REMOTE_ADDR' ";
}
$row = sql_fetch($sql);
// 코멘트를 남겨야 다운로드 받을 수 있음
if ($row[0] > 0 || $member[mb_level] >= $cfg[level_max]) {
    for ($i=1; $i<=$cfg[file_count]; $i++) {
        if (preg_match("/(\.gif|\.jp[e]*g|\.png|\.bmp)$/i", $file[$i][source])) {
            continue;
        }
        if ($member[mb_point] >= $point) {
        if ($file[$i][source]) {
            echo "<tr><td colspan=2 height=40>  <img src='$board_skin/icon_download.gif' align='absmiddle'>&nbsp;<span class=wview>Download</span> : <a href='{$file[$i][href]}' onclick='pointdel($point)'>{$file[$i][source]} ({$file[$i][size]})</a>, Down:{$file[$i][download]}</td></tr>"; }
    } else {
            // 포인트가 없으면 글읽기 세션을 없애므로 다운로드 금지한다.
            $$ss_name = $HTTP_SESSION_VARS[$ss_name] = FALSE;
    }
}
}
?>

==============================================

//지니아빠

pointdel.php는 밑에 있는 53번글에서 다운 받을 것

댓글목록 2

까만도둑님의 댓글

까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

emoticon_011

나스카님의 댓글

no_profile 나스카쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

53번 글 ; 다운로드 할때 포인트 감소
~게시물 입니다.


Fatal error: Uncaught DivisionByZeroError: Division by zero in /home1/hyusig/public_html/bbs/list.php:116 Stack trace: #0 /home1/hyusig/public_html/bbs/board.php(231): include_once() #1 {main} thrown in /home1/hyusig/public_html/bbs/list.php on line 116