<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%option explicit%> <% '****************************************************************** ' Software name:KesionCMS X1.0 '****************************************************************** Dim KSCls Set KSCls = New SiteMaps KSCls.Kesion() Set KSCls = Nothing Class SiteMaps Private KS, KSR,ModelTable,XML,Node,Key,TotalPut,MaxPerPage,ChannelID,ID,Tid,OrderStr,PageNum,StartTime,CurrPage,Param Private Sub Class_Initialize() If (Not Response.IsClientConnected)Then Response.Clear Response.End End If Set KS=New PublicCls Set KSR = New Refresh End Sub Private Sub Class_Terminate() Call CloseConn() Set KS=Nothing End Sub Public Sub Kesion() ChannelID=114 MaxPerPage=12 ID=KS.ChkClng(KS.S("id")) Dim FileContent Dim MapTemplatePath:MapTemplatePath="template/口碑.html" '模板地址 FileContent = KSR.LoadTemplate(MapTemplatePath) FCls.RefreshType = "param" '设置刷新类型,以便取得当前位置导航等 FCls.RefreshFolderID = "0" '设置当前刷新目录ID 为"0" 以取得通用标签 Dim RS:Set RS=Conn.Execute("Select top 1 a.*,ClassPurview,DefaultArrGroupID,DefaultReadPoint,DefaultChargeType,DefaultPitchTime,DefaultReadTimes From " & KS.C_S(ChannelID,2) & " a inner join KS_Class b on a.tid=b.id Where a.ID=" & ID) IF RS.Eof And RS.Bof Then RS.Close:Set RS=Nothing KS.ShowTips "error","您要查看的" & KS.C_S(ChannelID,3) & "已删除。或是您非法传递注入参数!" End IF Dim DocXML:Set DocXML=KS.RsToXml(RS,"row","root") : RS.Close:Set RS=Nothing With KSR Set .Node=DocXml.DocumentElement.SelectSingleNode("row") .Tid=.Node.SelectSingleNode("@tid").text .oTid=.Node.SelectSingleNode("@otid").text Call FCls.SetContentInfo(ChannelID,.Tid,.Otid,ID,.Node.SelectSingleNode("@title").text) Tid=.Tid Dim N,K,PageStr,NextUrl,PrevUrl .ModelID = ChannelID .ItemID = ID .Templates="" .Scan FileContent FileContent = .Templates FileContent = .KSLabelReplaceAll(FileContent) End With Dim CommentID:CommentID=12 DiM Floor:Floor=Conn.Execute("Select count(1) From KS_Comment Where ProjectID=" & CommentID & " and ChannelID=" & ChannelID & " and InfoID=" & ID & " and verific=1")(0) FileContent=Replace(FileContent,"{#CommentNum}",Floor) Set RS=Conn.Execute("Select top 1 ProjectContent,IsRewrite From KS_MoodProject Where ID=" & CommentID) If Not RS.Eof Then Dim NN,ProjectContentArr ProjectContentArr=Split(RS(0),"$$$") Dim AvgStr:AvgStr="" Dim TotalScore:TotalScore=0 Dim tn:tn=0 For NN=0 To Ubound(ProjectContentArr) if Split(ProjectContentArr(NN),"|")(0)<>"" then tn=tn+1 dim score:score=conn.execute("select avg(m" & nn&") from ks_comment where verific=1 and channelid=" & ChannelID & " and infoid=" & Id &" and projectid=" & Commentid)(0) if not isnumeric(score) then score=0 TotalScore=TotalScore+score AvgStr=AvgStr & "
  • "& vbcrlf AvgStr=AvgStr &"
    " & Split(ProjectContentArr(NN),"|")(0) & "
    "&vbcrlf AvgStr=AvgStr &"
    " &vbcrlf AvgStr=AvgStr &" " &vbcrlf AvgStr=AvgStr &" " &vbcrlf AvgStr=AvgStr &" " &vbcrlf AvgStr=AvgStr &"
    " &vbcrlf AvgStr=AvgStr &"
    " & round(score,2) & "分
    " &vbcrlf AvgStr=AvgStr &"
    " &vbcrlf AvgStr=AvgStr &"
  • " &vbcrlf End If Next if tn>0 then TotalScore=Round(TotalScore/tn,2) FileContent=Replace(FileContent,"{#TotalScore}",TotalScore) FileContent=Replace(FileContent,"{#ShowAvg}",avgstr) End If ks.die FileContent End Sub End Class %>