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

📄 admin_comment.asp

📁 淘客网上商店网站程序 淘客网上商店网站程序 淘客网上商店网站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		End If
		if rs("Argue")=1 Then
			Response.write "&nbsp;<font color='#FF0000'>辩</font>"
		Else
			Response.write "&nbsp;<font color='#C5C5C5'>辩</font>"
		End if
		%></td>
		<td width="80" align="center"><%
		if rs("Status")=1 then
			response.write "<a href='Admin_Comment.asp?ChannelID="&ChannelID&"&Action=SetNoPass&CommentID=" & rs("Commentid") & "'>取消</a>&nbsp;"
		else
			response.write "<a href='Admin_Comment.asp?ChannelID="&ChannelID&"&Action=SetPass&CommentID=" & rs("Commentid") & "'><font color='#ff0033'>审核</font></a>&nbsp;"
		end if
		response.write "<a href='Admin_Comment.asp?ChannelID="&ChannelID&"&Action=Modify&CommentID=" & rs("Commentid") & "'>修改</a>&nbsp;" 
		response.write "<a href='Admin_Comment.asp?ChannelID="&ChannelID&"&Action=Del&CommentID=" & rs("CommentID") & "' onclick='return ConfirmDel();'>删除</a>"
		%></td>
	</tr>
	<%
	'i = i+1
	'if i >= PageSize Then Exit Do
	'PrevID=rs(0)
	rs.movenext
	If rs.Eof Then Exit For
Next
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox" /> 选中本页所有</td>
	<td>
		<input name="submit" type='submit' value='删除选定的评论' />
		<input name="Action" type="hidden" id="Action" value="Del" /></td>
	</tr>
</table>
</form>
<%
end sub 

sub Modify()
	dim CommentID
	CommentID=Cl.GetClng(Request("CommentID"))
	if CommentID=0 then
		Cl.ShowErr("<br /><li>请指定评论ID</li>")
	end if
	sql="Select * from Cl_Comment where CommentID=" & CommentID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,Conn,1,1
	if rs.Bof or rs.EOF then
		Cl.ShowErr("<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="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 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 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 + -