⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newscomment.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../Inc/Commoncode.asp" -->
<!--#include file="../inc/CommonFunction.asp"-->
<!--#include file="../inc/IP.asp"-->
<%
Response.Expires = 0 
Response.CacheControl = "no-cache" 
Response.ExpiresAbsolute = Now() - 1 

newsid=request("newsid")
if newsid="" or not IsNumeric(newsid) then
response.Write ("<script language='JavaScript'>alrte('该页面不存在,请访问其他内容');location.href='JavaScript:history.back()';</script>")
Response.end()
end if
'读取文章标题
set rs=conn.execute("select * from JOB_hrnews where newsid="&newsid&"")
if not rs.eof then
newsid=rs("newsid")
typeid=rs("typeid")
ChannelID=rs("type_fid")
news_Title=rs("Title")
dateandtime=rs("Dateandtime")
else
response.Write ("<script language='JavaScript'>alrte('该页面不存在,请访问其他内容');location.href='JavaScript:history.back()';</script>")
Response.end()
end if
rs.close
set rs=nothing

Dim Action

Dim page,i
Dim totalPut
const MaxPerpage=20
Const strFileName="newscomment.asp"
page=Trim(Request("page"))
If page<>"" And IsNumeric(page) Then
	If page<1 Or Len(page)>10 Then
		page=1
	Else
    	page=CLng(page)
	End If
Else
	page=1
End If
%>
<!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=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta content="all" name="robots" />
<meta name="author" content="web@yjys.net,嘉挚科技" />
<meta name="Copyright" content="www.yjys.net,版权所有,请勿转载" />
<meta name="keywords" content="<%=Meta_Keywords%>" />
<meta name="description" content="<%=Meta_Description%>" />
<title>查看 <%=ClearColor(news_Title)%> 的所有评论-<%=SiteTitle%></title>
<link href="../css/css1.css" rel="stylesheet" type="text/css">
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<%call head()%>
<div class="place"><div class="catalogName l"></div><div class="navMenu l">您现在的位置:<a href="<%=Siteurl%>"><%=Sitename%></a> &gt;&gt; 评论中心 &gt;&gt; </div>
</div>
<div class="main">
  <table width="760" border="0" cellpadding="2" cellspacing="1" class="bl2">
    <tr>
      <td height="32" align="center"><a href="<%=FormatLink(dateandtime,ChannelId,typeid,newsid,0)%>"><font class="redbarword"><%=news_Title%></font></a></td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="4" cellspacing="0" class="bl1 mt10">
    <tr>
      <td class="f14b1">评论列表</td>
    </tr>
    <tr>
      <td height="120" valign="top">
	<%Set rs= Server.CreateObject(FR_HR_RS)
	sql="select * from JOB_hrnewscom where newsid="&newsid&" and pass=1 order by dateandtime desc"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		Response.Write("暂无任何评论!")
	else
		totalPut=rs.recordcount
		if (page-1)*MaxPerpage>totalput then
			if (totalPut mod MaxPerpage)=0 then
				page= totalPut \ MaxPerpage
			else
				page= totalPut \ MaxPerpage + 1
			end if
		end if
		if page=1 then
			Response.Write(MainList())
		else
			if (page-1)*MaxPerpage<totalPut then
				rs.move  (page-1)*MaxPerpage
				dim bookmark
				bookmark=rs.bookmark
			Response.Write(MainList())
			else
				page=1
			Response.Write(MainList())
			end if
		end if
	end if
	rs.close
	set rs=nothing
%>
</td>
    </tr>
  </table>
<%
Function MainList()
LabelContent="<table width=100% border=0 cellpadding=2 cellspacing=1 bgcolor=#F5F5F5 class=mcomlefttab>"
i=0
do while not rs.eof
com_id=rs("com_id")
pjrname=rs("pjrname")
pj_content=rs("pj_content")
dateandtime=rs("dateandtime")
pjrIP=rs("pjrIP")
pass=rs("pass")
i=i+1
LabelContent=LabelContent&"<tr>"
LabelContent=LabelContent&"<td bgcolor=#F0F7FF>"
LabelContent=LabelContent&dateandtime&" "&pjrname&pass&" IP:"&IPhideoneAddress(pjrIP)&""
LabelContent=LabelContent&"</td>"
LabelContent=LabelContent&"</tr>"
LabelContent=LabelContent&"<tr>"
LabelContent=LabelContent&"<td valign=middle bgcolor=#FFFFFF height=60>"
if pass=0 then
	if IsAdsContent(pj_content)=True then
	LabelContent=LabelContent&"<font color=#999999>网站清洁机器人提醒您:本楼疑似广告,请等待管理员审核!</font>"
	else
	LabelContent=LabelContent&pj_content
	end if
else
LabelContent=LabelContent&pj_content
end if
LabelContent=LabelContent&"</td>"
LabelContent=LabelContent&"</tr>"
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
LabelContent=LabelContent&"<tr><td align=center valign=middle bgcolor=#FFFFFF>"
If totalput>0 Then
	LabelContent=LabelContent&showpages(strFileName,totalput,MaxPerPage,false,true,"条评论")
End If
LabelContent=LabelContent&"</td>"
LabelContent=LabelContent&"</tr>"
LabelContent=LabelContent&"</table>"
MainList=LabelContent
End Function
%>
  <div class="bl2 mt10">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="85%" height="27" style=" background-color:#CCEBFC; padding-left:20px; font-size:14px; font-weight:bold;"><a name="pl" id="pl"></a>发表评论</td>
      <td width="15%" style=" background-color:#CCEBFC; padding-left:20px; font-size:12px; font-weight:bold;"></td>
    </tr>
    <tr>
      <td height="99" colspan="2">
<script language="javascript" type="text/javascript">
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
function String.prototype.lenB()
{
return this.replace(/[^\x00-\xff]/g,"**").length;
}
function checkComment(thisform)  {
if(thisform.anonymous.checked){}
else{
if(fnRemoveBrank(thisform.pjrname.value)==""){
	alert("请输入登录名,谢谢!");
	thisform.pjrname.focus();
	return false;
}
if(fnRemoveBrank(thisform.pjrpass.value)==""){
	alert("请输入密码,谢谢!");
	thisform.pjrpass.focus();
	return false;
}
}
if(fnRemoveBrank(thisform.pj_content.value)=="") {
	alert("请输入评论内容,控制在2000个字符之内,谢谢!");
	thisform.pj_content.focus();
	return false;
}
if ((thisform.pj_content.value).lenB()>=2000){
	 alert("评论内容太长了,要求不多于2000个字符!");
	thisform.pj_content.focus();
	return (false);
} 
}
//-->
</script><table width="744" border="0" align="center" cellpadding="4" cellspacing="0">
	  <form name="form1" action="<%=Siteurl%><%=InstallDir%>Comment/NewsCommentok.asp" method="post" onsubmit="return checkComment(this)" target="_blank">
        <tr>
          <td height="29" colspan="2"><p>
            <input name="newsid" type="hidden" value="<%=newsid%>" />
            登录名:
                <input size="15" name="pjrname" style=" width:120px; height:16px;border:1px #CCCCCC solid;"  />
            密码:
  <input type="password" size="15" value="" name="pjrpass" style=" width:120px; height:16px;border:1px #CCCCCC solid;" />
  <input type="checkbox" checked="checked" value="1" name="anonymous" />
            匿名发表(无需注册) </p></td>
          </tr>
        <tr>
          <td width="367" height="54">
            <textarea name="pj_content" style="width:98%; height:60px; border:1px #CCCCCC solid; "></textarea></td>
          <td width="361" rowspan="2" valign="top"><strong>发表评论须知:</strong><br />
一、所发文章必须遵守《互联网电子公告服务管理规定》;<br />
二、严禁发布供求代理信息、公司介绍、产品信息等广告宣传信息;<br />
三、严禁恶意重复发帖;<br />
四、严禁对个人、实体、民族、国家等进行漫骂、污蔑、诽谤。</td>
        </tr>
        <tr>
          <td height="27"><label>
            <input name="Submit" type="submit" class="inputs" value=" 提 交 " />
            <input name="Submit2" type="reset" class="inputs" value=" 重 置 " />
          </label></td>
          </tr>
		  </form>
      </table></td>
    </tr>
  </table>
</div>
</div>
<%call bottom()%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -