<%@LANGUAGE="VBSCRIPT"%> <% Dim Recordset1__MMColParam Recordset1__MMColParam = "圖書館" If (Request("MM_EmptyValue") <> "") Then Recordset1__MMColParam = Request("MM_EmptyValue") End If %> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_tnssh_board_STRING Recordset1.Source = "SELECT * FROM 公佈欄 WHERE post_group = '" + Replace(Recordset1__MMColParam, "'", "''") + "' ORDER BY postdate DESC" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open() Recordset1_numRows = 0 %> <% Dim Recordset2 Dim Recordset2_numRows Set Recordset2 = Server.CreateObject("ADODB.Recordset") Recordset2.ActiveConnection = MM_Counter_STRING Recordset2.Source = "SELECT * FROM count ORDER BY rid ASC" Recordset2.CursorType = 0 Recordset2.CursorLocation = 2 Recordset2.LockType = 1 Recordset2.Open() Recordset2_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = 10 Repeat1__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim Recordset2_total Dim Recordset2_first Dim Recordset2_last ' set the record count Recordset2_total = Recordset2.RecordCount ' set the number of rows displayed on this page If (Recordset2_numRows < 0) Then Recordset2_numRows = Recordset2_total Elseif (Recordset2_numRows = 0) Then Recordset2_numRows = 1 End If ' set the first and last displayed record Recordset2_first = 1 Recordset2_last = Recordset2_first + Recordset2_numRows - 1 ' if we have the correct record count, check the other stats If (Recordset2_total <> -1) Then If (Recordset2_first > Recordset2_total) Then Recordset2_first = Recordset2_total End If If (Recordset2_last > Recordset2_total) Then Recordset2_last = Recordset2_total End If If (Recordset2_numRows > Recordset2_total) Then Recordset2_numRows = Recordset2_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (Recordset2_total = -1) Then ' count the total records by iterating through the recordset Recordset2_total=0 While (Not Recordset2.EOF) Recordset2_total = Recordset2_total + 1 Recordset2.MoveNext Wend ' reset the cursor to the beginning If (Recordset2.CursorType > 0) Then Recordset2.MoveFirst Else Recordset2.Requery End If ' set the number of rows displayed on this page If (Recordset2_numRows < 0 Or Recordset2_numRows > Recordset2_total) Then Recordset2_numRows = Recordset2_total End If ' set the first and last displayed record Recordset2_first = 1 Recordset2_last = Recordset2_first + Recordset2_numRows - 1 If (Recordset2_first > Recordset2_total) Then Recordset2_first = Recordset2_total End If If (Recordset2_last > Recordset2_total) Then Recordset2_last = Recordset2_total End If End If %> 國立台南第二高級中學圖書館

 

    

 

 

 

圖書館線上百科全書

 

 
 自2007/02/05  瀏覽人次: <%=(Recordset2.Fields.Item("ct").Value)%>            <% sql = "select * from count " Set rs_f = Server.CreateObject("ADODB.Recordset") rs_f.open SQL, conn, 1, 3 ct = rs_f("ct") time_h = left(right(now,8),2) time_ap = left(right(now,11),2) if time_ap = "下午" then time_h = time_h + 12 '=============取客戶端真實ip================== dim uIpAddr uIpAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If uIpAddr = "" Then uIpAddr = Request.ServerVariables("REMOTE_ADDR") cip = uIpAddr uIpAddr = "" '============================================= sql = "select * from usr where cip='"&cip&"' and datein='"&date&"' " set rs = Server.CreateObject("ADODB.Recordset") rs.open SQL, conn, 1, 3 if not rs.eof then if (rs("hh") - time_h >= 2) then '1-2小時內同ip位置無法增加計數器 rs("hh") = time_h rs.update ct = ct + 1 rs_f("ct") = ct rs_f.update end if else ct = ct + 1 rs_f("ct") = ct rs_f.update rs.addnew rs("cip") = cip rs("datein") = date rs("hh") = time_h rs.update end if %>    維護:資訊媒體組
<% Recordset1.Close() Set Recordset1 = Nothing %> <% Recordset2.Close() Set Recordset2 = Nothing %>