@@ -22,7 +22,7 @@ $safequestions[7] = '你最喜欢的歌曲是什么?'; | |||
function GetSafequestion($selid=0,$formname='safequestion') | |||
{ | |||
global $safequestions; | |||
$safequestions_form = "<select name='$formname' id='$formname'>"; | |||
$safequestions_form = "<select class='form-control' name='$formname' id='$formname'>"; | |||
foreach($safequestions as $k=>$v) | |||
{ | |||
if($k==$selid) $safequestions_form .= "<option value='$k' selected>$v</option>\r\n"; | |||
@@ -1,6 +1,5 @@ | |||
<?php | |||
if(!defined('DEDEINC')) | |||
{ | |||
if (!defined('DEDEINC')) { | |||
exit("Request Error!"); | |||
} | |||
/** | |||
@@ -12,7 +11,7 @@ if(!defined('DEDEINC')) | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
/*>>dede>> | |||
<name>会员评论内容</name> | |||
<type>全局标记</type> | |||
@@ -32,48 +31,65 @@ if(!defined('DEDEINC')) | |||
<iterm>infolen:评论长度</iterm> | |||
</attributes> | |||
>>dede>>*/ | |||
function lib_feedback(&$ctag,&$refObj) | |||
function lib_feedback(&$ctag, &$refObj) | |||
{ | |||
global $dsql; | |||
$attlist="row|12,titlelen|24,infolen|100"; | |||
FillAttsDefault($ctag->CAttribute->Items,$attlist); | |||
$attlist = "row|12,titlelen|24,infolen|100,orderby|"; | |||
FillAttsDefault($ctag->CAttribute->Items, $attlist); | |||
extract($ctag->CAttribute->Items, EXTR_SKIP); | |||
$innertext = trim($ctag->GetInnerText()); | |||
$totalrow = $row; | |||
$revalue = ''; | |||
if(empty($innertext)) | |||
{ | |||
if (empty($innertext)) { | |||
$innertext = GetSysTemplets('tag_feedback.htm'); | |||
} | |||
$wsql = " where ischeck=1 "; | |||
$equery = "SELECT * FROM `#@__feedback` $wsql ORDER BY id DESC LIMIT 0 , $totalrow"; | |||
$order = " ORDER BY id DESC"; | |||
if (!empty($orderby)) { | |||
switch ($orderby) { | |||
case 'good': | |||
$order = " ORDER BY good DESC"; | |||
break; | |||
case 'time': | |||
$order = " ORDER BY dtime DESC"; | |||
break; | |||
default: | |||
$order = " ORDER BY id DESC"; | |||
break; | |||
} | |||
} | |||
$wsql = " WHERE fb.ischeck=1 AND fb.fid=0 "; | |||
if (get_class($refObj) === "Archives" && isset($refObj->Fields["id"])) { | |||
$wsql .= " AND fb.aid='{$refObj->Fields["id"]}'"; | |||
} | |||
$equery = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb | |||
LEFT JOIN `#@__member` mb on mb.mid = fb.mid $wsql $order LIMIT 0 , $totalrow"; | |||
$ctp = new DedeTagParse(); | |||
$ctp->SetNameSpace('field','[',']'); | |||
$ctp->SetNameSpace('field', '[', ']'); | |||
$ctp->LoadSource($innertext); | |||
$dsql->Execute('fb',$equery); | |||
while($arr=$dsql->GetArray('fb')) | |||
{ | |||
$arr['title'] = cn_substr($arr['arctitle'],$titlelen); | |||
$arr['msg'] = jsTrim(Html2Text($arr['msg']),$infolen); | |||
foreach($ctp->CTags as $tagid=>$ctag) | |||
{ | |||
if(!empty($arr[$ctag->GetName()])) | |||
{ | |||
$ctp->Assign($tagid,$arr[$ctag->GetName()]); | |||
} | |||
$dsql->Execute('fb', $equery); | |||
while ($arr = $dsql->GetArray('fb')) { | |||
$arr['face'] = empty($arr['mface']) ? $GLOBALS['cfg_cmspath'] . '/static/img/avatar.png' : $arr['mface']; | |||
$arr['title'] = cn_substr($arr['arctitle'], $titlelen); | |||
$arr['msg'] = jsTrim(Html2Text($arr['msg']), $infolen); | |||
foreach ($ctp->CTags as $tagid => $ctag) { | |||
$ctp->Assign($tagid, $arr[$ctag->GetName()]); | |||
} | |||
$revalue .= $ctp->GetResult(); | |||
} | |||
return $revalue; | |||
} | |||
function jsTrim($str,$len) | |||
function jsTrim($str, $len) | |||
{ | |||
$str = preg_replace("/{quote}(.*){\/quote}/is",'',$str); | |||
$str = str_replace('<br/>',' ',$str); | |||
$str = cn_substr($str,$len); | |||
$str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); | |||
$str = str_replace('<br/>', ' ', $str); | |||
$str = cn_substr($str, $len); | |||
$str = preg_replace("#['\"\r\n]#", "", $str); | |||
return $str; | |||
} | |||
} |
@@ -593,7 +593,6 @@ INSERT INTO `#@__store_groups` VALUES('1','交友','0','0','2'), | |||
INSERT INTO `#@__sys_set` VALUES('1','nature','性格外向,性格内向,活泼开朗,沉默寡言,幽默,稳重,轻浮,冲动,坚强,脆弱,幼稚,成熟,能说会道,自私,真诚,独立,依赖,任性,自负,自卑,温柔体贴,神经质,拜金,小心翼翼,暴躁,倔强,逆来顺受,不拘小节,婆婆妈妈,交际广泛,豪爽,害羞,狡猾善变,耿直,虚伪,乐观向上,悲观消极,郁郁寡欢,孤僻,难以琢磨,胆小怕事,敢做敢当,助人为乐,老实,守旧,敏感,迟钝,武断,果断,优柔寡断,暴力倾向,刻薄,损人利己,附庸风雅,时喜时悲,患得患失,快言快语,豪放不羁,多愁善感,循规蹈矩'), | |||
('2','language','普通话,上海话,广东话,英语,日语,韩语,法语,意大利语,德语,西班牙语,俄语,阿拉伯语'); | |||
INSERT INTO `#@__member_group` VALUES('1','朋友','0'); | |||
INSERT INTO `#@__vote` VALUES('1','你是从哪儿得知本站的?','1266336000','1584547200','0','0','1','1','0','0','<v:note id="1" count="1">朋友介绍</v:note>rn<v:note id="2" count="0">门户网站的搜索引擎</v:note>rn<v:note id="3" count="2">Google或百度搜索</v:note>rn<v:note id="4" count="2">别的网站上的链接</v:note>rn<v:note id="5" count="1">其它途径</v:note>rn'); | |||
@@ -3950,7 +3949,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('3','cfg_cookie_encode','cookie加密码','2','string',''), | |||
('4','cfg_indexurl','网页主页链接','1','string','/'), | |||
('5','cfg_backup_dir','数据备份目录(在data目录内)','2','string','backupdata'), | |||
('6','cfg_indexname','主页链接名','1','string','主页'), | |||
('6','cfg_indexname','主页链接名','1','string','首页'), | |||
('7','cfg_webname','网站名称','1','string','我的网站'), | |||
('8','cfg_adminemail','网站发信EMAIL','2','string','admin@dedecms.com'), | |||
('9','cfg_html_editor','Html编辑器(ckeditor,需要fck的用户可以去官网下载)','2','string','ckeditor'), | |||
@@ -3965,7 +3964,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('18','cfg_specnote','专题的最大节点数','2','number','6'), | |||
('19','cfg_list_symbol','栏目位置的间隔符号','2','string',' > '), | |||
('20','cfg_notallowstr','禁用词语(系统将直接停止用户动作)<br/>用|分开,但不要在结尾加|','5','bstring','非典|艾滋病|阳痿'), | |||
('21','cfg_feedbackcheck','评论及留言(是/否)需审核','5','bool','N'), | |||
('21','cfg_feedbackcheck','评论及留言(是/否)需审核','5','bool','Y'), | |||
('22','cfg_keyword_replace','关键字替换(是/否)使用本功能会影响HTML生成速度','2','bool','Y'), | |||
('23','cfg_fck_xhtml','编辑器(是/否)使用XHTML','1','bool','N'), | |||
('24','cfg_df_style','模板默认风格','1','string','default'), | |||
@@ -3985,7 +3984,6 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('36','cfg_ftp_pwd','FTP密码','2','string',''), | |||
('37','cfg_ftp_root','网站根在FTP中的目录','2','string','/'), | |||
('38','cfg_ftp_mkdir','是否强制用FTP创建目录','2','bool','N'), | |||
('39','cfg_feedback_ck','评论加验证码重确认','5','bool','Y'), | |||
('40','cfg_list_son','上级列表是否包含子类内容','6','bool','Y'), | |||
('41','cfg_mb_open','是否开启会员功能','4','bool','N'), | |||
('42','cfg_mb_album','是否开启会员图集功能','4','bool','Y'), | |||
@@ -4036,7 +4034,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('730','cfg_sendfb_scores','参与评论可获积分','5','number','3'), | |||
('92','cfg_search_max','最大搜索检查文档数','6','number','50000'), | |||
('93','cfg_search_maxrc','最大返回搜索结果数','6','number','300'), | |||
('94','cfg_search_time','搜索间隔时间(秒/对网站所有用户)','6','number','3'), | |||
('94','cfg_search_time','搜索间隔时间(秒/IP限制)','6','number','3'), | |||
('95','cfg_baidunews_limit','百度新闻xml更新新闻数量 最大100','8','string','100'), | |||
('223','cfg_smtp_port','smtp服务器端口','2','string','25'), | |||
('221','cfg_sendmail_bysmtp','是否启用smtp方式发送邮件','2','bool','Y'), | |||
@@ -4097,7 +4095,8 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('758','cfg_memcache_mc_oth','附加memcache缓存服务器地址',6,'string',''), | |||
('759', 'cfg_cross_sectypeid', '支持交叉栏目显示副栏目内容', '7', 'bool', 'N'), | |||
('760', 'cfg_digg_update', '顶踩缓存异步更新间隔(0为不缓存)', '6', 'number', '0'), | |||
('761', 'cfg_feedback_guest', '是否允许匿名评论', '5', 'bool', 'N') | |||
('761', 'cfg_feedback_guest', '是否允许匿名评论', '5', 'bool', 'N'), | |||
('762', 'cfg_feedback_msglen', '评论内容字数限定', 5, 'number', '200') | |||
; | |||
INSERT INTO `#@__sys_module` VALUES (1, '0cce60bc0238aa03804682c801584991', '百度新闻', '', '', 0, ''), | |||
@@ -442,6 +442,15 @@ CREATE TABLE `#@__feedback` ( | |||
KEY `aid` (`aid`,`ischeck`,`mid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__feedback_goodbad`; | |||
CREATE TABLE `#@__feedback_goodbad` ( | |||
`fgid` INT(11) NOT NULL AUTO_INCREMENT, | |||
`mid` INT(11) NOT NULL DEFAULT '0', | |||
`fid` INT(11) NOT NULL DEFAULT '0', | |||
`fgtype` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '0:good 1:bad', | |||
PRIMARY KEY (`fgid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__flink`; | |||
CREATE TABLE `#@__flink` ( | |||
`id` smallint(5) unsigned NOT NULL auto_increment, | |||
@@ -587,30 +596,6 @@ CREATE TABLE `#@__member_flink` ( | |||
PRIMARY KEY (`aid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_friends`; | |||
CREATE TABLE `#@__member_friends` ( | |||
`id` int(10) unsigned NOT NULL auto_increment, | |||
`fid` mediumint(8) unsigned NOT NULL default '0', | |||
`floginid` char(20) NOT NULL default '', | |||
`funame` char(36) NOT NULL default '', | |||
`mid` mediumint(8) NOT NULL default '0', | |||
`addtime` int(10) unsigned NOT NULL default '0', | |||
`ftype` tinyint(4) NOT NULL default '0', | |||
`groupid` int(8) NOT NULL default '1', | |||
`description` varchar(200) default NULL, | |||
PRIMARY KEY (`id`), | |||
KEY `fid` (`fid`,`mid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_group`; | |||
CREATE TABLE `#@__member_group` ( | |||
`id` int(10) NOT NULL auto_increment, | |||
`groupname` varchar(50) NOT NULL, | |||
`mid` int(8) NOT NULL, | |||
PRIMARY KEY (`id`), | |||
KEY `id` (`id`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_guestbook`; | |||
CREATE TABLE `#@__member_guestbook` ( | |||
`aid` int(10) unsigned NOT NULL auto_increment, | |||
@@ -640,19 +625,6 @@ CREATE TABLE `#@__member_model` ( | |||
PRIMARY KEY (`id`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_msg`; | |||
CREATE TABLE `#@__member_msg` ( | |||
`id` int(10) unsigned NOT NULL auto_increment, | |||
`mid` mediumint(8) unsigned NOT NULL default '0', | |||
`userid` char(20) NOT NULL default '', | |||
`ip` char(15) NOT NULL default '', | |||
`ischeck` smallint(6) NOT NULL default '0', | |||
`dtime` int(10) unsigned NOT NULL default '0', | |||
`msg` text, | |||
PRIMARY KEY (`id`), | |||
KEY `id` (`ischeck`,`mid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_operation`; | |||
CREATE TABLE `#@__member_operation` ( | |||
`aid` int(11) NOT NULL auto_increment, | |||
@@ -791,21 +763,6 @@ CREATE TABLE `#@__member_type` ( | |||
PRIMARY KEY (`aid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__member_vhistory`; | |||
CREATE TABLE `#@__member_vhistory` ( | |||
`id` int(10) NOT NULL auto_increment, | |||
`mid` mediumint(8) unsigned NOT NULL default '0', | |||
`loginid` char(20) NOT NULL default '', | |||
`vid` mediumint(8) unsigned NOT NULL default '0', | |||
`vloginid` char(20) NOT NULL default '', | |||
`count` smallint(5) unsigned NOT NULL default '0', | |||
`vip` char(15) NOT NULL default '', | |||
`vtime` int(10) unsigned NOT NULL default '0', | |||
PRIMARY KEY (`id`), | |||
KEY `vtime` (`vtime`), | |||
KEY `mid` (`mid`,`vid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__moneycard_record`; | |||
CREATE TABLE `#@__moneycard_record` ( | |||
`aid` int(11) NOT NULL auto_increment, | |||
@@ -969,6 +926,13 @@ CREATE TABLE `#@__search_keywords` ( | |||
PRIMARY KEY (`aid`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__search_limits`; | |||
CREATE TABLE `#@__search_limits` ( | |||
`ip` VARCHAR(200) NOT NULL, | |||
`searchtime` INT(11) NULL DEFAULT NULL, | |||
PRIMARY KEY (`ip`) | |||
) TYPE=MyISAM; | |||
DROP TABLE IF EXISTS `#@__sgpage`; | |||
CREATE TABLE `#@__sgpage` ( | |||
`aid` smallint(5) unsigned NOT NULL auto_increment, | |||
@@ -54,7 +54,7 @@ | |||
<p>3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 </p> | |||
<p>4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<strong>二、协议规定的约束和限制 </strong> | |||
<p>1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 <a href="http://bbs.dedecms.com" target="_blank">bbs.dedecms.com</a> 了解最新说明。</p> | |||
<p>1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登录 <a href="http://bbs.dedecms.com" target="_blank">bbs.dedecms.com</a> 了解最新说明。</p> | |||
<p>2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。</p> | |||
<p>3、不管你的网站是否整体使用 DedeCMS ,还是部份栏目使用 DedeCMS,在你使用了 DedeCMS 的网站主页上必须加上 DedeCMS 官方网址(<a href="http://www.dedecms.com" target="_blank">www.dedecms.com</a>)的链接。</p> | |||
<p>4、未经官方许可,禁止在 DedeCMS 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。</p> | |||
@@ -1,4 +1,5 @@ | |||
<?php | |||
/** | |||
* | |||
* 评论 | |||
@@ -9,107 +10,106 @@ | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | |||
if($cfg_feedback_forbid=='Y') exit('系统已经禁止评论功能!'); | |||
require_once(DEDEINC."/filter.inc.php"); | |||
if(!isset($action)) | |||
{ | |||
$action = ''; | |||
} | |||
//兼容旧的JS代码 | |||
if($action == 'good' || $action == 'bad') | |||
{ | |||
if(!empty($aid)) $id = $aid; | |||
require_once(dirname(__FILE__).'/digg_ajax.php'); | |||
require_once(dirname(__FILE__) . "/../include/common.inc.php"); | |||
if ($cfg_feedback_forbid == 'Y') { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "系统已经禁止评论功能", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
require_once(DEDEINC . "/filter.inc.php"); | |||
if (!isset($action)) { | |||
$action = ''; | |||
} | |||
$msg = isset($msg) ? $msg : ""; | |||
$validate = isset($validate) ? $validate : ""; | |||
$pwd = isset($pwd) ? $pwd : ""; | |||
$comtype = isset($comtype) ? $comtype : ""; | |||
$good = isset($good) ? intval($good) : 0; | |||
$cfg_formmember = isset($cfg_formmember) ? true : false; | |||
$ischeck = $cfg_feedbackcheck=='Y' ? 0 : 1; | |||
$ischeck = $cfg_feedbackcheck == 'Y' ? 0 : 1; | |||
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | |||
$fid = (isset($fid) && is_numeric($fid)) ? $fid : 0; | |||
if(empty($aid) && empty($fid)) | |||
{ | |||
ShowMsg('文档id不能为空!','-1'); | |||
$fid = (isset($fid) && is_numeric($fid)) ? $fid : 0; // 用来标记回复评论的变量 | |||
if (empty($aid) && empty($fid)) { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "文档ID不能为空", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
include_once(DEDEINC."/memberlogin.class.php"); | |||
include_once(DEDEINC . "/memberlogin.class.php"); | |||
$cfg_ml = new MemberLogin(); | |||
if($action=='goodfb') | |||
{ | |||
AjaxHead(); | |||
$fid = intval($fid); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET good = good+1 WHERE id='$fid' "); | |||
$row = $dsql->GetOne("SELECT good FROM `#@__feedback` WHERE id='$fid' "); | |||
echo "<a onclick=\"postBadGood('goodfb',{$aid})\">支持</a>[{$row['good']}]"; | |||
exit(); | |||
} | |||
else if($action=='badfb') | |||
{ | |||
AjaxHead(); | |||
$fid = intval($fid); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET bad = bad+1 WHERE id='$fid' "); | |||
$row = $dsql->GetOne("SELECT bad FROM `#@__feedback` WHERE id='$fid' "); | |||
echo "<a onclick=\"postBadGood('badfb',{$aid})\">反对</a>[{$row['bad']}]"; | |||
exit(); | |||
} | |||
//查看评论 | |||
/* | |||
function __ViewFeedback(){ } | |||
*/ | |||
//----------------------------------- | |||
else if($action=='' || $action=='show') | |||
{ | |||
if ($action == '' || $action == 'show') { | |||
//读取文档信息 | |||
$arcRow = GetOneArchive($aid); | |||
if(empty($arcRow['aid'])) | |||
{ | |||
ShowMsg('无法查看未知文档的评论!','-1'); | |||
if (empty($arcRow['aid'])) { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "无法查看未知文档的评论", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
extract($arcRow, EXTR_SKIP); | |||
include_once(DEDEINC.'/datalistcp.class.php'); | |||
$dlist = new DataListCP(); | |||
$dlist->pageSize = 20; | |||
if(empty($ftype) || ($ftype!='good' && $ftype!='bad' && $ftype!='feedback')) | |||
{ | |||
$ftype = ''; | |||
$where_sql = "WHERE 1=1"; | |||
if (!empty($fid)) { | |||
$where_sql .= " AND fb.fid={$fid}"; | |||
} | |||
if (!empty($aid)) { | |||
$where_sql .= " AND fb.aid={$aid}"; | |||
} | |||
$wquery = $ftype!='' ? " And ftype like '$ftype' " : ''; | |||
helper('smiley'); | |||
//评论内容列表 | |||
// 调用20条热评 | |||
$querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb | |||
LEFT JOIN `#@__member` mb on mb.mid = fb.mid | |||
WHERE fb.aid='$aid' AND fb.ischeck='1' $wquery ORDER BY fb.id desc"; | |||
$dlist->SetParameter('aid',$aid); | |||
$dlist->SetParameter('action','show'); | |||
$dlist->SetTemplate(DEDETEMPLATE.'/plus/feedback_templet.htm'); | |||
$dlist->SetSource($querystring); | |||
$dlist->Display(); | |||
exit(); | |||
LEFT JOIN `#@__member` mb on mb.mid = fb.mid $where_sql AND fb.ischeck='1' ORDER BY fb.good DESC"; | |||
$dsql->Execute('fb', $querystring . " LIMIT 20 "); | |||
$data = array(); | |||
while ($row = $dsql->GetArray('fb')) { | |||
$row['face'] = empty($row['mface']) ? $GLOBALS['cfg_cmspath'] . '/static/img/avatar.png' : $row['mface']; | |||
$row['dtimestr'] = MyDate('Y-m-d', $row['dtime']); | |||
unset($row['ip']); | |||
$data[] = $row; | |||
} | |||
echo json_encode(array( | |||
"code" => 200, | |||
"msg" => "", | |||
"data" => $data, | |||
)); | |||
exit; | |||
} | |||
//引用评论 | |||
//------------------------------------ | |||
/* | |||
function __Quote(){ } | |||
*/ | |||
else if($action=='quote') | |||
{ | |||
$type = empty($type)? '' : 'ajax'; | |||
if($type == 'ajax') | |||
{ | |||
AjaxHead(); | |||
} | |||
*/ else if ($action == 'quote') { | |||
AjaxHead(); | |||
$row = $dsql->GetOne("SELECT * FROM `#@__feedback` WHERE id ='$fid'"); | |||
require_once(DEDEINC.'/dedetemplate.class.php'); | |||
require_once(DEDEINC . '/dedetemplate.class.php'); | |||
$dtp = new DedeTemplate(); | |||
$tplfile = $type == ''? DEDETEMPLATE.'/plus/feedback_quote.htm' : DEDETEMPLATE.'/plus/feedback_quote_ajax.htm'; | |||
$tplfile = $type == '' ? DEDETEMPLATE . '/plus/feedback_quote.htm' : DEDETEMPLATE . '/plus/feedback_quote_ajax.htm'; | |||
$dtp->LoadTemplate($tplfile); | |||
$dtp->Display(); | |||
exit(); | |||
@@ -118,194 +118,183 @@ else if($action=='quote') | |||
//------------------------------------ | |||
/* | |||
function __SendFeedback(){ } | |||
*/ | |||
else if($action=='send') | |||
{ | |||
*/ else if ($action == 'send') { | |||
//读取文档信息 | |||
$arcRow = GetOneArchive($aid); | |||
if((empty($arcRow['aid']) || $arcRow['notpost']=='1') && empty($fid)) | |||
{ | |||
ShowMsg('无法对该文档发表评论!','-1'); | |||
if ((empty($arcRow['aid']) || $arcRow['notpost'] == '1') && empty($fid)) { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "无法对该文档发表评论", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
//是否加验证码重确认 | |||
if(empty($isconfirm)) | |||
{ | |||
$isconfirm = ''; | |||
} | |||
if($isconfirm!='yes' && $cfg_feedback_ck=='Y') | |||
{ | |||
extract($arcRow, EXTR_SKIP); | |||
require_once(DEDEINC.'/dedetemplate.class.php'); | |||
$dtp = new DedeTemplate(); | |||
$dtp->LoadTemplate(DEDETEMPLATE.'/plus/feedback_confirm.htm'); | |||
$dtp->Display(); | |||
exit(); | |||
} | |||
//检查验证码 | |||
if(preg_match("/4/",$safe_gdopen)){ | |||
$validate = isset($validate) ? strtolower(trim($validate)) : ''; | |||
//如果没有登录,则需要检查验证码 | |||
if (!$cfg_ml->IsLogin()) { | |||
if ($feedbacktype === 'good') { | |||
// 未登录点good不进行数据库记录 | |||
echo json_encode(array( | |||
"code" => 200, | |||
"msg" => "", | |||
"data" => $good + 1, | |||
)); | |||
exit(); | |||
} | |||
$svali = GetCkVdValue(); | |||
if(strtolower($validate)!=$svali || $svali=='') | |||
{ | |||
ResetVdValue(); | |||
ShowMsg('验证码错误!', '-1'); | |||
if (strtolower($validate) != $svali || $svali == '') { | |||
// ResetVdValue(); | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "验证码错误", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
} | |||
//检查用户登录 | |||
if(empty($notuser)) | |||
{ | |||
$notuser=0; | |||
if (empty($notuser)) { | |||
$notuser = 0; | |||
} | |||
if ($cfg_feedback_guest == 'N' && $cfg_ml->M_ID < 1) { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "管理员禁用了游客评论", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
if($cfg_feedback_guest == 'N' && $cfg_ml->M_ID < 1) | |||
{ | |||
ShowMsg('管理员禁用了游客评论!','-1'); | |||
exit(); | |||
} | |||
//匿名发表评论 | |||
if($notuser==1) | |||
{ | |||
if ($notuser == 1) { | |||
$username = $cfg_ml->M_ID > 0 ? '匿名' : '游客'; | |||
} | |||
//已登录的用户 | |||
else if($cfg_ml->M_ID > 0) | |||
{ | |||
else if ($cfg_ml->M_ID > 0) { | |||
$username = $cfg_ml->M_UserName; | |||
} | |||
//用户身份验证 | |||
else | |||
{ | |||
if($username!='' && $pwd!='') | |||
{ | |||
$rs = $cfg_ml->CheckUser($username,$pwd); | |||
if($rs==1) | |||
{ | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='".time()."',loginip='".GetIP()."' WHERE mid='{$cfg_ml->M_ID}'; "); | |||
} | |||
else | |||
{ | |||
else { | |||
if ($username != '' && $pwd != '') { | |||
$rs = $cfg_ml->CheckUser($username, $pwd); | |||
if ($rs == 1) { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET logintime='" . time() . "',loginip='" . GetIP() . "' WHERE mid='{$cfg_ml->M_ID}'; "); | |||
} else { | |||
$username = '游客'; | |||
} | |||
} | |||
else | |||
{ | |||
} else { | |||
$username = '游客'; | |||
} | |||
} | |||
$ip = GetIP(); | |||
$dtime = time(); | |||
//检查评论间隔时间; | |||
if(!empty($cfg_feedback_time)) | |||
{ | |||
//检查最后发表评论时间,如果未登陆判断当前IP最后评论时间 | |||
if($cfg_ml->M_ID > 0) | |||
{ | |||
if (!empty($cfg_feedback_time)) { | |||
//检查最后发表评论时间,如果未登录判断当前IP最后评论时间 | |||
if ($cfg_ml->M_ID > 0) { | |||
$where = "WHERE `mid` = '$cfg_ml->M_ID'"; | |||
} | |||
else | |||
{ | |||
} else { | |||
$where = "WHERE `ip` = '$ip'"; | |||
} | |||
$row = $dsql->GetOne("SELECT dtime FROM `#@__feedback` $where ORDER BY `id` DESC "); | |||
if(is_array($row) && $dtime - $row['dtime'] < $cfg_feedback_time) | |||
{ | |||
if (is_array($row) && $dtime - $row['dtime'] < $cfg_feedback_time) { | |||
ResetVdValue(); | |||
ShowMsg('管理员设置了评论间隔时间,请稍等休息一下!','-1'); | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "管理员设置了评论间隔时间,请稍等休息一下", | |||
"data" => null, | |||
)); | |||
exit(); | |||
} | |||
} | |||
if(empty($face)) | |||
{ | |||
if (empty($face)) { | |||
$face = 0; | |||
} | |||
$face = intval($face); | |||
$typeid = (isset($typeid) && is_numeric($typeid)) ? intval($typeid) : 0; | |||
extract($arcRow, EXTR_SKIP); | |||
$msg = cn_substrR(TrimMsg($msg), 1000); | |||
$msg = cn_substrR(TrimMsg($msg), $cfg_feedback_msglen); | |||
$username = cn_substrR(HtmlReplace($username, 2), 20); | |||
if(empty($feedbacktype) || ($feedbacktype!='good' && $feedbacktype!='bad')) | |||
{ | |||
if (empty($feedbacktype) || ($feedbacktype != 'good' && $feedbacktype != 'bad')) { | |||
$feedbacktype = 'feedback'; | |||
} | |||
//保存评论内容 | |||
if($comtype == 'comments') | |||
{ | |||
if ($comtype == 'comments') { | |||
$arctitle = addslashes($title); | |||
$typeid = intval($typeid); | |||
$ischeck = intval($ischeck); | |||
$feedbacktype = preg_replace("#[^0-9a-z]#i", "", $feedbacktype); | |||
if($msg!='') | |||
{ | |||
$typeid = intval($typeid); | |||
$ischeck = intval($ischeck); | |||
$feedbacktype = preg_replace("#[^0-9a-z]#i", "", $feedbacktype); | |||
if ($msg != '') { | |||
$inquery = "INSERT INTO `#@__feedback`(`aid`,`typeid`,`username`,`arctitle`,`ip`,`ischeck`,`dtime`, `mid`,`bad`,`good`,`ftype`,`face`,`msg`) | |||
VALUES ('$aid','$typeid','$username','$arctitle','$ip','$ischeck','$dtime', '{$cfg_ml->M_ID}','0','0','$feedbacktype','$face','$msg'); "; | |||
$rs = $dsql->ExecuteNoneQuery($inquery); | |||
if(!$rs) | |||
{ | |||
ShowMsg(' 发表评论错误! ', '-1'); | |||
if (!$rs) { | |||
echo json_encode(array( | |||
"code" => -1, | |||
"msg" => "发表评论错误", | |||
"data" => null, | |||
)); | |||
//echo $dsql->GetError(); | |||
exit(); | |||
} | |||
} | |||
} | |||
//引用回复 | |||
elseif ($comtype == 'reply') | |||
{ | |||
$row = $dsql->GetOne("SELECT * FROM `#@__feedback` WHERE id ='$fid'"); | |||
$arctitle = addslashes($row['arctitle']); | |||
$aid =$row['aid']; | |||
$msg = $quotemsg.$msg; | |||
$msg = HtmlReplace($msg, 2); | |||
$inquery = "INSERT INTO `#@__feedback`(`aid`,`typeid`,`username`,`arctitle`,`ip`,`ischeck`,`dtime`,`mid`,`bad`,`good`,`ftype`,`face`,`msg`) | |||
VALUES ('$aid','$typeid','$username','$arctitle','$ip','$ischeck','$dtime','{$cfg_ml->M_ID}','0','0','$feedbacktype','$face','$msg')"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
} | |||
if($feedbacktype=='bad') | |||
{ | |||
if ($feedbacktype == 'bad') { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores-{cfg_feedback_sub},badpost=badpost+1,lastpost='$dtime' WHERE id='$aid' "); | |||
} | |||
else if($feedbacktype=='good') | |||
{ | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores+{$cfg_feedback_add},goodpost=goodpost+1,lastpost='$dtime' WHERE id='$aid' "); | |||
} | |||
else | |||
{ | |||
} else if ($feedbacktype == 'good') { | |||
$row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback_goodbad` WHERE fid={$fid} AND mid={$cfg_ml->M_ID} AND fgtype=0"); | |||
if (intval($row['dd']) <= 0) { | |||
$dsql->ExecuteNoneQuery("INSERT INTO `#@__feedback_goodbad` (`mid`, `fid`, `fgtype`) VALUES ('$cfg_ml->M_ID', '$fid', '0');"); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores+{$cfg_feedback_add},goodpost=goodpost+1,lastpost='$dtime' WHERE id='$aid' "); | |||
} else { | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback_goodbad` WHERE mid='{$cfg_ml->M_ID}' AND fid={$fid} AND fgtype=0"); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores-{$cfg_feedback_add},goodpost=goodpost-1,lastpost='$dtime' WHERE id='$aid' "); | |||
} | |||
$rr = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback_goodbad` WHERE fid={$fid}"); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET good='{$rr['dd']}' WHERE id={$fid}"); | |||
echo json_encode(array( | |||
"code" => 200, | |||
"msg" => "", | |||
"data" => $rr['dd'], | |||
)); | |||
exit; | |||
} else { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores+1,lastpost='$dtime' WHERE id='$aid' "); | |||
} | |||
if($cfg_ml->M_ID > 0) | |||
{ | |||
if ($cfg_ml->M_ID > 0) { | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__member` SET scores=scores+{$cfg_sendfb_scores} WHERE mid='{$cfg_ml->M_ID}' "); | |||
} | |||
//统计用户发出的评论 | |||
if($cfg_ml->M_ID > 0) | |||
{ | |||
$row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='".$cfg_ml->M_ID."'"); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'"); | |||
if ($cfg_ml->M_ID > 0) { | |||
$row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='" . $cfg_ml->M_ID . "'"); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='" . $cfg_ml->M_ID . "'"); | |||
} | |||
//会员动态记录 | |||
$cfg_ml->RecordFeeds('feedback', $arctitle, $msg, $aid); | |||
$_SESSION['sedtime'] = time(); | |||
if(empty($uid) && isset($cmtuser)) $uid = $cmtuser; | |||
$backurl = $cfg_formmember ? "index.php?uid={$uid}&action=viewarchives&aid={$aid}" : "feedback.php?aid={$aid}"; | |||
if($ischeck==0) | |||
{ | |||
ShowMsg('成功发表评论,但需审核后才会显示你的评论!', $backurl); | |||
} | |||
else | |||
{ | |||
ShowMsg('成功发表评论,现在转到评论页面!', $backurl); | |||
if (empty($uid) && isset($cmtuser)) $uid = $cmtuser; | |||
if ($ischeck == 0) { | |||
echo json_encode(array( | |||
"code" => 200, | |||
"msg" => "成功发表评论,但需审核后才会显示你的评论", | |||
"data" => "ok", | |||
)); | |||
} else { | |||
echo json_encode(array( | |||
"code" => 200, | |||
"msg" => "成功发表评论,现在转到评论页面", | |||
"data" => "ok", | |||
)); | |||
} | |||
exit(); | |||
} | |||
} |
@@ -121,7 +121,7 @@ else if($dopost=='send') | |||
$dtime = time(); | |||
if(!empty($cfg_feedback_time)) | |||
{ | |||
//检查最后发表评论时间,如果未登陆判断当前IP最后评论时间 | |||
//检查最后发表评论时间,如果未登录判断当前IP最后评论时间 | |||
$where = ($cfg_ml->M_ID > 0 ? "WHERE `mid` = '$cfg_ml->M_ID' " : "WHERE `ip` = '$ip' "); | |||
$row = $dsql->GetOne("SELECT dtime FROM `#@__feedback` $where ORDER BY `id` DESC "); | |||
if(is_array($row) && $dtime - $row['dtime'] < $cfg_feedback_time) | |||
@@ -1,29 +0,0 @@ | |||
<?php | |||
/** | |||
* | |||
* 评论js调用 | |||
* | |||
* @version $Id: freelist.php 1 15:38 2010年7月8日Z tianya $ | |||
* @package DedeCMS.Site | |||
* @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | |||
if($cfg_feedback_forbid=='Y') exit("document.write('系统已经禁止评论功能!');\r\n"); | |||
require_once(DEDEINC."/datalistcp.class.php"); | |||
if(isset($arcID)) $aid = $arcID; | |||
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | |||
if($aid==0) exit(" Request Error! "); | |||
$querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores FROM `#@__feedback` fb | |||
LEFT JOIN `#@__member` mb ON mb.mid = fb.mid | |||
WHERE fb.aid='$aid' AND fb.ischeck='1' ORDER BY fb.id DESC"; | |||
$dlist = new DataListCP(); | |||
$dlist->pageSize = 6; | |||
$dlist->SetTemplet(DEDETEMPLATE.'/plus/feedback_templet_js.htm'); | |||
$dlist->SetSource($querystring); | |||
$dlist->display(); | |||
?> |
@@ -34,7 +34,7 @@ | |||
{/dede:php} </div> | |||
<!-- /dcmp-content --> | |||
<div class="dcmp-post"> | |||
<!--未登陆--> | |||
<!--未登录--> | |||
<div class="dcmp-userinfo" id="_ajax_feedback"> {dede:php} | |||
if($cfg_mb_open=='Y') { | |||
echo '用户名: | |||
@@ -1,181 +0,0 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" /> | |||
<title>用户评论:{dede:global.title/}</title> | |||
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" /> | |||
<script language="javascript" type="text/javascript" src="../static/js/dedeajax2.js"></script> | |||
<script language="javascript"> | |||
function postDigg(ftype,aid) | |||
{ | |||
var taget_obj = document.getElementById(ftype+aid); | |||
var saveid = GetCookie('diggid'); | |||
if(saveid != null) | |||
{ | |||
var saveids = saveid.split(','); | |||
var hasid = false; | |||
saveid = ''; | |||
j = 1; | |||
for(i=saveids.length-1;i>=0;i--) | |||
{ | |||
if(saveids[i]==aid && hasid) continue; | |||
else { | |||
if(saveids[i]==aid && !hasid) hasid = true; | |||
saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); | |||
j++; | |||
if(j==10 && hasid) break; | |||
if(j==9 && !hasid) break; | |||
} | |||
} | |||
if(hasid) { alert("不要重复顶贴!"); return false; } | |||
else saveid += ','+aid; | |||
SetCookie('diggid',saveid,1); | |||
} | |||
else | |||
{ | |||
SetCookie('diggid',aid,1); | |||
} | |||
myajax = new DedeAjax(taget_obj,false,false,'','',''); | |||
myajax.SendGet2("feedback.php?action="+ftype+"&aid="+aid); | |||
DedeXHTTP = null; | |||
} | |||
function postBadGood(ftype,fid) | |||
{ | |||
var taget_obj = document.getElementById(ftype+fid); | |||
//document.write("feedback.php?action="+ftype+"&fid="+fid); | |||
//return; | |||
myajax = new DedeAjax(taget_obj,false,false,'','',''); | |||
myajax.SendGet2("feedback.php?aid=1&action="+ftype+"&fid="+fid); | |||
DedeXHTTP = null; | |||
} | |||
</script> | |||
</head> | |||
<body class="commentpage"> | |||
<div class="header"> | |||
<div class="top w960 center"> | |||
<div class="title"> | |||
<h1> <a href="{dede:global.cfg_basehost/}">{dede:global.cfg_webname/}</a> </h1> | |||
</div> | |||
<!-- /title --> | |||
<div class="welcome"> | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
您好,欢迎来到本网站,您还没有登陆,请先<a href="<?php echo $cfg_memberurl; ?>/index.php">登陆</a>或者<a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=user&dopost=regnew">注册</a>. | |||
<?php }else{ ?> | |||
<?php echo $cfg_ml->M_LoginID; ?>,欢迎您的登陆。 | |||
<a href="<?php echo $cfg_memberurl; ?>/index.php">会员中心</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/edit_fullinfo.php">我的资料</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/index.php?uid=<?php echo urlencode($cfg_ml->M_LoginID);?>">我的空间</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=login&dopost=exit">退出登录</a> | |||
<?php | |||
} | |||
?> | |||
</div> | |||
</div> | |||
<!-- /top --> | |||
</div><!-- /nav --> | |||
</div><!-- /header --> | |||
<div class="w960 clear center mt1 cmt-box"> | |||
<div class="sp-title"> | |||
<h2>评论:<a href='{dede:global.arcurl/}' >{dede:global.title/}</a></h2> | |||
</div> | |||
<div> | |||
<dl class="tbox"> | |||
<dt> | |||
<strong>摘要:</strong> | |||
</dt> | |||
<dd> | |||
<div class="dede_comment"> | |||
<div class="decmt-box"> | |||
<span class="date">发布时间:{dede:global.pubdate function="MyDate('Y-m-d H:i',@me)" /}</span> | |||
</div><!-- /decmt-title --> | |||
<div class="decmt-act"> | |||
<span>总积分[{dede:global.scores/}]</span> | |||
<span id='good{dede:global.id/}'><a href="#" onclick="postDigg('good',{dede:global.id/})">好评</a>[{dede:field.goodpost/}]</span> | |||
<span id='bad{dede:global.id/}'><a href="#" onclick="postDigg('bad',{dede:global.id/})">差评</a>[{dede:field.badpost/}]</span> | |||
<span><a href="stow.php?aid={dede:global.id/}">收藏</a></span> | |||
</div><!-- /decmt-act --> | |||
<div class="decmt-content"> | |||
{dede:global.description/}... | |||
</div> | |||
</div><!-- /dede_comment --> | |||
</dd> | |||
</dl> | |||
</div> | |||
<div class="mt1"> | |||
<dl class="tbox"> | |||
<dt><strong>发表评论</strong></dt> | |||
<dd> | |||
<div class="dede_comment_post"> | |||
<form action="feedback.php" method="post" name="feedback"> | |||
<input type="hidden" name="action" value="send" /> | |||
<input type="hidden" name="aid" value="<?php echo $aid; ?>" /> | |||
<input type="hidden" name="isconfirm" value="yes" /> | |||
<div class="dcmp-mood"> | |||
<strong>表情:</strong> | |||
<ul> | |||
<li><input type="radio" name="face" value="1" checked="1" /><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-1.gif" /></li> | |||
<li><input type="radio" name="face" value="2"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-2.gif" /></li> | |||
<li><input type="radio" name="face" value="3"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-3.gif" /></li> | |||
<li><input type="radio" name="face" value="4"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-4.gif" /></li> | |||
<li><input type="radio" name="face" value="5"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-5.gif" /></li> | |||
<li><input type="radio" name="face" value="6"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-6.gif" /></li> | |||
<li><input type="radio" name="face" value="7"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-7.gif" /></li> | |||
<li><input type="radio" name="face" value="8"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-8.gif" /></li> | |||
<li><input type="radio" name="face" value="9"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-9.gif" /></li> | |||
<li><input type="radio" name="face" value="10"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-10.gif" /></li> | |||
<li><input type="radio" name="face" value="11"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-11.gif" /></li> | |||
<li><input type="radio" name="face" value="12"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-12.gif" /></li> | |||
</ul> | |||
</div><!-- /dcmp-mood --> | |||
<div class="dcmp-stand"> | |||
<strong>评价:</strong> | |||
<input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /><label for="dcmp-stand-neu"><img src="{dede:global.cfg_templeturl/}/images/cmt-neu.gif" />中立</label> | |||
<input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /><label for="dcmp-stand-good"><img src="{dede:global.cfg_templeturl/}/images/cmt-good.gif" />好评</label> | |||
<input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /><label for="dcmp-stand-bad"><img src="{dede:global.cfg_templeturl/}/images/cmt-bad.gif" />差评</label> | |||
</div><!-- /dcmp-stand --> | |||
<div class="dcmp-content"> | |||
<textarea cols="60" name="msg" rows="5" class="ipt-txt"></textarea> | |||
</div><!-- /dcmp-content --> | |||
<div class="dcmp-title"> | |||
<small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> | |||
</div><!-- /dcmp-title --> | |||
<div class="dcmp-post"><!--未登陆--> | |||
<div class="dcmp-userinfo"> | |||
用户名: | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
<input name="username" type="text" id="username" size="10" class="nb" /> | |||
(<a href="../member/index_do.php?fmdo=user&dopost=regnew" target="_blank"><u>注册新用户</u></a>) | |||
密码: | |||
<input name="pwd" type="password" id="pwd" size="10"class="nb" /> | |||
<?php | |||
}else{ echo $cfg_ml->M_LoginID." "; } | |||
?> | |||
<input name="notuser" type="checkbox" id="notuser" value="1" /> | |||
匿名评论 | |||
<?php if(preg_match("/4/",$safe_gdopen)){ ?> | |||
验证码:<input name="validate" type="text" id="validate" size="10" style="height:18px;width:60px;margin-right:6px;text-transform: uppercase;" class="nb" /> | |||
<img src='../plus/vdimgck.php' width='60' height='24' /> | |||
<?php } ?> | |||
<button type="button" onClick='javascript:if(document.feedback.msg.value!="") document.feedback.submit(); else alert("评论内容不能为空!");' class="btn-2">发表评论</button> | |||
</div><!-- /dcmp-submit --> | |||
</div><!-- /dcmp-post --> | |||
</form> | |||
</div><!-- /dede_comment_post --> | |||
</dd> | |||
</dl> | |||
</div> | |||
</div> | |||
{dede:include filename="../default/footer.htm"/} | |||
<!-- /footer --> | |||
</body> | |||
</html> |
@@ -1,133 +0,0 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" /> | |||
<title>用户评论:<?php echo $row['arctitle'];?></title> | |||
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" /> | |||
</head> | |||
<body class="commentpage"> | |||
<div class="header"> | |||
<div class="top w960 center"> | |||
<div class="title"> | |||
<h1><a href="{dede:global.cfg_basehost/}" title="{dede:global.cfg_webname/}"><img src="{dede:global.cfg_templets_skin/}/images/logo.gif" height="54" width="216" alt="{dede:global.cfg_webname/}"/></a> </h1> | |||
</div> | |||
<!-- /title --> | |||
<div class="welcome"> | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
您好,欢迎来到本网站,您还没有登陆,请先<a href="<?php echo $cfg_memberurl; ?>/index.php">登陆</a>或者<a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=user&dopost=regnew">注册</a>. | |||
<?php }else{ ?> | |||
<?php echo $cfg_ml->M_LoginID; ?>,欢迎您的登陆。 | |||
<a href="<?php echo $cfg_memberurl; ?>/index.php">会员中心</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/edit_fullinfo.php">我的资料</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/index.php?uid=<?php echo urlencode($cfg_ml->M_LoginID);?>">我的空间</a> | | |||
<a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=login&dopost=exit">退出登录</a> | |||
<?php | |||
} | |||
?> | |||
</div> | |||
<!-- /banner --> | |||
</div> | |||
<!-- /top --> | |||
</div><!-- /nav --> | |||
</div><!-- /header --> | |||
<div class="w960 clear center mt1 cmt-box"> | |||
<div class="sp-title"> | |||
<h2>评论:<?php echo $row['arctitle'];?></h2> | |||
</div> | |||
<div> | |||
<dl class="tbox"> | |||
<dt> | |||
<strong>评论说明:</strong> | |||
</dt> | |||
<dd> | |||
<div class="dede_comment"> | |||
<div class="decmt-box"> | |||
选择不同的评价类型会影响文章的积分,心情不影响积分,如果你不想长篇大论,只需点击“好评/差评”图标,同样可以为文章增加或减少积分。<br /> | |||
选择“匿名评论”后,不管是否登陆都不显示你的空间链接,请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</div> | |||
</div><!-- /dede_comment --> | |||
</dd> | |||
</dl> | |||
</div> | |||
<div class="mt1"> | |||
<dl class="tbox"> | |||
<dt><strong>发表评论</strong></dt> | |||
<dd> | |||
<div class="dede_comment_post"> | |||
<form action="feedback.php" method="post" name="feedback"> | |||
<input type="hidden" name="action" value="send" /> | |||
<input type="hidden" name="comtype" value="reply" /> | |||
<input type="hidden" name="fid" value="<?php echo $row['id']; ?>" /> | |||
<input type="hidden" name="isconfirm" value="yes" /> | |||
<input type="hidden" name="typeid" value="<?php echo $row['typeid'];?>" /> | |||
<div class="dcmp-title"> | |||
<small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> | |||
</div><!-- /dcmp-title --> | |||
<div class="dcmp-stand"> | |||
<strong>评价:</strong> | |||
<input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /><label for="dcmp-stand-neu"><img src="{dede:global.cfg_templets_skin/}/images/cmt-neu.gif" />中立</label> | |||
<input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /><label for="dcmp-stand-good"><img src="{dede:global.cfg_templets_skin/}/images/cmt-good.gif" />好评</label> | |||
<input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /><label for="dcmp-stand-bad"><img src="{dede:global.cfg_templets_skin/}/images/cmt-bad.gif" />差评</label> | |||
</div><!-- /dcmp-stand --> | |||
<div class="clr"></div> | |||
<div class="dcmp-mood"> | |||
<strong>表情:</strong> | |||
<ul> | |||
<li><input type="radio" name="face" value="1" checked="1" /><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-1.gif" /></li> | |||
<li><input type="radio" name="face" value="2"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-2.gif" /></li> | |||
<li><input type="radio" name="face" value="3"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-3.gif" /></li> | |||
<li><input type="radio" name="face" value="4"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-4.gif" /></li> | |||
<li><input type="radio" name="face" value="5"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-5.gif" /></li> | |||
<li><input type="radio" name="face" value="6"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-6.gif" /></li> | |||
<li><input type="radio" name="face" value="7"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-7.gif" /></li> | |||
<li><input type="radio" name="face" value="8"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-8.gif" /></li> | |||
<li><input type="radio" name="face" value="9"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-9.gif" /></li> | |||
<li><input type="radio" name="face" value="10"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-10.gif" /></li> | |||
<li><input type="radio" name="face" value="11"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-11.gif" /></li> | |||
<li><input type="radio" name="face" value="12"/><img src="{dede:global.cfg_templets_skin/}/images/mood/ico-mood-12.gif" /></li> | |||
</ul> | |||
</div><!-- /dcmp-mood --> | |||
<div class="dcmp-content1"> | |||
<input type="hidden" name="quotemsg" value="{quote}<?php echo '{content}'.$row['msg'].'{/content}'.'{title}'.$row['username'].' 的原帖:{/title}';?>{/quote}" /> | |||
<textarea cols="60" name="msg" rows="5" class="ipt-txt"></textarea> | |||
</div><!-- /dcmp-content --> | |||
<div class="dcmp-post"><!--未登陆--> | |||
<div class="dcmp-userinfo"> | |||
用户名: | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
<input name="username" type="text" id="username" size="10" class="nb" /> | |||
(<a href="../member/index_do.php?fmdo=user&dopost=regnew" target="_blank"><u>注册新用户</u></a>) | |||
密码: | |||
<input name="pwd" type="password" id="pwd" size="10"class="nb" /> | |||
<?php | |||
}else{ echo $cfg_ml->M_LoginID." "; } | |||
?> | |||
<input name="notuser" type="checkbox" id="notuser" value="1" /> | |||
匿名评论 | |||
<?php if(preg_match("/4/",$safe_gdopen)){ ?> | |||
验证码:<input name="validate" type="text" id="validate" size="10" style="height:18px;width:60px;margin-right:6px;text-transform: uppercase;" class="nb" /> | |||
<img src='../plus/vdimgck.php' width='60' height='24' style="cursor:pointer" onclick="this.src=this.src+'?'" title="点击我更换图片" alt="点击我更换图片" /> | |||
<?php } ?> | |||
<button type="button" class="btn-2" onClick='javascript:if(document.feedback.msg.value!="") document.feedback.submit(); else alert("评论内容不能为空!");'>发表评论</button> | |||
</div><!-- /dcmp-submit --> | |||
</div><!-- /dcmp-post --> | |||
</form> | |||
</div><!-- /dede_comment_post --> | |||
</dd> | |||
</dl> | |||
</div> | |||
</div> | |||
{dede:include filename="../default/footer.htm"/} | |||
<!-- /footer --> | |||
</body> | |||
</html> |
@@ -1,60 +0,0 @@ | |||
<div class="clear center mt1 cmt-box"> | |||
<div class="mt1"> | |||
<dl class="tbox"> | |||
<dt><strong>引用评论</strong></dt> | |||
<dd> | |||
<div class="dede_comment_post"> | |||
<form action="feedback.php" method="post" name="ajaxfeedback_<?php echo $row['id']; ?>" id="ajaxfeedback_<?php echo $row['id']; ?>"> | |||
<input type="hidden" name="action" value="send" /> | |||
<input type="hidden" name="comtype" value="reply" /> | |||
<input type="hidden" name="fid" value="<?php echo $row['id']; ?>" /> | |||
<input type="hidden" name="isconfirm" value="yes" /> | |||
<input type="hidden" name="typeid" value="<?php echo $row['typeid'];?>" /> | |||
<div class="dcmp-title"> <small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> </div> | |||
<!-- /dcmp-title --> | |||
<div class="dcmp-stand"> <strong>评价:</strong> | |||
<input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /> | |||
<label for="dcmp-stand-neu"><img src="{dede:global.cfg_templets_skin/}/images/cmt-neu.gif" />中立</label> | |||
<input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /> | |||
<label for="dcmp-stand-good"><img src="{dede:global.cfg_templets_skin/}/images/cmt-good.gif" />好评</label> | |||
<input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /> | |||
<label for="dcmp-stand-bad"><img src="{dede:global.cfg_templets_skin/}/images/cmt-bad.gif" />差评</label> | |||
</div> | |||
<!-- /dcmp-stand --> | |||
<div class="clr"></div> | |||
<!-- /dcmp-mood --> | |||
<div class="dcmp-content1"> | |||
<input type="hidden" name="quotemsg" value="{quote}<?php echo '{content}'.$row['msg'].'{/content}'.'{title}'.$row['username'].' 的原帖:{/title}';?>{/quote}" /> | |||
<textarea cols="60" name="msg" rows="5" class="ipt-txt" style="width:98%" id="msg_<?php echo $row['id']; ?>"></textarea> | |||
</div> | |||
<!-- /dcmp-content --> | |||
<div class="dcmp-post"> | |||
<!--未登陆--> | |||
<div class="dcmp-userinfo"> 用户名: | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
<input name="username" type="text" id="username" size="10" class="nb" /> | |||
(<a href="{dede:global.cfg_cmsurl/}/member/index_do.php?fmdo=user&dopost=regnew" target="_blank"><u>注册</u></a>) | |||
密码: | |||
<input name="pwd" type="password" id="pwd" size="10"class="nb" /> | |||
<?php | |||
}else{ echo $cfg_ml->M_LoginID." "; } | |||
?> | |||
<input name="notuser" type="checkbox" id="notuser" value="1" /> | |||
匿名评论 | |||
<?php if(preg_match("/4/",$safe_gdopen)){ ?> | |||
验证码: | |||
<input name="validate" type="text" id="validate" size="10" style="height:18px;width:36px;margin-right:6px;text-transform: uppercase;" class="nb" /> | |||
<img src='{dede:global.cfg_cmsurl/}/plus/vdimgck.php' width='60' height='24' style="cursor:pointer" onclick="this.src=this.src+'?'" title="点击我更换图片" alt="点击我更换图片" id="vdimg_<?php echo $row['id']; ?>"/> | |||
<?php } ?> | |||
<button type="button" class="btn-2" onClick='javascript:if(CKEDITOR.instances.msg_<?php echo $row['id']; ?>.getData()!="") ajaxQuotePost(<?php echo $row['id']; ?>); else alert("评论内容不能为空!");'>发表评论</button> | |||
</div> | |||
<!-- /dcmp-submit --> | |||
</div> | |||
<!-- /dcmp-post --> | |||
</form> | |||
</div> | |||
<!-- /dede_comment_post --> | |||
</dd> | |||
</dl> | |||
</div> | |||
</div> |
@@ -1,269 +0,0 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" /> | |||
<title>用户评论:{dede:global.title/}</title> | |||
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" /> | |||
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/static/js/dedeajax2.js"></script> | |||
<script language="javascript"> | |||
function postBadGood(ftype,fid) | |||
{ | |||
var taget_obj = document.getElementById(ftype+fid); | |||
var saveid = GetCookie('badgoodid'); | |||
if(saveid != null) | |||
{ | |||
var saveids = saveid.split(','); | |||
var hasid = false; | |||
saveid = ''; | |||
j = 1; | |||
for(i=saveids.length-1;i>=0;i--) | |||
{ | |||
if(saveids[i]==fid && hasid) continue; | |||
else { | |||
if(saveids[i]==fid && !hasid) hasid = true; | |||
saveid += (saveid=='' ? saveids[i] : ','+saveids[i]); | |||
j++; | |||
if(j==10 && hasid) break; | |||
if(j==9 && !hasid) break; | |||
} | |||
} | |||
if(hasid) { alert('您刚才已表决过了喔!'); return false; } | |||
else saveid += ','+fid; | |||
SetCookie('badgoodid',saveid,1); | |||
} | |||
else | |||
{ | |||
SetCookie('badgoodid',fid,1); | |||
} | |||
//document.write("feedback.php?action="+ftype+"&fid="+fid); | |||
//return; | |||
myajax = new DedeAjax(taget_obj,false,false,'','',''); | |||
myajax.SendGet2("feedback.php?aid={dede:global.aid/}&action="+ftype+"&fid="+fid); | |||
DedeXHTTP = null; | |||
} | |||
function ajaxFeedback(aid, fid, type) | |||
{ | |||
var taget_obj = $DE('ajaxfeedback_'+fid); | |||
if(taget_obj.innerHTML == '') | |||
{ | |||
var myajax = new DedeAjax(taget_obj, true, true, '', 'x'); | |||
myajax.SendGet2("{dede:global.cfg_phpurl /}/feedback.php?aid="+aid+"&fid="+fid+"&action=quote&type=ajax"); | |||
eval('var result = typeof CKEDITOR.instances.msg_'+fid); | |||
if(result != 'undefined') | |||
{ | |||
// 删除实例 | |||
eval('var edit = CKEDITOR.instances.msg_'+fid); | |||
CKEDITOR.remove(edit); | |||
} | |||
CKEDITOR.replace(document.getElementById('msg_'+fid) , CKEDITOR.instances.msg.config); | |||
scroll(0, taget_obj.offsetTop - 120); | |||
var formname = 'f = document.ajaxfeedback_'+fid; | |||
eval(formname); | |||
if(f.validate) | |||
{ | |||
if($DE('vdimg_'+fid)) $DE('vdimg_'+fid).src = "{dede:global.cfg_cmsurl/}/plus/vdimgck.php?"+f.validate.value; | |||
f.validate.value = ''; | |||
} | |||
DedeXHTTP = null; | |||
} | |||
} | |||
function ajaxQuotePost(fid) | |||
{ | |||
var formname = 'f = document.ajaxfeedback_'+fid; | |||
eval(formname); | |||
//var f = document.formname; | |||
//var f = f[0]; | |||
var nvalidate = ''; | |||
var nnotuser = ''; | |||
var nusername = ''; | |||
var npwd = ''; | |||
var taget_obj = $DE('commetcontentNew'); | |||
var waithtml = "<div style='line-height:30px'><img src='{dede:global.cfg_cmsurl/}/images/loadinglit.gif' />正在发送中...</div>"; | |||
eval('var msg = CKEDITOR.instances.msg_'+fid+'.getData()'); | |||
if(f.validate) | |||
{ | |||
if(f.validate.value=='') { | |||
alert("请填写验证码!"); | |||
return; | |||
} | |||
else { | |||
nvalidate = f.validate.value; | |||
} | |||
} | |||
var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml); | |||
if(f.notuser.checked) nnotuser = '1'; | |||
if(f.username) nusername = f.username.value; | |||
if(f.pwd) npwd = f.pwd.value; | |||
myajax.sendlang = '{dede:global.cfg_soft_lang/}'; | |||
myajax.AddKeyN('dopost', 'send'); | |||
myajax.AddKeyN('aid', '{dede:global.aid/}'); | |||
myajax.AddKeyN('fid', f.fid.value); | |||
myajax.AddKeyN('type', 'ajax'); | |||
myajax.AddKeyN('comtype', f.comtype.value); | |||
myajax.AddKeyN('isconfirm','yes'); | |||
myajax.AddKeyN('typeid', f.typeid.value); | |||
myajax.AddKeyN('quotemsg', f.quotemsg.value); | |||
myajax.AddKeyN('validate', nvalidate); | |||
myajax.AddKeyN('notuser', nnotuser); | |||
myajax.AddKeyN('username', nusername); | |||
myajax.AddKeyN('pwd', npwd); | |||
myajax.AddKeyN('msg', msg); | |||
myajax.SendPost2('{dede:global.cfg_phpurl/}/feedback_ajax.php'); | |||
//alert(f.quotemsg.value); | |||
if($DE('ajaxfeedback_'+fid).innerHTML != null) | |||
{ | |||
$DE('ajaxfeedback_'+fid).innerHTML = ''; | |||
} | |||
scroll(0, taget_obj.offsetTop); | |||
taget_obj.removeAttribute('id'); | |||
} | |||
</script> | |||
<body class="commentpage"> | |||
<div class="header"> | |||
<div class="top w960 center"> | |||
<div class="title"> | |||
<h1><a href="{dede:global.cfg_basehost/}" title="{dede:global.cfg_webname/}"><img src="{dede:global.cfg_templets_skin/}/images/logo.gif" height="54" width="216" alt="{dede:global.cfg_webname/}"/></a> </h1> | |||
</div> | |||
<!-- /title --> | |||
<div class="welcome"> | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
您好,欢迎来到本网站,您还没有登陆,请先<a href="<?php echo $cfg_memberurl; ?>/index.php">登陆</a>或者<a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=user&dopost=regnew">注册</a>. | |||
<?php }else{ ?> | |||
<?php echo $cfg_ml->M_LoginID; ?>,欢迎您的登陆。 <a href="<?php echo $cfg_memberurl; ?>/index.php">会员中心</a> | <a href="<?php echo $cfg_memberurl; ?>/edit_fullinfo.php">我的资料</a> | <a href="<?php echo $cfg_memberurl; ?>/index.php?uid=<?php echo urlencode($cfg_ml->M_LoginID);?>">我的空间</a> | <a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=login&dopost=exit">退出登录</a> | |||
<?php | |||
} | |||
?> | |||
</div> | |||
<!-- /banner --> | |||
</div> | |||
<!-- /top --> | |||
</div> | |||
<!-- /nav --> | |||
</div> | |||
<!-- /header --> | |||
<div class="w960 clear center mt1 cmt-box"> | |||
<div class="sp-title"> | |||
<h2>评论:<a href='{dede:global.arcurl/}'>{dede:global.title/}</a></h2> | |||
</div> | |||
<div> | |||
<dl class="tbox"> | |||
<dt> <strong>评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)</strong> <span class="label"> <a href='feedback.php?aid={dede:global.aid/}&ftype=good' <?php if($ftype=='good') echo "class='thisclass'"; ?>>只看好评</a> <a href='feedback.php?aid={dede:global.aid/}&ftype=bad' <?php if($ftype=='bad') echo "class='thisclass'"; ?>>只看差评</a> <a href='feedback.php?aid={dede:global.aid/}&ftype=feedback' <?php if($ftype=='feedback') echo "class='thisclass'"; ?>>只看中立</a> <a href='feedback.php?aid={dede:global.aid/}' <?php if($ftype=='') echo "class='thisclass'"; ?>>全部评论</a> </span> </dt> | |||
<dd> | |||
<div class="dede_comment"> | |||
<div class='decmt-box1'> | |||
<ul> | |||
<li id="commetcontentNew"></li> | |||
{dede:datalist} | |||
<?php | |||
if($fields['userid']!='') $spaceurl = $cfg_basehost.'/member/index.php?uid='.$fields['userid']; | |||
else $spaceurl = "#"; | |||
if($fields['username']=='匿名') $spaceurl = "#"; | |||
$fields['bgimg'] = 'cmt-neu.gif'; | |||
$fields['ftypetitle'] = '该用户表示中立'; | |||
if($fields['ftype']=='bad') { | |||
$fields['bgimg'] = 'cmt-bad.gif'; | |||
$fields['ftypetitle'] = '该用户表示差评'; | |||
} | |||
else if($fields['ftype']=='good') { | |||
$fields['bgimg'] = 'cmt-good.gif'; | |||
$fields['ftypetitle'] = '该用户表示好评'; | |||
} | |||
if(empty($fields['mface'])) | |||
{ | |||
if($fields['sex']=="女") $fields['mface']="/member/templets/images/dfgirl.png"; | |||
else $fields['mface']="/member/templets/images/dfboy.png"; | |||
} | |||
?> | |||
<li> <a href='<?php echo $spaceurl; ?>' class='plpic'><img src='<?php echo $fields['mface'];?>' height='40' width='40'/></a> <span class="title"> {dede:field.username/}<img src="{dede:global.cfg_templets_skin/}/images/{dede:field.bgimg/}" /></span> | |||
<div class="comment_act"><span class="fr"> <span id='goodfb{dede:field.id/}'><a href="#" onclick="postBadGood('goodfb',{dede:field.id/})">支持</a>[{dede:field.good/}]</span> <span id='badfb{dede:field.id/}'><a href="#" onclick="postBadGood('badfb',{dede:field.id/})">反对</a>[{dede:field.bad/}]</span> <span class='quote'><a href="javascript:ajaxFeedback({dede:field.id/},{dede:field.id/},'quote');">引用</a></span></span> {dede:field.dtime function="MyDate('m-d H:i',@me)" /}发表</div> | |||
<p> | |||
<?php | |||
echo RemoveXSS(Quote_replace(parseSmileys($fields['msg'],$cfg_cmspath.'/images/smiley'))); | |||
?></p> | |||
</li> | |||
<div id="ajaxfeedback_{dede:field.id/}"></div> | |||
{/dede:datalist} | |||
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} | |||
</ul> | |||
</div> | |||
</div> | |||
<!-- /dede_comment --> | |||
</dd> | |||
</dl> | |||
</div> | |||
<div class="mt1"> | |||
<dl class="tbox"> | |||
<dt> <strong>发表评论</strong> </dt> | |||
<dd> | |||
<div class="dede_comment_post"> | |||
<form action="feedback.php" method="post" name="feedback"> | |||
<input type="hidden" name="action" value="send" /> | |||
<input type="hidden" name="comtype" value="comments"> | |||
<input type="hidden" name="aid" value="<?php echo $aid; ?>" /> | |||
<input type="hidden" name="isconfirm" value="yes" /> | |||
<div class="dcmp-title"> <small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> </div> | |||
<!-- /dcmp-title --> | |||
<div class="dcmp-stand"> <strong>评价:</strong> | |||
<input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /> | |||
<label for="dcmp-stand-neu"><img src="{dede:global.cfg_templets_skin/}/images/cmt-neu.gif" />中立</label> | |||
<input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /> | |||
<label for="dcmp-stand-good"><img src="{dede:global.cfg_templets_skin/}/images/cmt-good.gif" />好评</label> | |||
<input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /> | |||
<label for="dcmp-stand-bad"><img src="{dede:global.cfg_templets_skin/}/images/cmt-bad.gif" />差评</label> | |||
</div> | |||
<!-- /dcmp-stand --> | |||
<div class="clr"></div> | |||
<!-- /dcmp-mood --> | |||
<div class="dcmp-content1"> | |||
<script type="text/javascript"> | |||
//<![CDATA[ | |||
window.CKEDITOR_BASEPATH='{dede:global.cfg_cmsurl/}/static/js/ckeditor/'; | |||
//]]> | |||
</script> | |||
{dede:php} | |||
GetEditor('msg','',100,'Feedback','print','false',true); | |||
{/dede:php} | |||
</div> | |||
<!-- /dcmp-content --> | |||
<div class="dcmp-post"> | |||
<!--未登陆--> | |||
<div class="dcmp-userinfo"> 用户名: | |||
<?php if($cfg_ml->M_ID <= 0) { ?> | |||
<input name="username" type="text" id="username" size="10" class="nb" /> | |||
(<a href="../member/index_do.php?fmdo=user&dopost=regnew" target="_blank"><u>注册新用户</u></a>) | |||
<?php | |||
}else{ echo $cfg_ml->M_LoginID." "; } | |||
?> | |||
<input name="notuser" type="checkbox" id="notuser" value="1" /> | |||
匿名评论 | |||
<?php if(preg_match("/4/",$safe_gdopen)){ ?> | |||
验证码: | |||
<input name="validate" type="text" id="validate" size="10" style="height:18px;width:60px;margin-right:6px;text-transform:uppercase;" class="nb" /> | |||
<img src='../plus/vdimgck.php' width='60' height='24' style="cursor:pointer" onclick="this.src=this.src+'?'" title="点击我更换图片" alt="点击我更换图片" /> | |||
<?php } ?> | |||
<button type="submit" class="btn-2">发表评论</button> | |||
</div> | |||
<!-- /dcmp-submit --> | |||
</div> | |||
<!-- /dcmp-post --> | |||
</form> | |||
</div> | |||
<!-- /dede_comment_post --> | |||
</dd> | |||
</dl> | |||
</div> | |||
</div> | |||
{dede:include filename="../default/footer.htm"/} | |||
<!-- /footer --> | |||
</body> | |||
</html> |
@@ -1,36 +0,0 @@ | |||
{dede:config pagesize='5'/} | |||
{dede:datalist} | |||
<?php | |||
if($fields['userid']!='') $spaceurl = $cfg_basehost.'/member/index.php?uid='.$fields['userid']; | |||
else $spaceurl = "#"; | |||
if($fields['username']=='匿名') $spaceurl = "#"; | |||
$fields['bgimg'] = 'cmt-neu.gif'; | |||
$fields['ftypetitle'] = '该用户表示中立'; | |||
if($fields['ftype']=='bad') { | |||
$fields['bgimg'] = 'cmt-bad.gif'; | |||
$fields['ftypetitle'] = '该用户表示差评'; | |||
} | |||
else if($fields['ftype']=='good') { | |||
$fields['bgimg'] = 'cmt-good.gif'; | |||
$fields['ftypetitle'] = '该用户表示好评'; | |||
} | |||
?> | |||
document.write("<div class='decmt-box'>"); | |||
document.write("<div class='decmt-title'>"); | |||
document.write("<span class='moodico'><img src='{dede:global.cfg_templeturl/}/images/mood/ico-mood-<?php if($fields['face']>0) echo $fields['face'];?>.gif'/></span>"); | |||
document.write("<span class='username'><a href='<?php echo $spaceurl;?>'>{dede:field.username/}</a></span>"); | |||
document.write("<span class='date'>{dede:field.dtime function=GetDateMk(@me)/}</span>"); | |||
document.write("<span>发表</span>"); | |||
document.write("</div>"); | |||
document.write("<div class='decmt-act'>"); | |||
document.write("<span id='goodfb{dede:field.id/}'><a href=#goodfb{dede:field.id/} onclick=postBadGood('goodfb',{dede:field.id/})>支持</a>[{dede:field.good/}]</span>"); | |||
document.write("<span id='badfb{dede:field.id/}'><a href=#badfb{dede:field.id/} onclick=postBadGood('badfb',{dede:field.id/})>反对</a>[{dede:field.bad/}]</span>"); | |||
document.write("<span><a href='/plus/feedback.php?fid={dede:field.id/}&action=quote'>引用</a></span>"); | |||
document.write("</div>"); | |||
document.write("<div class='decmt-content'>{dede:field.msg function='jstrim(@me,100)'/}<img src='{dede:global.cfg_templeturl/}/images/{dede:field.bgimg/}' alt='{dede:field.ftypetitle/}' />"); | |||
document.write("</div>"); | |||
document.write("</div>"); | |||
{/dede:datalist} | |||