<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%option explicit%> <% '**************************************************** ' Software name:Kesion CMS 7.0 ' Email: service@kesion.com . QQ:111394,9537636 ' Web: http://www.kesion.com http://www.kesion.cn ' Copyright (C) Kesion Network All Rights Reserved. '**************************************************** Dim KSCls Set KSCls = New User_Favorite KSCls.Kesion() Set KSCls = Nothing Class User_Favorite Private KS,KSUser Private CurrentPage,totalPut Private RS,MaxPerPage Private ChannelID Private TempStr,SqlStr Private InfoIDArr,InfoID Private Sub Class_Initialize() MaxPerPage =10 Set KS=New PublicCls Set KSUser = New UserCls End Sub Private Sub Class_Terminate() Set KS=Nothing Set KSUser=Nothing End Sub %> <% Public Sub loadMain() Call KSUser.Head() Call KSUser.InnerLocation("我的收藏夹") KSUser.CheckPowerAndDie("s16") %>
<% Select Case KS.S("Action") Case "Add" Dim RSAdd InfoID=KS.ChkClng(KS.S("InfoID")) If InfoID=0 Then Response.Write "" Response.End() End If Set RSAdd=Server.CreateObject("Adodb.Recordset") ChannelID=KS.ChkClng(KS.S("ChannelID")) RSADD.Open "Select * From KS_Favorite Where ChannelID=" & ChannelID & " And InfoID=" & InfoID & " And UserName='" & KSUser.UserName & "'",Conn,1,3 IF RSADD.Eof And RSADD.Bof Then RSADD.AddNew RSAdd(1)=KSUser.UserName RSAdd(2)=ChannelID RSAdd(3)=InfoID RSAdd(4)=Now RSAdd.Update End IF RSADD.Close:SET RSADD=Nothing Case "Cancel" InfoID=KS.S("InfoID") InfoID=Replace(InfoID," ","") InfoID=KS.FilterIDs(InfoID) If InfoID="" Then Response.Write "" Response.End End If Conn.Execute("Delete From KS_Favorite Where ID In(" & InfoID & ") And UserName='" & KSUser.UserName & "'") End Select If KS.S("page") <> "" Then CurrentPage = CInt(KS.S("page")) Else CurrentPage = 1 End If Dim Param:Param=" Where UserName='"& KSUser.UserName &"'" If ChannelID="" or not isnumeric(ChannelID) Then ChannelID=0 IF ChannelID<>0 Then Param= Param & " and ChannelID=" & ChannelID %> <% Set RS=Server.CreateObject("AdodB.Recordset") SqlStr="Select ID,ChannelID,InfoID,AddDate From KS_Favorite "& Param &" and Channelid<>6 order by id desc" RS.open SqlStr,conn,1,1 If RS.EOF And RS.BOF Then Response.Write "" Else totalPut = RS.RecordCount If CurrentPage < 1 Then CurrentPage = 1 If CurrentPage >1 and (CurrentPage - 1) * MaxPerPage < totalPut Then RS.Move (CurrentPage - 1) * MaxPerPage Else CurrentPage = 1 End If Call ShowContent End If %>
您的收藏夹没有内容!
<% End Sub Sub ShowContent() Dim I,SQL,K Response.Write "
" SQL=RS.GetRows(-1) For K=0 To Ubound(SQL,2) %> <% Select Case KS.C_S(SQL(1,K),6) Case 1 SqlStr="Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,hits From " & KS.C_S(SQL(1,K),2) &" Where ID=" & SQL(2,K) Case 2 SqlStr="Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0,AddDate,hits From " & KS.C_S(SQL(1,K),2) &" Where ID=" & SQL(2,K) Case 3 SqlStr="Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0,AddDate,hits From " & KS.C_S(SQL(1,K),2) &" Where ID=" & SQL(2,K) Case 4 SqlStr="Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0,AddDate,hits From " & KS.C_S(SQL(1,K),2) &" Where ID=" & SQL(2,K) Case 5 SqlStr="Select ID,Title,Tid,0,0,Fname,0,AddDate,hits From KS_Product Where ID=" & SQL(2,K) Case else SqlStr="Select ID From KS_Article Where 1=0" End Select Dim RSF:Set RSF=Conn.Execute(SqlStr) If Not RSF.Eof Then Response.Write "
" & RSF(1) & "
" Response.Write "
" Response.Write "类型:" & KS.C_S(SQL(1,K),3) & " 收藏时间:" & KS.GetTimeFormat(SQL(3,K)) & " 信息最后更新:" & KS.GetTimeFormat(RSF(7)) & " 人气:" & RSF(8) End If %>
取消收藏 <% Next %>  选中本页显示的所有收藏
<%Call KS.ShowPage(totalput, MaxPerPage, "", CurrentPage,false,true)%> <% End Sub End Class %>