仿站咨询QQ:2587483189

手机微信同号:15850888840

帝国实现给留言加上验证码

第一步 修改留言本模板 加入
<input name="key" type="text" id="username3" size="10"><img src=/e/showkey/?ecms />
第二步
修改eenewsgbookfun.php文件

<?php
//发表留言
function AddGbook($add){
        global $empire,$dbtbpre,$level_r;
        CheckCanPostUrl();//验证来源
        $bid=(int)getcvar('gbookbid');
        if(empty($bid))
        {
                $bid=intval($add[bid]);
        }
        $name=RepPostStr(trim($add[name]));
        $email=RepPostStr($add[email]);
        $call=RepPostStr($add[call]);
        $lytext=RepPostStr($add[lytext]);
        if(empty($bid)||empty($name)||empty($email)||!trim($lytext))
        {printerror("EmptyGbookname","history.go(-1)",1);}
        $checkplkey=getcvar('checkplkey');  //留言板验证码aliang,2:08 2007-12-31
        if($_POST['key']<>$checkplkey||empty($checkplkey))  //留言板验证码aliang,2:08 2007-12-31
        {printerror("FailKey","history.go(-1)",1);}  //留言板验证码aliang,2:08 2007-12-31
       
             $lasttime=getcvar('lastgbooktime');
 

  • 上一篇:如何让修改帝国cms的系统提示页
  • 下一篇:帝国CMS实现文章和图片随即调用效果
  • 来源:未知//所属分类: 帝国仿站 /更新时间:2011-04-24
    相关仿站教程