<% '**************************************************** ' 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 KS:Set KS=New PublicCls Dim Channelid,ID,RS,ArticleContent,PayTF ChannelID=KS.ChkClng(KS.S("M")) ID=KS.ChkClng(KS.S("ID")) if ID=0 Or ChannelID=0 then Response.Write"" Response.End end if Set RS=Server.CreateObject("ADODB.RECORDSET") RS.Open "Select a.*,ClassPurview From "& KS.C_S(ChannelID,2) & " a inner join ks_class b on a.tid=b.id Where a.ID=" & ID,Conn,1,1 IF RS.EOF AND RS.BOF THEN RS.CLOSE:SET RS=NOthing Call CloseConn() Set KS=Nothing Response.Write"" Response.End END IF Dim InfoPurview:InfoPurview=Cint(RS("InfoPurview")) Dim ReadPoint:ReadPoint=Cint(RS("ReadPoint")) Dim ChargeType:ChargeType=Cint(RS("ChargeType")) Dim PitchTime:PitchTime=Cint(RS("PitchTime")) Dim ReadTimes:ReadTimes=Cint(RS("ReadTimes")) Dim ClassID:ClassID=RS("Tid") Dim KSUser:Set KSUser=New UserCls Dim UserLoginTF:UserLoginTF=Cbool(KSUser.UserLoginChecked) If ReadPoint>0 Then IF UserLoginTF=false Then Call GetNoLoginInfo Else Call PayPointProcess() End If ElseIf InfoPurview=2 Then IF UserLoginTF=false Then Call GetNoLoginInfo Else IF InStr(RS("ArrGroupID"),KSUser.GroupID)=0 Then ArticleContent="
对不起,你没有查看本文的权限!
" Else Call PayPointProcess() End If End If ElseIF InfoPurview=0 And (RS("ClassPurview")=1 Or RS("ClassPurview")=2) Then If UserLoginTF=false Then Call GetNoLoginInfo Else Call PayPointProcess() End If Else Call PayPointProcess() End If '收费扣点处理过程 Sub PayPointProcess() Dim UserChargeType:UserChargeType=KSUser.ChargeType If Cint(ReadPoint)>0 Then If UserChargeType=1 Then Select Case ChargeType Case 0:Call CheckPayTF("1=1") Case 1:Call CheckPayTF("datediff('h',AddDate," & SqlNowString & ")<" & PitchTime) Case 2:Call CheckPayTF("Times<" & ReadTimes) Case 3:Call CheckPayTF("datediff('h',AddDate," & SqlNowString & ")<" & PitchTime & " or Times<" & ReadTimes) Case 4:Call CheckPayTF("datediff('h',AddDate," & SqlNowString & ")<" & PitchTime & " and Times<" & ReadTimes) Case 5:Call PayConfirm() End Select Elseif UserChargeType=2 Then If KSUser.GetEdays <=0 Then ArticleContent="
对不起,你的账户已过期 " & Edays & " 天,此文需要在有效期内才可以查看,请及时与我们联系!
" Else Call GetContent() End If Else Call GetContent() end if Else Call GetContent() End IF End Sub '检查是否过期,如果过期要重复扣点券 '返回值 过期返回 true,未过期返回false Sub CheckPayTF(Param) Dim SqlStr:SqlStr="Select top 1 Times From KS_LogPoint Where ChannelID=" & ChannelID & " And InfoID=" & ID & " And InOrOutFlag=2 and UserName='" & KSUser.UserName & "' And (" & Param & ") Order By ID" Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET") RS.Open SqlStr,conn,1,3 IF RS.Eof And RS.Bof Then Call PayConfirm() Else RS.Movelast RS(0)=RS(0)+1 RS.Update Call GetContent() End IF RS.Close:Set RS=nothing End Sub Sub PayConfirm() If UserLoginTF=false Then Call GetNoLoginInfo():Exit Sub If Cint(KSUser.GetUserInfo("Point"))" & ReadPoint & " " & KS.Setting(46) & KS.Setting(45) &",你还有 " & KSUser.GetUserInfo("Point") & " " & KS.Setting(46) & KS.Setting(45) & ",请及时与我们联系!" Else If PayTF="yes" Then IF Cbool(KS.PointInOrOut(ChannelID,RS("ID"),KSUser.UserName,2,ReadPoint,"系统","阅读收费" & KS.C_S(ChannelID,3) & ":
" & RS("Title"),0))=True Then Call GetContent() Else ArticleContent="
阅读本文需要消耗 " & ReadPoint & " " & KS.Setting(46) & KS.Setting(45) &",你目前尚有 " & KSUser.GetUserInfo("Point") & " " & KS.Setting(46) & KS.Setting(45) &"可用,阅读本文后,您将剩下 " & KSUser.GetUserInfo("Point")-ReadPoint & " " & KS.Setting(46) & KS.Setting(45) &"
你确实愿意花 " & ReadPoint & " " & KS.Setting(46) & KS.Setting(45) & "来阅读此文吗?
 
我愿意 我不愿意
" End If End If End Sub Sub GetNoLoginInfo() ArticleContent="
对不起,你还没有登录,本文至少要求本站的注册会员才可查看!
如果你还没有注册,请点此注册吧!
如果您已是本站注册会员,赶紧点此登录吧!
" End Sub Sub GetContent() ArticleContent=Replace(RS("ArticleContent"),"[NextPage]","") End Sub %> <%=rs("title")%>-打印文章
打印本文 打印本文  关闭窗口 关闭窗口  
<%=RS("Title")%>
作者:<%=RS("Author")%>  文章来源:<%=RS("Origin")%>  点击数 <%=RS("Hits")%>  更新时间:<%=RS("AddDate")%>  文章录入:<%=RS("Inputer")%>

<%=KS.HtmlCode(ArticleContent)%>
<%set ks=nothing conn.close set conn=nothing %>