% If Request.QueryString("admin")="admin_exit" then session.abandon Response.Redirect "news.asp?post_group="&post_group&"&post_team="&post_team end if PAGE = Request.QueryString("PAGE") ' 接收所要瀏覽的頁次 Review = Request("Review") ' 接收快速瀏覽的模式 next5=Request.QueryString("next5") if next5="" then next5=0 IF PAGE = "" THEN PAGE = 1 ELSE PAGE = PAGE END IF IF Review = "" THEN Review = "all" ' 快速瀏覽模式,固定資料(不是從資料庫內讀取) %> <% Set RS = Server.CreateObject("ADODB.Recordset") If review="old" then If len(post_group )<>0 then SortSql = "Select * From 公佈欄 Where post_group='"&post_group&"' and end_date<#"&date&"# order by postdate Desc,posttime Desc" elseif len(post_team)<>0 then SortSql = "Select * From 公佈欄 Where author='"&post_team&"' and end_date<#"&date&"# order by postdate Desc,posttime Desc" else SortSql = "Select *From 公佈欄 Where end_date<#"&date&"# order by postdate Desc,posttime Desc" end if else If len(post_group )<>0 then SortSql = "Select * From 公佈欄 Where (" & Sql & " and post_group='"&post_group&"' and end_date>=#"&date&"#) or (" & Sql & " and post_group='"&post_group&"' and isnull(end_date))order by postdate Desc,posttime Desc" elseif len(post_team)<>0 then SortSql = "Select * From 公佈欄 Where (" & Sql & " and author='"&post_team&"' and end_date>=#"&date&"#) or (" & Sql & " and author='"&post_team&"' and isnull(end_date)) order by postdate Desc,posttime Desc" else SortSql = "Select * From 公佈欄 Where (" & Sql & " and end_date>=#"&date&"#) or ( " & Sql & " and isnull(end_date)) order by postdate Desc,posttime Desc" end if end if RS.Open SortSql, conn, 1,3 %>