<%Root=1%> <% Function Lpad (inputStr, padChar, lengthStr) Lpad = string(lengthStr - Len(inputStr),padChar) & inputStr End Function %> <%current="events" MainType=request.querystring("ET") if not IsNumeric(MainType) or MainType="" then MainType=0 select case MainType case 0: Title="國內學術活動" TitleAll="國內學術活動" case 1: Title="國外學術活動" TitleAll="國外學術活動" case 3: Title="行事曆活動" TitleAll=request.querystring("DATE")+"活動" case else Title="學術活動" TitleAll="所有活動" end select Type2nd=request.querystring("ET2nd") if not IsNumeric(Type2nd) or Type2nd="" then Type2nd=0 set EType2nd=conn.execute("select name from EduType2nd where ID="& Type2nd) set EData=Server.CreateObject("ADODB.RECORDSET") const adopenkeyset=1 const adlockreadonly=1 if MainType =3 then activityDate = request.querystring("DATE") DateArr = Split(activityDate, "/") intYer = Cint(DateArr(0)) intMot = Cint(DateArr(1)) intDay = Cint(DateArr(2)) eduDay = intYer&"/"&Lpad(intMot,"0",2)&"/"&Lpad(intDay,"0",2) sql="select *" sql=sql&",format(ED_FDate,'yyyy/mm/dd') as FDate" sql=sql&",format(ED_FDate,'HH:mm') as FTime" sql=sql&",format(ED_TDate,'yyyy/mm/dd') as TDate" sql=sql&",format(ED_TDate,'HH:mm') as TTime" sql=sql&",iif(ED_IN,'國外','國內') as EDIN" sql=sql&" from EduData" sql=sql&" left join EduType2nd as ET2 on ET2.id=EduData.ED_Type2nd" sql=sql&" where Format(ED_DATE, ""yyyy/mm/dd"")="&"'"&eduDay&"'" sql=sql&" and ED_Show=true" sql=sql&" and ED_TDate>=now()" sql=sql&" order by ED_FDate" EData.open sql,conn,adopenkeyset,adlockreadonly elseif MainType <> 3 then sql="select *" sql=sql&",format(ED_FDate,'yyyy/mm/dd') as FDate" sql=sql&",format(ED_FDate,'HH:mm') as FTime" sql=sql&",format(ED_TDate,'yyyy/mm/dd') as TDate" sql=sql&",format(ED_TDate,'HH:mm') as TTime" sql=sql&",iif(ED_IN,'國外','國內') as EDIN" sql=sql&" from EduData" sql=sql&" left join EduType2nd as ET2 on ET2.id=EduData.ED_Type2nd" sql=sql&" where 1=1" if Type2nd<>"" and Type2nd<>0 then sql=sql&" and ED_Type2nd="& Type2nd end if if MainType =0 or MainType =1 then sql=sql&" and ET2.ET_ID="& MainType end if sql=sql&" and ED_Show=true" sql=sql&" and ED_TDate>=now()" sql=sql&" order by ED_FDate" EData.open sql,conn,adopenkeyset,adlockreadonly end if %>
style="display:none;"<%end if%>> <%if pageno<6 then j=1 else j=pageno-5 end if if pageno1 then%> 第一頁 < <%end if%> <%for i=j to k if pageno=cint(i) then%> <%=i%> <%else%> <%=i%> <%end if next%> <%if pageno > 到最後 <%end if%> ,前往第
<%if MainType=3 then%> <%end if%>