📄 user_mycomment.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../SysCls/KS_UserCommonCls.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2005-2006 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Admin_Index
KSCls.Execute()
Set KSCls = Nothing
Class Admin_Index
Private KSCMS,KSUser
Private CurrentPage,totalPut
Private RS,MaxPerPage
Private ChannelID
Private TempStr,SqlStr
Private InfoIDArr,InfoID
Private Sub Class_Initialize()
MaxPerPage =20
Set KSCMS=New CommonCls
Set KSUser = New UserCls
End Sub
Private Sub Class_Terminate()
Set KSCMS=Nothing
Set KSUser=Nothing
End Sub
Public Sub Execute()
IF Cbool(KSUser.UserLoginChecked)=false Then
Response.Write "<script>location.href='Login.asp';</script>"
Exit Sub
End If
ChannelID=KSCMS.G("ChannelID")
if ChannelID="" Or Not IsNumeric(ChannelID) Then ChannelID=0
KSUser.LoadHead()
%>
<TABLE height="540" cellSpacing=0 width=772 align=center border=0>
<TR>
<TD vAlign=top bgColor=#FFFFFF>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="32"> 当前位置 >> <a href="<%=KSCMS.GetConfig("WebUrl")%>"><%=KSCMS.GetConfig("WebName")%></a> >> <a href="index.asp">会员中心</a> >> 我发表的评论 </td>
</tr>
<tr>
<td>
<%
KSUser.LoadMenu()
%>
</td>
</tr>
</table>
<%
InfoIDArr=GetInfoIDArr(ChannelID)
Select Case KSCMS.G("Action")
Case "Cancel"
Dim ID:ID=KSCMS.G("ID")
Conn.Execute("Delete From KS_Comment Where ID=" & ID & " And ChannelID=" & ChannelID & " And UserName='" & KSUser.Get_UserName & "'")
End Select
If KSCMS.G("page") <> "" Then
CurrentPage = CInt(KSCMS.G("page"))
Else
CurrentPage = 1
End If
Dim Param:Param=" Where UserName='"& KSUser.Get_UserName &"'"
If ChannelID="" Then ChannelID=0
IF ChannelID<>0 Then
Param= Param & " and ChannelID=" & ChannelID
End If
Dim Sql:sql = "select * from KS_Comment "& Param &" order by AddDate DESC"
%>
<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="42">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50" align="center"><img src="Images/comment.gif" /></td>
<td><span class="font3">
我参与的<%
Select Case ChannelID
Case 1
TempStr="文章"
SqlStr="Select NewsID,Title,Tid,Fname From KS_Article Where NewsID In (" & InfoIDArr &")"
Case 2
TempStr="图片"
SqlStr="Select PicID,Title,Tid,Fname From KS_Photo Where PicID In (" & InfoIDArr &")"
Case 3
TempStr="下载"
SqlStr="Select DownID,Title,Tid,Fname From KS_DownLoad Where DownID In (" & InfoIDArr &")"
Case 4
TempStr="动漫"
SqlStr="Select FlashID,Title,Tid,Fname From KS_Flash Where FlashID In (" & InfoIDArr &")"
Case else
SqlStr="Select NewsID From KS_Article Where 1=0"
End Select
Response.Write TempStr%>评论</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="765" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td>
<%
Call Comment()
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<%
KSUser.LoadFoot()
End Sub
Sub Comment()
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
Set RS=Server.CreateObject("AdodB.Recordset")
RS.open SqlStr,conn,1,1
If RS.EOF And RS.BOF Then
Response.Write "<tr><td height=180 valign=top>没有任何" & TempStr & "评论!</td></tr>"
Else
totalPut = RS.RecordCount
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage = 1 Then
Call showContent
Else
If (CurrentPage - 1) * MaxPerPage < totalPut Then
RS.Move (CurrentPage - 1) * MaxPerPage
Call showContent
Else
CurrentPage = 1
Call showContent
End If
End If
End If
%>
</table></td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<%
End Sub
Sub ShowContent()
Dim I,ArticlePath
Do While Not RS.Eof
ArticlePath=KSCMS.GetFolderPath(RS(2), False) & RS(3)
%>
<tr>
<td>
<table width="100%" cellspacing="1" bgcolor="#CCCCCC" border="0" cellpadding="0">
<tr>
<td height="24" bgcolor="#F4F4EA" class="font6"> <%=TempStr%>标题:<a href="<%=ArticlePath%>" target="_blank" class="link3"><%=KSCMS.GotTopic(trim(RS(1)),50)%></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%
Dim RSA,SQL,K
Set RSA=Conn.Execute("Select ID,Content,AddDate,Point,Verific From KS_Comment Where InfoID='" & RS(0) & "' Order By AddDate Desc")
IF Not RSA.Eof Then
SQL = RSA.GetRows(-1)
For K=0 To Ubound(SQL,2)
Response.Write "<tr bgcolor=#ffffff onmouseover=""this.style.background='#F5f5f5'"" onmouseout=""this.style.background='#FFFFFF'"">"
Response.Write "<td width=20 align=center>" & K+1 & "、</td><td height=22 width='375'><a href='User_EditComment.asp?ID=" & SQL(0,K)& "&Page=" & CurrentPage & "'>评论内容:"
Response.Write KSCMS.GotTopic(SQL(1,k),50)
Response.Write "</a></td>"
Response.Write "<td align=left width=70>评分:" &SQL(3,K) & "</td>"
Response.Write "<td align=center width=200>发表时间:" &SQL(2,K) & "</td>"
if SQL(4,K)=1 Then
Response.Write "<td align=center><font color=green>已审</font></td>"
else
Response.Write "<td align=center><font color=red>未审</font></td>"
end if
Response.Write "<td align=center><a href='User_EditComment.asp?ID=" & SQL(0,K)& "&Page=" & CurrentPage & "'>修改</a> <a href='User_MyComment.asp?Action=Cancel&ChannelID=" & ChannelID &"&ID="& SQL(0,k) &"&Page=" & CurrentPage & "' onclick=""return(confirm('确定删除此评论吗?'))"">删除</a></td>"
Response.Write "</tr>"
Response.Write "<tr>"
Response.Write "<td colspan=6 background=""images/bg.gif""></td>"
Response.Write " </tr>"
Next
End IF
RSA.Close : Set RSA = Nothing
%>
</table>
</td>
</tr>
<tr><td height=5></td></tr>
<%
RS.MoveNext
I = I + 1
If I >= MaxPerPage Then Exit Do
Loop
%>
</table>
</td>
</tr>
<% IF totalPut>MaxPerPage Then%>
<tr>
<td height="30" background="images/MenuBottomBg.gif">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<%
Call KSCMS.ShowPageParamter(totalPut, MaxPerPage, "User_MyComment.asp", True, "条" & TempStr, CurrentPage, "ChannelID=" & ChannelID)
%>
</td>
</tr>
</table>
</td>
</tr>
<%End IF
End Sub
Function GetInfoIDArr(ChannelID)
Dim RSObj,I
Set RSObj=Conn.Execute("Select Distinct(InfoID) From KS_Comment Where UserName='" & KSUser.Get_UserName & "' And ChannelID=" & ChannelID)
IF RSObj.Eof And RSObj.Bof Then
GetInfoIDArr="'0'"
Else
I=0
Do While Not RSObj.Eof
IF I=0 Then
GetInfoIDArr="'" & RSObj(0) & "'"
Else
GetInfoIDArr= GetInfoIDArr & ",'" & RSObj(0) &"'"
End IF
I=I+1
RSObj.MoveNext
Loop
End IF
RSObj.Close
Set RSObj=Nothing
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -