公告:魔扣目录网为广大站长提供免费收录网站服务,提交前请做好本站友链:【 网站目录:https://www.morko.net 】, 免友链快审服务(50元/站),

点击这里在线咨询客服
新站提交
  • 网站:51998
  • 待审:31
  • 小程序:12
  • 文章:1030137
  • 会员:747

1、在数据库的前缀名_enewsgbook表中添加您要显示的字段,比如我要加标题"gtitle"字段,可以用工具添加,也可以执行sql添加:ALTER TABLE 前缀名_enewsgbook ADD gtitle VARCHAR(100);

2、修改e/enews/gbookfun.php
第11行左右:

$name=RepPostStr(trim($add[name]));       
 $email=RepPostStr($add[email]);        
$call=RepPostStr($add[call]);        
$lytext=RepPostStr($add[lytext]);        
$gtitle=RepPostStr(trim($add[gtitle]));  
//增加的gtitle       
 if(empty($bid)||empty($gtitle)||empty($name)||empty($email)||!trim($lytext))  //gtitle字段检测不允许为空

第56行左右
$sql=$empire->query("insert into {$dbtbpre}enewsgbook(name,gtitle,email,`call`,lytime,lytext,retext,bid,ip,checked,userid,username) values('$name','$gtitle','$email','$call','$lytime','$lytext','','$bid','$ip','$br[checked]','$userid','$username');"); //插入字段记录

3、修改e/data/template/gbooktemp.txt
第50行左右
$query="select lyid,name,gtitle,email,`call`,lytime,lytext,retext from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";   //查询字段中添加gtitle

4、修改e/class/t_functions.php
第2106行左右
$listtemp=str_replace("[!--lyid--]",$r['lyid'],$listtemp);//id    $listtemp=str_replace("[!--lytext--]",nl2br($r['lytext']),$listtemp);//留言内容    $listtemp=str_replace("[!--retext--]",nl2br($r['retext']),$listtemp);//回复    $listtemp=str_replace("[!--lytime--]",format_datetime($r['lytime'],$formatdate),$listtemp);    $listtemp=str_replace("[!--name--]",$r['name'],$listtemp);    $listtemp=str_replace("[!--gtitle--]",$r['gtitle'],$listtemp);

5、修改e/class/functions.php
第2934行左右添加
$listtemp_center=str_replace("[!--lyid--]","<?=$r[lyid]?>",$listtemp_center);   $listtemp_center=str_replace("[!--name--]","<?=$r[name]?>",$listtemp_center);   $listtemp_center=str_replace("[!--gtitle--]","<?=$r[gtitle]?>",$listtemp_center);

6、然后修改留言模板
(1)加入必填项: <input name="gtitle" type="text" id="gtitle" />
(2)加入验证码: <input type=text name=key><img src="/e/ShowKey/?v=gbook" onClick="this.src= this.src +'&xx='+Math.random()" alt="看不清楚,点击刷新">
(3)后台开启留言验证: 系统参数修改——信息设置 —留言验证码

至此,留言字段添加成功。

分享到:
标签:字段 帝国 验证码
用户无头像

网友整理

注册时间:

网站:5 个   小程序:0 个  文章:12 篇

  • 51998

    网站

  • 12

    小程序

  • 1030137

    文章

  • 747

    会员

赶快注册账号,推广您的网站吧!
最新入驻小程序

数独大挑战2018-06-03

数独一种数学游戏,玩家需要根据9

答题星2018-06-03

您可以通过答题星轻松地创建试卷

全阶人生考试2018-06-03

各种考试题,题库,初中,高中,大学四六

运动步数有氧达人2018-06-03

记录运动步数,积累氧气值。还可偷

每日养生app2018-06-03

每日养生,天天健康

体育训练成绩评定2018-06-03

通用课目体育训练成绩评定