팁텍 코멘트를 남겨야 다운로드 받을 수 있음 + 포인트 삭감
본문
<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'> <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번글에서 다운 받을 것
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'> <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번글에서 다운 받을 것
까만도둑님의 댓글
까만도둑쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일emoticon_011