% server.Execute "/NoHACK1.asp" Dim Email, rs, sql, rs1, i, j Dim Q_Subject, Q_Foreword, S_Time, E_Time, Q_Type, Q_Limit, SID, strTmp, strTmp1 '----代入Email Email = ReqMail(Request("em")) SID = ReqNum(Request("ID")) '----抓取最新開放的主題 If SID = "" Then sql = "SELECT TOP 1 * FROM AC_20070102_GExpress_Subject WHERE I_Op='Y' ORDER BY AddTime DESC, AutoID DESC" Else sql = "SELECT * FROM AC_20070102_GExpress_Subject WHERE AutoID=" & SID & " and I_Op='Y' ORDER BY AddTime DESC, AutoID DESC" End If Set rs = GetRecordset(sql) If rs.BOF and rs.EOF Then Response.Redirect "http://world2.gameflier.com/" Response.End Else SID = CStr(rs("AutoID")) Q_Subject = rs("Q_Subject") Q_Foreword = rs("Q_Foreword") S_Time = rs("S_Time") E_Time = rs("E_Time") Q_Type = rs("Q_Type") Chk_Op = rs("Chk_Op") Q_Limit = rs("Q_Limit") End If rs.Close If Chk_Op = "Y" Then if Email = "" then Response.Redirect "http://world2.gameflier.com/" Response.End end if End If '----若作答期間已過或未到 If DateDiff("d", S_Time, Now) < 0 Then 'error1("問卷尚未開放填寫!") '活動期間未到 Elseif DateDiff("d", Now, E_Time) < 0 Then 'error1("問卷填寫期間已結束!") '活動已結束 End If '單選 or 複選 If Q_Type="A" Then strTmp1 = "radio" Elseif Q_Type="B" Then strTmp1 = "checkbox" Elseif Q_Type="M" Then strTmp1 = "" Else strTmp1 = "radio" End If '----抓取該主題題目 sql = "SELECT * FROM AC_20070102_GExpress_Question WHERE SID=" & SID & " ORDER BY AutoID" Set rs = GetRecordset(sql) %>