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

📄 newspl.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<%
id=trim(request("id"))

if (not isNumeric(ID)) then
  Response.Write "<Script Language=JavaScript>alert('ID参数错误或有非法字符或没指定参数,请勿随意提交数据!');</Script>"
  response.end  
end if

sql = "select * from news where id="&clng(ID)
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
	title=rs("title")
end if
rs.close
set rs=nothing

IF Request.Cookies(Art2008)("UserName")<>"" and Request.Cookies(Art2008)("PassWord") <>"" then  

Plusername=Request.Cookies(Art2008)("UserName")
Plpass=Request.Cookies(Art2008)("PassWord")
end if

sql = "select * from newspl where sh=1 and newsid="&clng(id)
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1

pls=rs.recordcount

%>
<html>

<head>
<title>查看发表评论 <%=title%></title>

<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
INPUT        {BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #666666 1px solid; COLOR: #666666; BORDER-BOTTOM: #666666 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff}
body         {margin-top: 0;	margin-bottom: 0;	margin-left:0;	margin-right:0;	color: #000000;	background-color: #F4F4F4;}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
.style1      {color: #FF9933;	font-weight: bold;}
.style4      {color: #3366CC}
.wz3         {font-size: 9pt;	color: #222222;	line-height: 20px;}
-->
</STYLE>
<link rel="stylesheet" type="text/css" href="Css.css" >
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin=0 topmargin=0  oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false'>
<noscript> 
<iframe src=*></iframe> 
</noscript>

<table width="785" height="326" border="0" align="center" cellpadding="0" cellspacing="0" id="__01">
  <tr bgcolor="#DCDAD2">
    <td height="18" colspan="5"><img src="images/space.gif" width="1" height="10"></td>
  </tr>
  <tr>
    <td width="46" rowspan="4" bgcolor="#DCDAD2"><img src="images/space.gif" width="46" height="1"></td>
    <td colspan="2" rowspan="2" valign="top" bgcolor="#FFFFFF">
      <table width="694"  cellpadding="0" border="1" style="border-collapse: collapse" bordercolor="C0BEB5">
        <tr>
          <td width="686" height="369" valign="top">
              <table width="680" height="377" border="0" cellpadding="0" cellspacing="10" bgcolor="#FFFFFF">
                <TR>
                  <TD width="663" height=25 bgColor=#E6E6FF><IMG src="images/TEAM.gif" width="16" height="16" align=absMiddle><B>&nbsp;评论主题:<font color="red"><%=title%></font></B></TD>
                </TR>
                <TR>
                <tr>
                  <td  valign="top"><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.username.value == "")
  {
    alert("请在 作者 域中输入值。");
    theForm.username.focus();
    return (false);
  }

  if (theForm.username.value.length < 4)
  {
    alert("在 作者 域中,请至少输入 4 个字符。");
    theForm.username.focus();
    return (false);
  }

  if (theForm.username.value.length > 16)
  {
    alert("在 作者 域中,请最多输入 16 个字符。");
    theForm.username.focus();
    return (false);
  }
  
  if (theForm.Anonymous.checked==false && theForm.Pass.value=='')
  {
	 alert('请输入密码或选择游客发表!');
	 theForm.Pass.focus();
	 return (false);
  }
    
  if (theForm.content.value == "")
  {
    alert("请在 评论 域中输入值。");
    theForm.content.focus();
    return (false);
  }
 
  if (theForm.Artyzm.value == "")
  {
    alert("请在 验证码 域中输入值。");
    theForm.Artyzm.focus();
    return (false);
  }

  if (theForm.Artyzm.value.length < 4)
  {
    alert("在 验证码 域中,请至少输入 4 个字符。");
    theForm.Artyzm.focus();
    return (false);
  }

  if (theForm.Artyzm.value.length > 6)
  {
    alert("在 验证码 域中,请最多输入 6 个字符。");
    theForm.Artyzm.focus();
    return (false);
  }

  if (theForm.content.value.length < 5)
  {
    alert("在 评论 域中,请至少输入 5 个字符。");
    theForm.content.focus();
    return (false);
  }

  if (theForm.content.value.length > 300)
  {
    alert("在 评论 域中,请最多输入 300 个字符。");
    theForm.content.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="NewsPL_save.asp?id=<%=id%>" onSubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
                        <div align="center">
                          <table border="1" cellpadding="5" width="670" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0" bgcolor="#F5F5F5">
                            <tr><td height=30 >发表评论&nbsp;&nbsp;<font color=#ff6600>特别声明:评论内容只代表网友个人观点,与本站立场无关。</font></td></tr>
                            <tr><td  align='left'>用户名:<input type='text' name='username' size='12'  value='<%=Plusername%>'  style='background-color: #F5F5F5'>
                            <span id='pp' > 密码:<input class='textbox' name='Pass' size='10' type='password' value='<%=Plpass%>' ></span>
                             &nbsp;&nbsp;认证码:<input name='Artyzm' size='6' maxlength='5'>   <img align='absmiddle' src='<%=root_path%>Include/vCode.asp?' onClick='this.src+=Math.random()' alt='图片看不清?点击重新得到验证码' style='cursor:hand;'>
                             &nbsp;&nbsp;<span><input value='1' onclick="if(this.checked==true){document.all.Pass.disabled=true;document.all.pp.style.display='none';}else{document.all.Pass.disabled=false;document.all.pp.style.display='';}" type=checkbox  name=Anonymous >匿名发表</span>&nbsp;&nbsp;<a href='<%=root_path%>user/reg.asp' target=_parent ><font color=red><u>注册</u><font></a>
                            </td></tr>
                            <tr><td bgcolor="#FFFFFF"> &nbsp;
                                  <textarea rows='6' name='content' cols='80'></textarea></td>
                            </tr>
                          </table>
                        </div>
                        <div align='center'><input type='submit' value=' 提 交 发 表 ' name='B1'>&nbsp;&nbsp;&nbsp; <a href= <%=root_path%>newspl.asp?id=<%=id%> onclick='return newspl(this.href);' target=_blank><font style='font-size:9pt'>查看所有评论</font></a></div></form>
                      
                     
                        <div class=comment>
                        <div class=commentbox>
                        <dl>
                        <dt><span style='vertical-align:middle'><font style='font-size:9pt'>评论总共:<font color=red><%=pls%></font> 条评论)</font></span></dt>
                        </dl>
						
						<%
	if rs.recordcount<>0 then
	
	page=int(request("page"))
rs.PageSize=10
pagecount=rs.pagesize
if page<=0 then page=1
if request("page")="" then page=1
rs.AbsolutePage=page

 for i=1 to pagecount
 
 username=rs("username")
addtime=rs("addtime")
 content=rs("content")
 content=replace(content,chr(10),"")
content=replace(content,chr(13),"<BR>")

N=N+1
UserIP=RS("IP")
UserIP=Replace(UserIP,split(UserIP,".")(3),"*")
IF RS("Anonymous")=0 Then
    Others= "<font color=red>会员</font>:"& username
Else
	Others= "游客:"& username
End IF
	%>                     <dl>
                          <dt><%=Others%>&nbsp;&nbsp;发表时间: <%=addtime%>  &nbsp;&nbsp;IP地址:<%=UserIP%> &nbsp;&nbsp;第 <font color=red> <%=N %></font> 楼  &nbsp;&nbsp;<a href='<%=root_path%>js_news_pl.asp?TAction=Support&Plid=<%=rs("id")%>&Type=1'>支持(<font color=red><%=rs("Y")%></font>)</a> <a href='<%=root_path%>js_news_pl.asp?TAction=Support&Plid=<%=rs("id")%>&Type=0'>反对(<%=rs("N")%>)</a></dt>
                          <dd><%=content%></dd>
						  </dl>
						  
						  <%
	rs.movenext
	if rs.eof then exit for
	next
else
  Response.Write "<dl><dd>暂时无评论</dd></dl>"
end if
	%>
    </div></div>
                                           
                     
                      <center>
                        <%if rs.recordcount<>0 then
  if page>1 then
    response.write "<a href="&request.servervariables("URL")&"?page=1&id="&id&">首页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&page-1&"&id="&id&">上一页</a> "
  end if
  if page<rs.pagecount then
    response.write "<a href="&request.servervariables("URL")&"?page="&page+1&"&id="&id&">下一页</a> "
    response.write "<a href="&request.servervariables("URL")&"?page="&rs.pagecount&"&id="&id&">尾页</a> "
  end if
    response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
  %>
                        <script language="JavaScript">
  <!--
  function FP_jumpMenu(el,frm,sel) {//v1.0
    var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
    if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
    }
    // -->
                </script>
                        <select size="1" onChange="FP_jumpMenu(this,'window',false)" id="select" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
                          <%for i=1 to rs.pagecount%>
                          <option value="<%=request.servervariables("URL")%>?page=<%=i%>&id=<%=id%>" <%if page=i then response.write "selected"%> style="font-size: 9pt">第<%=i%>页</option>
                          <%next%>
                        </select>
                        <%end if%>
                        <br>
                        <br>
                    </center>
                    </td></tr></table>
                    </td></tr></table>   
    
    
    </td>
    <td width="6" height="333" align="left" valign="top" bgcolor="#DCDAD2"><img src="images/news_r.gif" width="6" height="333"></td>
    <td width="40" rowspan="4" bgcolor="#DCDAD2"><img src="images/space.gif" width="1" height="40"></td>
  </tr>
  <tr>
    <td height="13" bgcolor="#DCDAD2"><img src="images/space.gif" width="1" height="13"></td>
  </tr>
  <tr>
    <td width="370" height="18" rowspan="2" bgcolor="#DCDAD2"><img src="images/space.gif" width="1" height="40"></td>
    <td height="5" colspan="2" align="right" valign="top" bgcolor="#DCDAD2"><img src="images/news_d.gif" width="329" height="5"></td>
  </tr>
  <tr>
    <td height="13" colspan="2" bgcolor="#DCDAD2"><img src="images/space.gif" width="1" height="35"></td>
  </tr>
  <tr>
    <td><img src="images/space.gif" width="40" height="1"></td>
    <td><img src="images/space.gif" width="326" height="1"></td>
    <td width="323"><img src="images/space.gif" width="323" height="1"></td>
    <td><img src="images/space.gif" width="6" height="1"></td>
    <td><img src="images/space.gif" width="40" height="1"></td>
  </tr>
</table>
</body>

</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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