etc보드 [자비보드] zmSpamFree 캡차(Captcha) 적용하기
페이지 정보
본문
1. zmSpamFree 를 zavi_board 하부에 업로드
2. zavi_board/skin/bbs/write.html 아래 내용 추가
<tr ::isMember::>
<td ::isMember::><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" /></a></td>
<td ::isMember::><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" /> 왼쪽 글자를 입력해주세요.</td>
</tr ::isMember::>
3-1. zavi_board/write.php 수정
[수정전]
if($mode == 'new')
{
[수정후]
if($mode == 'new')
{
if($_SESSION[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
3-2. zavi_board/write.php 수정
[수정전]
elseif($mode == 'rep')
{
[수정후]
elseif($mode == 'rep')
{
if($_SESSION[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
4. zavi_board/skin/bbs/member.html 아래 내용추가
<tr ::admin_mode::>
<td height="2" colspan="4" background="::skinDir::images/write_line.gif"><img src="::skinDir::images/spacer.gif" alt=""></td>
</tr>
<tr ::admin_mode::>
<td><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" /></a></td>
<td><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" /> 왼쪽 글자를 입력해주세요.</p>
</tr>
5. zavi_board/member.php 수정
[수정전]
elseif($mode == "join")
{
if(trim($_POST[member_id]))
{
[수정후]
elseif($mode == "join")
{
if(trim($_POST[member_id]))
{
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
6. zavi_board/skin/bbs/write_comment.html 아래내용 추가
<td><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" ::is_member:: /></a></td>
<td ::is_member::><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" ::is_member:: /> 왼쪽 글자 입력</td>
7. zavi_board/comment.php 수정
[수정전]
if($mode == "write")
{
[수정후]
if($mode == "write")
{
if($HTTP_SESSION_VARS[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $HTTP_POST_VARS['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
2. zavi_board/skin/bbs/write.html 아래 내용 추가
<tr ::isMember::>
<td ::isMember::><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" /></a></td>
<td ::isMember::><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" /> 왼쪽 글자를 입력해주세요.</td>
</tr ::isMember::>
3-1. zavi_board/write.php 수정
[수정전]
if($mode == 'new')
{
[수정후]
if($mode == 'new')
{
if($_SESSION[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
3-2. zavi_board/write.php 수정
[수정전]
elseif($mode == 'rep')
{
[수정후]
elseif($mode == 'rep')
{
if($_SESSION[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
4. zavi_board/skin/bbs/member.html 아래 내용추가
<tr ::admin_mode::>
<td height="2" colspan="4" background="::skinDir::images/write_line.gif"><img src="::skinDir::images/spacer.gif" alt=""></td>
</tr>
<tr ::admin_mode::>
<td><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" /></a></td>
<td><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" /> 왼쪽 글자를 입력해주세요.</p>
</tr>
5. zavi_board/member.php 수정
[수정전]
elseif($mode == "join")
{
if(trim($_POST[member_id]))
{
[수정후]
elseif($mode == "join")
{
if(trim($_POST[member_id]))
{
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $_POST['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
6. zavi_board/skin/bbs/write_comment.html 아래내용 추가
<td><a href="#" onclick="document.getElementById('zsfImg').src='/zavi_board/zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime(); return false;" title="새로고침"><img src="/zavi_board/zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="아래 새로고침을 클릭해 주세요." title="SpamFree.kr" border="0" ::is_member:: /></a></td>
<td ::is_member::><input type="text" size="8" maxlength="10" name="zsfCode" id="zsfCode" ::is_member:: /> 왼쪽 글자 입력</td>
7. zavi_board/comment.php 수정
[수정전]
if($mode == "write")
{
[수정후]
if($mode == "write")
{
if($HTTP_SESSION_VARS[sess_member_id]) {
} else {
// 지엠스팸프리 검사
include 'zmSpamFree/zmSpamFree.php';
if ( !zsfCheck( $HTTP_POST_VARS['zsfCode'] ) ) {
echo "<script type='text/javascript'>";
echo " alert('스팸차단코드가 틀렸습니다.');";
echo " history.back();";
echo "</script>";
exit;
}
}
댓글목록
등록된 댓글이 없습니다.