% intervals=60 '緩存有效時間,分鐘計 cache_school_right_major=getRightCache("_SCHOOL_RIGHT_MAJOR_LIST",intervals) cache_school_right_school=getRightCache("_SCHOOL_RIGHT_SCHOOL_LIST",intervals) rem 獲取緩存數(shù)據(jù) Function getRightCache(cacheName,interval) If Application(SiteSN&cacheName)="" then getRightCache=getRightDB(cacheName) Application.lock Application(SiteSN&cacheName&"_Timestamp")=now() Application(SiteSN&cacheName)=getRightCache Application.unlock ElseIf DateDiff("n",Application(SiteSN&cacheName&"_Timestamp"),now())>CInt(interval) Then '正式運行時間隔interval分鐘調用一次 getRightCache=getRightDB(cacheName) Application.lock Application(SiteSN&cacheName&"_Timestamp")=now() Application(SiteSN&cacheName)=getRightCache Application.unlock Else getRightCache=Application(SiteSN&cacheName) End If End Function rem 獲取數(shù)據(jù)庫數(shù)據(jù) Function getRightDB(cacheName) If cacheName="_SCHOOL_RIGHT_MAJOR_LIST" Then getRightDB=getRightMajor() ElseIf cacheName="_SCHOOL_RIGHT_SCHOOL_LIST" Then getRightDB=getRightSchool() End If End Function rem 獲取右側專業(yè)代碼段 Function getRightMajor() getRightMajor="" set rs=conn.execute("select top 10 class1folder,class2folder,class2name from shuxing1_shuxing2 order by orderid desc") i=1 do while not rs.eof getRightMajor=getRightMajor&"
<%=rs("gonggao")%>
",""),"
","")," ","") replay=Replace(Replace(Replace(Replace(rsa("replay"),"",""),"
","")," ",""),"http://www.5370.com.cn/","/") if source_t="kinfo" then %>