视频介绍
getDigg(4907);
------分隔线----------------------------
function LoadCommets(page)
{
var taget_obj = document.getElementById('commetcontent');
var waithtml = "
评论加载中...
";
var myajax = new DedeAjax(taget_obj, true, true, '', 'x', waithtml);
myajax.SendGet2("/plus/feedback_ajax.php?dopost=getlist&aid=4907&page="+page);
DedeXHTTP = null;
}
function PostComment()
{
var f = document.feedback;
var msg = CKEDITOR.instances.msg.getData();
var nface = '6';
var nfeedbacktype = 'feedback';
var nvalidate = '';
var nnotuser = '';
var nusername = '';
var npwd = '';
var taget_obj = $DE('commetcontentNew');
var waithtml = "
正在发送中...
";
if(msg=='')
{
alert("评论内容不能为空!");
return;
}
if(f.validate)
{
if(f.validate.value=='') {
alert("请填写验证码!");
return;
}
else {
nvalidate = f.validate.value;
}
}
if(msg.length > 500)
{
alert("你的评论是不是太长了?请填写500字以内的评论。");
return;
}
if(f.feedbacktype) {
for(var i=0; i < f.feedbacktype.length; i++)
if(f.feedbacktype[i].checked) nfeedbacktype = f.feedbacktype[i].value;
}
/*
if(f.face) {
for(var j=0; j < f.face.length; j++)
if(f.face[j].checked) nface = f.face[j].value;
}
*/
if(f.notuser.checked) nnotuser = '1';
if(f.username) nusername = f.username.value;
if(f.pwd) npwd = f.pwd.value;
var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml);
myajax.sendlang = 'gb2312';
myajax.AddKeyN('dopost', 'send');
myajax.AddKeyN('aid', '4907');
myajax.AddKeyN('fid', f.fid.value);
myajax.AddKeyN('face', nface);
myajax.AddKeyN('feedbacktype', nfeedbacktype);
myajax.AddKeyN('validate', nvalidate);
myajax.AddKeyN('notuser', nnotuser);
myajax.AddKeyN('username', nusername);
myajax.AddKeyN('pwd', npwd);
myajax.AddKeyN('msg', msg);
myajax.SendPost2('/plus/feedback_ajax.php');
//msg = '';
CKEDITOR.instances.msg.setData('');
//taget_obj.removeAttribute('id');
f.fid.value = 0;
if(f.validate)
{
if($DE('validateimg')) $DE('validateimg').src = "/include/vdimgck.php?"+f.validate.value;
f.validate.value = '';
}
}
function quoteCommet(fid)
{
document.feedback.fid.value = fid;
}
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("/plus/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 = "/include/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 = "
正在发送中...
";
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 = 'gb2312';
myajax.AddKeyN('dopost', 'send');
myajax.AddKeyN('aid', '4907');
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('/plus/feedback_ajax.php');
//alert(f.quotemsg.value);
if($DE('ajaxfeedback_'+fid).innerHTML != null)
{
$DE('ajaxfeedback_'+fid).innerHTML = '';
}
scroll(0, taget_obj.offsetTop);
}
LoadCommets(1);