%@LANGUAGE="VBSCRIPT"%> <% Dim rsArea__MMColParam rsArea__MMColParam = "0" if (Request.QueryString("id") <> "") then rsArea__MMColParam = Request.QueryString("id") %> <% set rsArea = Server.CreateObject("ADODB.Recordset") rsArea.ActiveConnection = MM_ksccweb_STRING rsArea.Source = "SELECT dbo.tbArea.id, dbo.tbArea.chinese, dbo.tbArea.region, dbo.tbArea.disc1, dbo.tbArea.disc2, Count(dbo.tb15th.id) AS num FROM dbo.tb15th LEFT JOIN dbo.tbArea ON dbo.tb15th.area = dbo.tbArea.id GROUP BY dbo.tbArea.id, dbo.tbArea.chinese, dbo.tbArea.region, dbo.tbArea.disc1, dbo.tbArea.disc2 HAVING (((dbo.tbArea.id)=" + Replace(rsArea__MMColParam, "'", "''") + "))" rsArea.CursorType = 0 rsArea.CursorLocation = 2 rsArea.LockType = 3 rsArea.Open() rsArea_numRows = 0 %> <% Dim rsName__MMColParam rsName__MMColParam = 0 if (Request.QueryString("id") <> "") then rsName__MMColParam = Request.QueryString("id") %> <% set rsName = Server.CreateObject("ADODB.Recordset") rsName.ActiveConnection = MM_ksccweb_STRING rsName.Source = "SELECT id, title, name FROM dbo.tb15th WHERE area = " + Replace(rsName__MMColParam, "'", "''") + " ORDER BY id ASC" rsName.CursorType = 0 rsName.CursorLocation = 2 rsName.LockType = 3 rsName.Open() rsName_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsName_numRows = rsName_numRows + Repeat1__numRows %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each Item In Request.QueryString NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item)) End If Next ' add the Form variables to the MM_keepForm string For Each Item In Request.Form NextItem = "&" & Item & "=" If (InStr(1,MM_removeList,NextItem,1) = 0) Then MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
|
行政區
|
議員名額
|
|
<%=(rsArea.Fields.Item("region").Value)%>
|
<%=(rsArea.Fields.Item("num").Value)%>
|
|
議 員
|
|
|
<%=(rsName.Fields.Item("title").Value)%>
|
<% link="name.asp?id=" & rsName.Fields.Item("id").Value %>
<%=(rsName.Fields.Item("name").Value)%>
|