<% Response.ClearContent() Response.ContentType = "text/xml" Member.CheckLogin() Dim ThisId As Integer = Val(Request.QueryString("id")) Dim UserID As Integer = Val(GetSession("UserID")) Response.Write("") If FilterStr(Request.QueryString("act")) = "save" Then If UserID = 0 Then Response.Write("请先登录") ElseIf Not CheckCode(FilterStr(Request.Form("Proof")).ToLower) Then Response.Write("验证码错误，请刷新后重填！") ElseIf Questions.Add(2, ThisID, UserID, FilterStr(Request.form("Questions"))) = 0 Then Response.Write("非法提交！") End If Response.Write("") Exit Sub End If Dim PageSize As Integer = 10'每页记录数 Dim PageCount As Integer '总页数 Dim RecordCount As Integer = Questions.Count("Q_Type=2 And Q_Adid=" & ThisId) '统计记录数 If RecordCount > 0 Then '统计总页数 If RecordCount Mod PageSize = 0 Then PageCount = RecordCount \ PageSize Else PageCount = RecordCount \ PageSize + 1 End If End If Dim PageID As Integer = Val(Request.QueryString("Page")) '当前页数 If PageID < 1 Then PageID = 1 ElseIf PageID > PageCount Then PageID = PageCount End If Response.Write("") If RecordCount > 0 Then Dim Dr1 As SqlDataReader = Procedure.CommonPage("Q_ID,Q_Questions,Q_QDate,Q_Answers,Q_ADate,U_Name", "[" & TablePrefix & "Questions] INNER JOIN [" & TablePrefix & "User] ON Q_UserId=U_ID", "Q_Type=2 And Q_Adid=" & ThisId, "Order By Q_ID Desc", PageSize, PageID, RecordCount) While Dr1.Read Response.Write("") Response.Write("") Response.Write("") End While Dr1.Close() End If Response.Write("") %>