//用户登录 function loginsuc(){ JQ("#Loginp").show(); JQ(".loginbefore").hide(); } //登录 function actionlogin(){ var fromobj=JQ("#special_logoin_b").parent().parent().parent().parent(); var uname = fromobj.find("[name=username]").val(); var password = fromobj.find("[name=password]").val(); if (uname == "") { alert("用户名不能为空"); return; } if (password == "") { alert("密码不能为空"); return; } JQ.getScript("http://comment.ifeng.com/login.php?callback=loginsuc&job=login&uname=" + encodeURIComponent(uname) + "&password=" + encodeURIComponent(password)); } function checklogin(event){ if(!getCookieValue("sid")){ event.returnValue=false;// for IE event.preventDefault(); alert("请登录后发表评论"); JQ("#username").focus(); return false; }else{ } } var comment_global_sid=getCookieValue("sid"); var comment_global_uname=""; var comment_login_html=""; var comment_style=''; if(comment_global_sid && comment_global_sid.length>32 ){ comment_style='style="display:none"'; comment_global_uname=comment_global_sid.substring(32,comment_global_sid.length); comment_login_html+='    '+comment_global_uname+' 凤凰网欢迎您 退出'; }else{ comment_style='style="display:"'; } var templogin=''; templogin+=' '+comment_login_html+''; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' 用户名:'; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' 密 码:'; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+='  '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; templogin+=' '; if(typeof(jtemp_bgColor)=='undefined'||jtemp_bgColor==''){ jtemp_bgColor='ddedc9'; } if(typeof(jtemp_style)=='undefined'||jtemp_style==''){ jtemp_style='right'; } if(typeof(jtemp_width)=='undefined'||jtemp_width==''){ jtemp_width='730'; } if(typeof(jtemp_height)=='undefined'||jtemp_height==''){ jtemp_height='360'; } var template_content = ''; template_content += '
{if typeof(commentList)!=\'undefined\' && commentList!=\'\'}{var dname = encodeURIComponent(commentList[0].docName)}{var durl = encodeURIComponent(commentList[0].docUrl)}{/if}
{if typeof(commentList)!=\'undefined\' && commentList!=\'\'}{for comment in commentList}
  来自${comment.IPFROM}的${comment.COMUSERNAME|default:\"凤凰网友\"}:${comment.COMDATE|formatDate}
${comment.COMDETAIL}
{/for}{/if}
'; template_content += '
'+templogin+'
'; }else if(jtemp_style=='bottom'||jtemp_style=='top'){ if(jtemp_style=='bottom'){ template_content += '#commentlist_div {height: ${jtemp_height-200}px;width: ${jtemp_width}px;position: relative;left:0px;top:0px;float: ${jtemp_style};overflow: auto;OVERFLOW-X: hidden;}'; template_content += '#commentform_div {float: left;height: 200px;width: ${jtemp_width}px;position: relative;left:0px;top:0px;background-color: #${jtemp_bgColor};}'; }else{ template_content += '#commentlist_div {height: ${jtemp_height-200}px;width: ${jtemp_width}px;position: relative;left:0px;top: 200px;float: ${jtemp_style};overflow: auto;OVERFLOW-X: hidden;}'; template_content += '#commentform_div {float: left;height: 200px;width: ${jtemp_width}px;position: relative;left:0px;top:-${jtemp_height-200}px;background-color: #${jtemp_bgColor};}'; } template_content += '#commentform_div #nike {position: relative;float: left;left: 0px;height: 30px;width: ${jtemp_width-10}px;margin: 5px 0px 0px 5px;}'; template_content += '#commentform_div #come_form {position: relative;float: left;left: 0px;height: 30px;width: ${jtemp_width-10}px;margin: 0px 0px 0px 5px;}'; template_content += '#commentform_div #input_content {position: relative;float: left;left: 0px;width: ${jtemp_width-10}px;text-align: left;margin: 0px 0px 0px 5px;}'; template_content += '#commentform_div #sbutton {position: relative;float: left;left: 5px;width: ${jtemp_width-10}px;text-align: center;margin: 5px 0px 0px 5px;}'; template_content += '#commentform_div #content {WIDTH: ${jtemp_width-30}px; HEIGHT: 90px}'; template_content += '.border1 {BORDER-RIGHT: #cccccc 1px solid;BORDER-TOP: #cccccc 1px solid;BORDER-LEFT: #cccccc 1px solid;BORDER-BOTTOM: #cccccc 1px solid;font-family: "宋体";font-size: 12px;}'; template_content += '.txt {padding-left:12px;line-height:180%;font-family: "宋体";font-size: 12px;}'; template_content += ''; template_content += '
{if typeof(commentList)!=\'undefined\' && commentList!=\'\'}{var dname = encodeURIComponent(commentList[0].docName)}{var durl = encodeURIComponent(commentList[0].docUrl)}{/if}
{if typeof(commentList)!=\'undefined\' && commentList!=\'\'}{for comment in commentList}
  来自${comment.IPFROM}的${comment.COMUSERNAME|default:\"凤凰网友\"}:
${comment.COMDETAIL}
{/for}{/if}
'; // template_content += '
昵  称:
来自何方:
'; template_content += '
'+templogin+'
'; }