用户名 密码 记住我 还未注册?

关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急! [技术论坛 - XOOPS使用]

XOOPS China 讨论区 > XOOPS Core (核心) > XOOPS使用 > 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!

正在浏览:   1 名游客



 到底部   前一个主题   下一个主题  [无发表权] 请登录或者注册

(1) 2 3 »


关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
大侠们好,我在XOOPS2.0.16的登录位置增加了验证码,用的是:
/Frameworks/captcha,如下:

## Add by Shuweich for 验证码
## $reg_form->addElement(new XoopsFormButton(”", “submit”, _US_SUBMIT, “submit”));
$reg_form->setRequired($email_text);
if (
is_readable(XOOPS_ROOT_PATH."/Frameworks/captcha/formcaptcha.php")) {
        include_once 
XOOPS_ROOT_PATH."/Frameworks/captcha/formcaptcha.php";
        
$reg_form->addElement(new XoopsFormCaptcha('请输入验证码''xoopscaptcha'false4122049));
}
## Add by Shuweich for 验证码
# 原第90行

问题是:我现在还想在newbb这个模块中加入这个功能,不知道如何操作,请大侠们指点,谢谢,急盼。

因为网站论坛被灌水,受不了了,每天灌100多AD和黄站信息,疯掉了,

老大们救救我啊。!!!!!!!!~~~~~~~~~~~~~~~

我的站:shuweich.net

附件:



png  swzj_yzm.png (50.48 KB)
6468_46c6863b5481a.png 385X290 px

2007/8/18 13:40
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
我顶,我顶,我狂顶。
我急,我急,天天急!

2007/8/19 10:55
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
Support Team
注册日期:
2005/4/30 13:09
来自 安徽安庆
所属群组:
网站管理员
帖子: 510 | 精华: 3
等级: 20; EXP: 84
HP: 0 / 496
MP: 170 / 7610
离线
cbb4.0已经加了验证码
http://xoopschina.svn.sourceforge.net ... dules/newbb/branches/4.x/

请对比一下,主要的文件是viewtopic.php ,post.php,include/form.post.php

2007/8/19 15:16
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
自顶

2007/8/19 15:35
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
D.J. 老大,帮我呀,
我看了下,NEWBB里,
edit.php,newtopic.php,post.php,repty.php
都调用同一个form文件:
forumform.inc.php

是不是加验证码需要涉及到这几个文件呢?
谢谢老大,请帮我。

2007/8/19 15:41
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
验证码已经显示在界面上了,就是对输入的判断,我还没搞定!!!!
现在输入与否,都无所谓,只是个摆设,
我改了:
forumform.inc.php and viewtopic.php

这两天又被灌了几百个垃圾贴了,心痛!!!!

2007/8/19 17:47
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


回复: 关于XOOPS增加输入验证码的问题:如何增加验证码在发贴和回复时?求救,急!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
老大,4.0哪里有下载呀,我干脆换了算了。

我快被折磨傻了!!!!!!!!!!!!!

2007/8/19 17:55
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


我现在已经加了验证码了,但只是个摆设!只见到输入框,没有实现真正的难证!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
引用:

agl 写道:
cbb4.0已经加了验证码
http://xoopschina.svn.sourceforge.net ... dules/newbb/branches/4.x/

请对比一下,主要的文件是viewtopic.php ,post.php,include/form.post.php


这个哪里下载呀,我被折磨疯掉了,两天又被灌满了垃圾!
我下4.0玩儿算了。

我看了下,4.0已经把/include/forumform.inc.php 换成 /include/form.post.php了。

3.08 加验证码的地方是:newtopic.php、viewtopic.php、/include/forumform.inc.php
但是验证我加了几个地方(post.php),都没用。

帮我呀,求大侠们了。
我哭

D.J. 出来了!。。。谢谢了先!!!!

2007/8/19 18:04
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


对了,我的网站是:http://www.shuweich.net
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
有什么可以先防住呀,
上次在数据库里删除了4000多个贴子,因为操作的问题,把有些自己的贴子也删除掉了。
那个悔呀!!!!!!!!!!!!!!!!!

2007/8/19 18:06
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


我按照4.0的post.php 改了我的 post.php 可还是不行呀!
资深会员
注册日期:
2006/3/15 23:14
来自 China
所属群组:
注册会员
帖子: 248
等级: 14; EXP: 72
HP: 0 / 343
MP: 82 / 4384
离线
改后的newbb/post.php如下:

31行注释略
include 'header.php';
include_once 
XOOPS_ROOT_PATH '/modules/' $xoopsModule->dirname() . '/class/uploader.php';

foreach (array(
            
'forum',
            
'topic_id',
            
'post_id',
            
'order',
            
'pid',
            
'start',
            
'isreply',
            
'isedit'
            
) as $getint) {
    ${
$getint} = isset($_POST[$getint]) ? intval($_POST[$getint]) : ;
}
$op = isset($_POST['op']) ? $_POST['op'] : '';

$viewmode = (isset($_POST['viewmode']) && $_POST['viewmode'] != 'flat') ? 'thread' 'flat';
if ( empty(
$forum) ) {
    
redirect_header("index.php"2_MD_ERRORFORUM);
    exit();
}

$forum_handler =& xoops_getmodulehandler('forum''newbb');
$topic_handler =& xoops_getmodulehandler('topic''newbb');
$post_handler =& xoops_getmodulehandler('post''newbb');

if ( !empty(
$isedit) && $post_id>) {
    
$forumpost =& $post_handler->get($post_id);
    
$topic_id $forumpost->getVar("topic_id");
}else{
    
$forumpost =& $post_handler->create();
}
$topic =& $topic_handler->get($topic_id);
$forum_id = ($topic_id)?$topic->getVar("forum_id"):$forum;
$forum_obj =& $forum_handler->get($forum_id);
if (!
$forum_handler->getPermission($forum_obj)){
    
redirect_header("index.php"2_MD_NORIGHTTOACCESS);
    exit();
}

if (
$xoopsModuleConfig['wol_enabled']){
    
$online_handler =& xoops_getmodulehandler('online''newbb');
    
$online_handler->init($forum_obj);
}

include 
XOOPS_ROOT_PATH."/header.php";

if ( !empty(
$_POST['contents_submit']) ) {
    
$token_valid false;
    if(
class_exists("XoopsSecurity")){
        
$token_valid $GLOBALS['xoopsSecurity']->check();
    }else{ 
// backward compatible
        
if( !empty($_SESSION['submit_token']) && !empty($_POST['post_valid']) && $_POST['post_valid']==$_SESSION['submit_token'] ) $token_valid true;
        
$_SESSION['submit_token'] = null;
    }

    
## Add by Shuweich for 1 line.
    
$captcha_invalid false;
    if(!
is_object($xoopsUser)){
        
$uname = !isset($_POST['uname']) ? '' trim($_POST['uname']);
        
$pass = !isset($_POST['pass']) ? '' trim($_POST['pass']);
        
$member_handler =& xoops_gethandler('member');
        
$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)));
        if(
is_object($user) && $user->getVar('level')){
            if(!empty(
$_POST["login"])){
                
$user->setVar('last_login'time());
                if (!
$member_handler->insertUser($user)) {
                }
                
$_SESSION = array();
                
$_SESSION['xoopsUserId'] = $user->getVar('uid');
                
$_SESSION['xoopsUserGroups'] = $user->getGroups();
                if (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
                    
setcookie($xoopsConfig['session_name'], session_id(), time()+(60 $xoopsConfig['session_expire']), '/',  ''0);
                }
                
$user_theme $user->getVar('theme');
                if (
in_array($user_theme$xoopsConfig['theme_set_allowed'])) {
                    
$_SESSION['xoopsUserTheme'] = $user_theme;
                }
            }
            
$xoopsUser =& $user;
        }
    }

    
## Add by Shuweich 7 lines.
    
if (!is_object($xoopsUser) && @include_once XOOPS_ROOT_PATH."/Frameworks/captcha/captcha.php") {
        
$xoopsCaptcha XoopsCaptcha::instance();
        if (! 
$xoopsCaptcha->verify() ) {
            
$captcha_invalid true;
            
$error_message[] = $xoopsCaptcha->getMessage();
        }
    }

    
$isadmin newbb_isAdmin($forum_obj);

    
$time_valid true;
    if( !
$isadmin && !empty($xoopsModuleConfig['post_timelimit']) ){
        
$last_post newbb_getsession('LP'); // using session might be more secure ...
        
if(time()-$last_post $xoopsModuleConfig['post_timelimit']){
            
$time_valid false;
        }
    }

    if(
$captcha_invalid || !$token_valid || !$time_valid){
        
$_POST['contents_preview'] = 1;
        
$_POST['contents_submit'] = null;
        
$_POST['contents_upload'] = null;
        if(!
$token_valid) echo "<div class="errorMsg">"._MD_INVALID_SUBMIT."</div>";
        if(!
$time_valid) echo "<div class="errorMsg">".sprintf(_MD_POSTING_LIMITED,$xoopsModuleConfig['post_timelimit'])."</div>";
        echo 
"<br clear="both" />";
    }
}

if ( !empty(
$_POST['contents_submit']) ) {
    
$message =  $_POST['message'];
    if(empty(
$message)){
        
redirect_header("javascript:history.go(-1);"1);
        exit();
    }
    if ( !empty(
$isedit) && $post_id>0) {

        
$uid is_object($xoopsUser)? $xoopsUser->getVar('uid'):0;

        
$topic_status $topic_handler->get($topic_id,'topic_status');
        if ( 
$topic_handler->getPermission($forum_obj$topic_status'edit')
            && ( 
$isadmin || ( $forumpost->checkTimelimit('edit_timelimit') && $forumpost->checkIdentity() ))
            ) {}
        else{
            
redirect_header("viewtopic.php?forum=$forum_id&amp;topic_id=$topic_id&amp;post_id=$post_id&amp;order=$order&amp;viewmode=$viewmode&amp;pid=$pid",2,_MD_NORIGHTTOEDIT);
            exit();
        }

        
$delete_attach = isset($_POST['delete_attach']) ? $_POST['delete_attach'] : array();
        if (
is_array($delete_attach) && count($delete_attach)>0$forumpost->deleteAttachment($delete_attach);
    }
    else {
        if(
$topic_id){
            
$topic_status $topic_handler->get($topic_id,'topic_status');
            if (!
$topic_handler->getPermission($forum_obj$topic_status'reply')) {
                
redirect_header("viewtopic.php?forum=$forum_id&amp;topic_id=$topic_id&amp;post_id=$post_id&amp;order=$order&amp;viewmode=$viewmode&amp;pid=$pid",2,_MD_NORIGHTTOREPLY);
                exit();
            }
        }else{
            
$topic_status 0;
            if (!
$topic_handler->getPermission($forum_obj$topic_status'post')) {
                
redirect_header("viewtopic.php?forum=$forum_id",2,_MD_NORIGHTTOPOST);
                exit();
            }
        }

        
$isreply 0;
        
$isnew 1;
        if ( !
is_object($xoopsUser) || ( !empty($_POST['noname']) && !empty($xoopsModuleConfig['allow_user_anonymous']) ) ) {
            
$uid 0;
        }
        else {
            
$uid $xoopsUser->getVar("uid");
        }
        if (isset(
$pid) && $pid != "") {
            
$forumpost->setVar('pid'$pid);
        }
        if (!empty(
$topic_id)) {
            
$forumpost->setVar('topic_id'$topic_id);
            
$isreply 1;
        }
        
$forumpost->setVar('poster_ip'newbb_getIP());
        
$forumpost->setVar('uid'$uid);
        
$forumpost->setVar('post_time'time());
    }

    if(
$topic_handler->getPermission($forum_obj$topic_status'noapprove')) $approved 1;
    else 
$approved 0;
    
$forumpost->setVar('approved'$approved);

    
$forumpost->setVar('forum_id'$forum_obj->getVar('forum_id'));

    
$subject xoops_trim($_POST['subject']);
    
$subject = ($subject == '') ? _NOTITLE $subject;
    
$poster_name = !empty($_POST['poster_name'])?xoops_trim($_POST['poster_name']):'';
    
$dohtml = !empty($_POST['dohtml']) ? 0;
    
$dosmiley = !empty($_POST['dosmiley']) ? 0;
    
$doxcode = !empty($_POST['doxcode']) ? 0;
    
$dobr = !empty($_POST['dobr']) ? 0;
    
$icon = (!empty($_POST['icon']) && is_file(XOOPS_ROOT_PATH "/images/subject/" $_POST['icon']) ) ? $_POST['icon'] : '';
    
$attachsig = !empty($_POST['attachsig']) ? 0;
    
$view_require = !empty($_POST['view_require']) ? $_POST['view_require'] : '';
    
$post_karma = (($view_require == 'require_karma')&&isset($_POST['post_karma']))?intval($_POST['post_karma']):0;
    
$require_reply = ($view_require == 'require_reply')?1:0;
    
$forumpost->setVar('subject'$subject);

    
// The text filter is far from complete
    // Let's look for some comprehensive handlers
    
if($dohtml && !newbb_isAdmin($forum_obj) ) {
        
//$message=newbb_textFilter($message);
    
}
    
$forumpost->setVar('post_text'$message);
    
$forumpost->setVar('post_karma'$post_karma);
    
$forumpost->setVar('require_reply'$require_reply);
    
$forumpost->setVar('poster_name'$poster_name);
    
$forumpost->setVar('dohtml'$dohtml);
    
$forumpost->setVar('dosmiley'$dosmiley);
    
$forumpost->setVar('doxcode'$doxcode);
    
$forumpost->setVar('dobr'$dobr);
    
$forumpost->setVar('icon'$icon);
    
$forumpost->setVar('attachsig'$attachsig);
    
$forumpost->setAttachment();
    if ( !empty(
$post_id) ) $forumpost->setPostEdit($poster_name); // is reply

    
$attachments_tmp = array();
    if (!empty(
$_POST["attachments_tmp"])){
        
$attachments_tmp=unserialize(base64_decode($_POST["attachments_tmp"]));
        if (isset(
$_POST["delete_tmp"]) && count($_POST["delete_tmp"])){
            foreach(
$_POST["delete_tmp"] as $key){
                
unlink(XOOPS_CACHE_PATH "/" $attachments_tmp[$key][0]);
                unset(
$attachments_tmp[$key]);
            }
        }
    }
    if (
count($attachments_tmp)){
        foreach(
$attachments_tmp as $key=>$attach){
            if(
rename(XOOPS_CACHE_PATH "/" $attachments_tmp[$key][0],
                
XOOPS_ROOT_PATH "/".$xoopsModuleConfig['dir_attachments']."/".$attachments_tmp[$key][0]
            )){
                
$forumpost->setAttachment($attach[0], $attach[1], $attach[2]);
            }
        }
    }

    
$error_upload '';

    if (isset(
$_FILES['userfile']['name']) && $_FILES['userfile']['name']!=''
        
&& $topic_handler->getPermission($forum_obj$topic_status'attach')
    )
    {
        
$maxfilesize $forum_obj->getVar('attach_maxkb')*1024;
        
$uploaddir XOOPS_ROOT_PATH "/".$xoopsModuleConfig['dir_attachments'];

        
$uploader = new newbb_uploader(
            
$uploaddir,
            
$forum_obj->getVar('attach_ext'),
            
$maxfilesize
        
);

        
$uploader->setCheckMediaTypeByExt();

        if ( 
$uploader->fetchMedia$_POST['xoops_upload_file'][0]) )
        {
            
$prefix is_object($xoopsUser)?strval($xoopsUser->uid()).'_':'newbb_';
            
$uploader->setPrefix($prefix);
            if ( !
$uploader->upload() )
                
$error_upload $uploader->getErrors();
            else{
                if ( 
is_file$uploader->getSavedDestination() )){
                    
$forumpost->setAttachment($uploader->getSavedFileName(), $uploader->getMediaName(), $uploader->getMediaType());
                }
            }
        }
        else
        {
            
$error_upload $uploader->getErrors();
        }
    }

    
$postid $post_handler->insert($forumpost);
    if (!
$postid ) {
        include_once(
XOOPS_ROOT_PATH.'/header.php');
        
xoops_error('Could not insert forum post');
        
xoops_error($forumpost->getErrors());
        include_once(
XOOPS_ROOT_PATH.'/footer.php');
        exit();
    }
    
newbb_setsession("LP"time()); // Recording last post time


    
if(newbb_checkSubjectPrefixPermission($forum_obj) && !empty($_POST['subject_pre'])){
        
$subject_pre intval($_POST['subject_pre']);
        
$sbj_res $post_handler->insertnewsubject($forumpost->getVar('topic_id'), $subject_pre);
    }

    
// RMV-NOTIFY
    // Define tags for notification message
    
if($approved && !empty($xoopsModuleConfig['notification_enabled']) && !empty($isnew)){
        
$tags = array();
        
$tags['THREAD_NAME'] = $_POST['subject'];
        
$tags['THREAD_URL'] = XOOPS_URL '/modules/' $xoopsModule->dirname() . '/viewtopic.php?post_id='.$postid.'&amp;topic_id=' $forumpost->getVar('topic_id').'&amp;forum=' $forumpost->getVar('forum_id');
        
$tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' $postid;
        include_once 
'include/notification.inc.php';
        
$forum_info newbb_notify_iteminfo ('forum'$forum_obj->getVar('forum_id'));
        
$tags['FORUM_NAME'] = $forum_info['name'];
        
$tags['FORUM_URL'] = $forum_info['url'];
        
$notification_handler =& xoops_gethandler('notification');
        if (empty(
$isreply)) {
            
// Notify of new thread
            
$notification_handler->triggerEvent('forum'$forum_obj->getVar('forum_id'), 'new_thread'$tags);
        } else {
            
// Notify of new post
            
$notification_handler->triggerEvent('thread'$topic_id'new_post'$tags);
        }
        
$notification_handler->triggerEvent('global'0'new_post'$tags);
        
$notification_handler->triggerEvent('forum'$forum_obj->getVar('forum_id'), 'new_post'$tags);
        
$myts =& MyTextSanitizer::getInstance();
        
$tags['POST_CONTENT'] = $myts->stripSlashesGPC($_POST['message']);
        
$tags['POST_NAME'] = $myts->stripSlashesGPC($_POST['subject']);
        
$notification_handler->triggerEvent('global'0'new_fullpost'$tags);
        
$notification_handler->triggerEvent('forum'$forum_obj->getVar('forum_id'), 'new_fullpost'$tags);
    }

    
// If user checked notification box, subscribe them to the
    // appropriate event; if unchecked, then unsubscribe
    
if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) {
        
$notification_handler =& xoops_gethandler('notification');
        if (empty(
$_POST['notify'])) {
            
$notification_handler->unsubscribe('thread'$forumpost->getVar('topic_id'), 'new_post');
        } elseif (
$_POST['notify'] > 0) {
            
$notification_handler->subscribe('thread'$forumpost->getVar('topic_id'), 'new_post');
        }
        
// elseif($_POST['notify']<0) keep it as it is
    
}

    if(
$approved){
        if(!empty(
$xoopsModuleConfig['cache_enabled'])){
            
newbb_setsession("t".$forumpost->getVar("topic_id"), null);
        }
        
$redirect "viewtopic.php?topic_id=".$forumpost->getVar('topic_id')."&amp;post_id=".$postid."#forumpost".$postid."";
        
$message _MD_THANKSSUBMIT."<br />".$error_upload;
    }else{
        
$redirect "viewforum.php?forum=".$forumpost->getVar('forum_id');
        
$message _MD_THANKSSUBMIT."<br />"._MD_WAITFORAPPROVAL."<br />".$error_upload;
    }
    if ( 
$op == "add" ) {
        
redirect_header("polls.php?op=add&amp;forum=".$forumpost->getVar('forum_id')."&amp;topic_id=".$forumpost->getVar('topic_id')."",1,_MD_ADDPOLL);
        exit();
    }else{
        
redirect_header($redirect,2,$message);
        exit();
    }
}


if ( !empty(
$_POST['contents_upload']) ) {
    
$attachments_tmp=array();
    if (!empty(
$_POST["attachments_tmp"])){
        
$attachments_tmp=unserialize(base64_decode($_POST["attachments_tmp"]));
        if (isset(
$_POST["delete_tmp"]) && count($_POST["delete_tmp"])){
            foreach(
$_POST["delete_tmp"] as $key){
                
unlink(XOOPS_CACHE_PATH $attachments_tmp[$key][0]);
                unset(
$attachments_tmp[$key]);
            }
        }

    }

    
$error_upload '';
    if (isset(
$_FILES['userfile']['name']) && $_FILES['userfile']['name']!=''
    
)
    {
        
$maxfilesize $forum_obj->getVar('attach_maxkb')*1024;
        
$uploaddir XOOPS_CACHE_PATH;

        
$uploader = new newbb_uploader(
            
$uploaddir,
            
$forum_obj->getVar('attach_ext'),
            
$maxfilesize
        
);

        
$uploader->setCheckMediaTypeByExt();

        if ( 
$uploader->fetchMedia$_POST['xoops_upload_file'][0]) )
        {
            
$prefix is_object($xoopsUser)?strval($xoopsUser->uid()).'_':'newbb_';
            
$uploader->setPrefix($prefix);
            if ( !
$uploader->upload() )
                
$error_upload $uploader->getErrors();
            else{
                if ( 
is_file$uploader->getSavedDestination() )){
                    
$attachments_tmp[strval(time())]=array(
                        
$uploader->getSavedFileName(),
                        
$uploader->getMediaName(),
                        
$uploader->getMediaType()
                        );
                }
            }
        }
        else
        {
            
$error_upload $uploader->getErrors();
        }
   }
}

if ( !empty(
$_POST['contents_preview']) || !empty($_GET['contents_preview']) ) {
    if (!empty(
$_POST["attachments_tmp"])){
        
$attachments_tmp=unserialize(base64_decode($_POST["attachments_tmp"]));
    }

    
$myts =& MyTextSanitizer::getInstance();
    
$p_subject $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['subject']));
    
$dosmiley = empty($_POST['dosmiley']) ? 1;
    
$dohtml = empty($_POST['dohtml']) ? 1;
    
$doxcode = empty($_POST['doxcode']) ? 1;
    
$dobr = empty($_POST['dobr']) ? 1;
    
$p_message $_POST['message'];
    
$p_message $myts->previewTarea($p_message$dohtml$dosmiley$doxcode1$dobr);
    if(
$dohtml && !newbb_isAdmin($forum_obj) ) {
        
//$p_message = newbb_textFilter($p_message);
    
}

    echo 
"<table cellpadding='4' cellspacing='1' width='98%' class='outer'>";
    echo 
"<tr><td class='head'>".$p_subject."</td></tr>";
    if(isset(
$_POST['poster_name'])){
        
$p_poster_name $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['poster_name']));
        echo 
"<tr><td>".$p_poster_name."</td></tr>";
    }
    echo 
"<tr><td><br />".$p_message."<br /></td></tr></table>";
}

if ( !empty(
$_POST['contents_upload']) || !empty($_POST['contents_preview']) || !empty($_GET['contents_preview']) || !empty($_POST['editor'])) 
{

    echo 
"<br />";

    
$editor = empty($_POST['editor']) ? "" $_POST['editor'];
    
$dosmiley = empty($_POST['dosmiley']) ? 1;
    
$dohtml = empty($_POST['dohtml']) ? 1;
    
$doxcode = empty($_POST['doxcode']) ? 1;
    
$dobr = empty($_POST['dobr']) ? 1;
    
$subject_pre = (isset($_POST['subject_pre']))?$_POST['subject_pre']:'';
    
$subject $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['subject']));
    
$message $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['message']));
    
$poster_name = isset($_POST['poster_name'])?$myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['poster_name'])):'';
    
$hidden = isset($_POST['hidden'])? $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['hidden'])):'';
    
$notify = @intval($_POST['notify']);
    
$attachsig = !empty($_POST['attachsig']) ? 0;
    
$isreply = !empty($_POST['isreply']) ? 0;
    
$isedit = !empty($_POST['isedit']) ? 0;
    
$icon = (!empty($_POST['icon']) && is_file(XOOPS_ROOT_PATH "/images/subject/" $_POST['icon']) ) ? $_POST['icon'] : '';
    
$view_require = isset($_POST['view_require']) ? $_POST['view_require'] : '';
    
$post_karma = ( ($view_require == 'require_karma') && isset($_POST['post_karma']) )? intval($_POST['post_karma']) : ;
    
$require_reply = ($view_require == 'require_reply')?1:0;

    if(empty(
$_POST['contents_upload'])) $contents_preview 1;
    
$attachments=$forumpost->getAttachment();
    include 
'include/forumform.inc.php';
}

include 
XOOPS_ROOT_PATH.'/footer.php';
?>

大侠帮我看看有什么问题么?
谢谢,急呀!!!!
问题就是 不输入验证码也可以通过。

2007/8/19 18:31
工具箱 短消息 Email PDF 书签 打印 举报 回顶部


(1) 2 3 »

  [无发表权] 请登录或者注册


不可查看帖子。
不可发帖。
不可回复。
不可编辑自己的帖子。
不可删除自己的帖子。
不可发起投票调查。
不可在投票调查中投票。
不可上传附件。
不可不经审核直接发帖。
不可使用主题类别。
不可使用HTML语法。
不可使用签名档。

[高级搜索]