comment.asp

来自「top-cms内容管理系统」· ASP 代码 · 共 107 行

ASP
107
字号
<%
'###########################################################################################
'*  程序名称: Top-CMS
'*---------------------------------------------------------------------------------------
'*  系统版本: 1.0 0215
'*  版权所有: www.Net-Develop.com
'*  程序设计: 江南行客
'*  联系方式:
'*            OICQ:2503086
'*            EMAIL:net-oa@sohu.com
'*  网站地址: 
'*            http://www.net-develop.com  
'*            http://www.top-cms.com   
'*---------------------------------------------------------------------------------------
'*  Copyright 2004 www.net-develop.com - All Rights Reserved.
'###########################################################################################
%>
<!--#include file="../common/common.asp" -->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style.css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<%
Set objCMS = Server.CreateObject("TopCMS.Comment")
if objCMS.ChkAdminPower then
	iID=objCMS.ChkString(replace(Request("iID")," ",""),"U")
	cID=objCMS.ChkString(Request("cID"),"N")
	sID=objCMS.ChkString(Request("sID"),"N")
	P1=objCMS.ChkString(Request("P1"),"U")
	T=objCMS.ChkString(Request("T"),"U")
	if iID="" or sID="" then
		objCMS.OutInfo "对不起,操作出错",""
		response.end
	elseif instr(iID,",")>0 then
		objCMS.OutInfo "一次只能管理一条信息的评论",""
		response.end
	end if
	SystemI_Init
	objCMS.OpenDB()
	
	if UCase(T)="DEL" and cID<>""  then objCMS.DelComment sID,cID
	
	dbSql = "SELECT iTitle FROM db_Information Where iID=" & CInt(iID)
	Set dbRs=objCMS.MyRs(dbSql,1,1,1)
	if not dbRs.eof then 
		iTitle=Trim(dbRs("iTitle"))
	end if
	dbRs.close
	set dbRs=nothing
	%>
		
 
  <table width="100%" border="1" bordercolor="#999999" cellspacing="0" cellpadding="2" align="center">
    <tr> 
      
    <td colspan="2" background="../Images/default_nav.gif"><font color="#FFFFFF">评论信息主题:<%=iTitle%>&nbsp;&nbsp;</font>[<a href="subcategory.asp?sID=<%=sID%>&P=<%=P1%>">返回</a>]</td> 
    </tr>
	<%
	dbSql = "SELECT cID,cName,cEmail,cComment,cDate FROM db_Comment Where iID=" & CInt(iID)
	
	Set dbRs=objCMS.MyRs(dbSql,1,1,0)
	if dbRs.eof then
	%>
	<tr bgcolor="#EEEEEE"> 
      
    <td align="center">[没有任何有关此信息的评论]</td>
    </tr>
	<%
	else
		objCMS.PagingMain dbRs,16
		nPage=objCMS.PNum
		i=0
		Do While not dbRs.eof and nPage>0
			%>
			<tr bgcolor="<%if i mod 2=0 then response.write "#EEEEEE" else response.write "#FFFFFF"%>"> 
    <td> 
      <p><%= dbRs("cComment")%> </p>
      <p align="right"> 
	  评论人:
	  <a href="mailto:<%=trim(dbRs("cEmail"))%>"><%=dbRs("cName")%></a>&nbsp;&nbsp;&nbsp;&nbsp;评论时间:<%=dbRs("cDate")%>&nbsp;&nbsp;&nbsp;&nbsp;[<a href="?iID=<%=iID%>&sID=<%=sID%>&T=DEL&cID=<%=dbRs("cID")%>&P1=<%=P1%>&P=<%=request("P")%>">删除</a>]</p>
    </td>
    </tr>
			<%
			dbRs.movenext
			i=i+1
			nPage=nPage-1
		loop
	end if
	dbRs.close
	set dbRs=nothing
	%>
   
  </table>
  <%objCMS.DisplayNavigation("iID=" & iID & "&sID=" & sID & "&P1=" & P1 & "&")%>
<%
	objCMS.CloseDB	
else
	objCMS.OutInfo "对不起,您还没有登录,请先登录","Login"
end if
set objCMS=nothing
%>
</body>
</html>

⌨️ 快捷键说明

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