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

📄 admin_comment.asp

📁 正版创力4.1SQL商业版!!!ASP版。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
    
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr align="center" class="title"> 
      <td height="22" colspan="4"> <strong>修 改 评 论 </strong></td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">评论人姓名:</td>
      <td class="tdbg" width="200"> 
        <input name="UserName" type="text" id="UserName" maxlength="16" value="<%=rs("UserName")%>" disabled>
      </td>
      <td class="tdbg" align="right" width="101">评论人Email:</td>
      <td class="tdbg" width="475"> 
        <input name="UserEmail" type="text" id="UserEmail" maxlength="40" value="<%=rs("UserEmail")%>">
      </td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">评论时间:</td>
      <td class="tdbg" width="200"> 
        <input name="CommentTime" type="text" id="CommentTime" value="<%=rs("CommentTime")%>">
      </td>
      <td class="tdbg" align="right" width="101">评论人IP:</td>
      <td class="tdbg" width="475"> 
        <input name="IP" type="text" id="UserIP"  maxlength="15" value="<%=rs("UserIP")%>">
      </td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">评论内容:</td>
      <td class="tdbg" colspan="3"> 
        <textarea name="CommentContent" cols="56" rows="8" id="Content"><%=rs("CommentContent")%></textarea>
      </td>
    </tr>
    <tr align="center"> 
      <td height="30" colspan="4" class="tdbg"> 
        <input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
        <input name="Action" type="hidden" id="Action" value="SaveModify">
        <input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>">
        <input name="UserGroupID" type="hidden" id="UserGroupID" value="<%=rs("UserGroupID")%>">
        <input  type="submit" name="Submit" value=" 保存修改结果 ">
      </td>
    </tr>
  </table>
</form>
<%
	end if
	rs.close : set rs=Nothing
end sub

sub Reply()
	dim CommentID
	CommentID=Trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请指定评论ID</li>"
		Exit sub
	else
		CommentID=Clng(CommentID)
	end if
	Dim strSql,strSql2
	strSql="M.CommentID,M.InfoID,M.UserGroupID,M.UserName,M.Email,M.IP,M.CommentTime,M.Score,M.Content,M.ReplyName,M.ReplyContent,M.ReplyTime from Cl_Comment M Left join"
	strSql2=" where M.ChannelID="&ChannelID&" and I.ChannelID="&ChannelID&" and M.CommentID=" & CommentID
	Select Case Clng(Cl.Channel.selectSingleNode("@moduleid").text)
	Case 1
	sql="select I.InfoID,I.ClassID,I.Title,"&strSql&" Cl_Article I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	Case 2
	sql="select I.InfoID,I.ClassID,I.SoftName,"&strSql&" Cl_Soft I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	Case 3
	sql="select I.InfoID,I.ClassID,I.PhotoName,"&strSql&" Cl_Photo I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	Case 4
	sql="select I.InfoID,I.ClassID,I.MovieName,"&strSql&" Cl_Movie I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	Case 5
	sql="select I.InfoID,I.ClassID,I.ProductName,"&strSql&" Cl_Product I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	Case Else
	sql="select I.InfoID,I.ClassID,I.Title,"&strSql&" Cl_Article I On M.InfoID=I.InfoID "&strSql2&" order by I.InfoID desc"
	end Select
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,Conn,1,1
	if rs.Bof or rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>找不到指定的评论!</li>"
	else
	
%>
<form method="post" action="Admin_Comment.asp?ChannelID=<%=ChannelID%>" name="form1">
    
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr align="center" class="title"> 
      <td height="22" colspan="2"> <strong>回 复 评 论</strong></td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">评论标题:</td>
      <td class="tdbg"><%=rs(2)%></td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">用 户 名:</td>
      <td class="tdbg"><%=rs("UserName")%></td>
    </tr>
    <tr> 
      <td width="200" align="right" class="tdbg">评论内容:</td>
      <td class="tdbg"><%=rs("Content")%></td>
    </tr>
    <tr>
      <td align="right" class="tdbg">回复内容:</td>
      <td class="tdbg"><textarea name="ReplyContent" cols="50" rows="6" id="ReplyContent"><%=rs("ReplyContent")%></textarea></td>
    </tr>
    <tr align="center"> 
      <td height="30" colspan="2" class="tdbg"><input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
	  <input name="Action" type="hidden" id="Action" value="SaveReply">
        <input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>"> 
        <input  type="submit" name="Submit" value=" 回 复 "> </td>
    </tr>
  </table>
</form>
<%
	end if
	rs.close:set rs=Nothing
end sub
%>
</body>
</html>
<%
sub DelComment()
	dim CommentID,i
	CommentID=Trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请指定评论ID</li>"
		Exit sub
	end if

	if instr(CommentID,",")>0 then
		dim idarr
		idArr=split(CommentID)
		for i = 0 to ubound(idArr)
		    Cl.Execute "delete from Cl_Comment where Commentid=" & Clng(idArr(i))
		next
	else
		Cl.Execute "delete from Cl_Comment where Commentid=" & Clng(CommentID)
	end if
	Cl.SaveAdminLog
	response.redirect ComeUrl
End sub

sub DelCommentAll()

	if InfoID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请指定要删除评论的ID</li>"
		Exit sub
	else
		InfoID=Clng(InfoID)
	end if
	
	Cl.Execute "delete from Cl_Comment where ChannelID="&ChannelID&" and InfoID=" & InfoID
	Cl.SaveAdminLog
	response.redirect ComeUrl
End sub

sub SaveModify()
	dim rsComment,ClassID,tClass,CommentID
	dim UserGroupID,CommentUName
	dim CommentUEmail,CommentUIP,CommentCommentTime
	dim CommentUScore,CommentUContent
	CommentID=Trim(Request("CommentID"))
	UserGroupID=Clng(request("UserGroupID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请指定评论ID</li>"
		Exit sub
	end if
	if UserGroupID=5 then
		CommentUName=Trim(request.form("UserName"))
		if CommentUName="" then
			founderr=true
			errmsg=errmsg & "<br /><li>请输入姓名</li>"
			Exit sub
		end if
		CommentUEmail=Trim(request.form("UserEmail"))
	end if
	CommentUIP=Trim(request.form("UserIP"))
	CommentCommentTime=Trim(request.form("CommentTime"))
	CommentUContent=Trim(request.Form("Content"))
	if CommentUContent="" or CommentUIP="" or CommentUScore="" then
		founderr=true
		errmsg=errmsg & "<br /><li>请完整输入评论内容、评论时间、评论人IP等信息</li>"
	end if
	CommentUContent=Cl.HTMLEncode(CommentUContent)
	if CommentCommentTime="" then
		CommentCommentTime=now()
	else
		CommentCommentTime=Cdate(CommentCommentTime)
	end if
	if FoundErr=True then exit sub
	sql="Select * from Cl_Comment where ChannelID="&ChannelID&" and CommentID=" & CommentID
	Set rsComment=Server.CreateObject("Adodb.RecordSet")
	rsComment.Open sql,Conn,1,3
	if rsComment.Bof or rsComment.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>找不到指定的评论!</li>"
	else
		if UserGroupID=5 then
			'rsComment("UserGroupID")=UserGroupID
			rsComment("UserName")=CommentUName
			rsComment("UserEmail")=CommentUEmail
		end if
		rsComment("UserIP")=CommentUIP
		rsComment("CommentTime")=CommentCommentTime
		rsComment("CommentContent")=CommentUContent
		rsComment.update
	end if
	rsComment.Close
	set rsComment=Nothing
	ComeUrl=Trim(request("ComeUrl"))
	if ComeUrl="" then ComeUrl=FileName
	Cl.SaveAdminLog
	response.redirect ComeUrl
end sub

sub SaveReply()
	dim CommentID,ReplyName,ReplyContent,ReplyTime
	CommentID=Trim(Request("CommentID"))
	ReplyContent=Trim(request("ReplyContent"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请指定评论ID</li>"
		Exit sub
	else
		CommentID=Clng(CommentID)
	end if
	if ReplyContent="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>请输入回复内容</li>"
	end if
	if FoundErr=True then exit sub
	sql="Select * from Cl_Comment where ChannelID="&ChannelID&" and CommentID=" & CommentID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,Conn,1,3
	if rs.Bof or rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br /><li>找不到指定的评论!</li>"
	else
		rs("ReplyName")=Cl.MemberName
		rs("ReplyTime")=now()
     	rs("ReplyContent")=Cl.HTMLEncode(ReplyContent)
     	rs.update
	end if
	rs.Close
   	set rs=Nothing
	ComeUrl=Trim(request("ComeUrl"))
	if ComeUrl="" then ComeUrl=FileName
	Cl.SaveAdminLog
	response.redirect ComeUrl
end sub

sub SetPass()
	Dim CommentID
	CommentID=Cl.GetClng(Request("CommentID"))
	if CommentID=0 then
		Cl.ShowErr("<br /><li>请指定评论ID</li>")
	End If
	Set Rs = Cl.Execute("Select ParentID From Cl_Comment where CommentID=" & CommentID)
	If Rs.Eof Then
		Set Rs=Nothing
		Cl.ShowErr("<br /><li>请指定评论ID</li>")
	End If
	Cl.Execute("Update Cl_Comment Set ReplyCount=ReplyCount+1 where CommentID=" & Cl.GetClng(Rs(0)))
	Set Rs = Nothing
	Cl.Execute("Update Cl_Comment Set Status=1 where CommentID=" & CommentID)
	'ComeUrl=Trim(request("ComeUrl"))
	if ComeUrl="" then ComeUrl=FileName
	Cl.SaveAdminLog
	response.redirect ComeUrl
end sub

sub SetNoPass()
	Dim CommentID,Rs
	CommentID=Cl.GetClng(Request("CommentID"))
	if CommentID="" then
		Cl.ShowErr("<br /><li>请指定评论ID</li>")
	End If
	Set Rs = Cl.Execute("Select ParentID From Cl_Comment where CommentID=" & CommentID)
	If Rs.Eof Then
		Set Rs=Nothing
		Cl.ShowErr("<br /><li>请指定评论ID</li>")
	End If
	Cl.Execute("Update Cl_Comment Set ReplyCount=ReplyCount-1 where CommentID=" & Rs(0))
	Set Rs = Nothing
	Cl.Execute("Update Cl_Comment Set Status=0 where CommentID=" & CommentID)
	'ComeUrl=Trim(request("ComeUrl"))
	if ComeUrl="" then ComeUrl=FileName
	Cl.SaveAdminLog
	response.redirect ComeUrl
end sub
%>
<%
'<!--
'┌───────────────────────────────────────────────────────┐
'│														 │
'│		CreateLive CMS Version 4.0						 │
'│        				Powered by Aspoo.CN	 	 │
'│ 		          						 │
'│ 	邮箱: support@aspoo.cn		Info@aspoo.cn  	 │
'│		QQ: 3315263				596197794			 │
'│		网站: www.aspoo.cn			www.aspoo.com		 │
'│		论坛: bbs.aspoo.cn			bbs.aspoo.com		 │
'│														 │
'│	Copyright (C) 2005-2007 Aspoo.CN All Rights Reserved.	 │
'└───────────────────────────────────────────────────────┘
'-->
%>

⌨️ 快捷键说明

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