%@ Language=VBScript %> <% 'RECUPERO VALORI Dim objRS, regione, contaRec, contaFound, stato 'PARAMETRI DI PAGINAZIONE Dim iPageSize Dim iPageCount Dim iPageCurrent Dim strOrderBy Dim strSQL Dim iRecordsShown Dim I stato=Request.QueryString("stato") regione=Request.QueryString("regione") Set objRS = Server.CreateObject("ADODB.Recordset") '************************************************************** 'RICERCA GEOGRAFICA '************************************************************** %>
| 
 
 | |||||||||||
| 
   
 
										
										 <%end if%> <%end if%> <% iPageSize = 5 'NUMERO RECORD PER PAGINA If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If If Request.QueryString("order") = "" Then strOrderBy = "priorita, ragsoc" Else strOrderBy = Request.QueryString("order") End If 'ESEGUE IL CICLO SE LO STATO E' <> DALL'ITALIA MA NON E' NULLO OPPURE 'SE LO STATO E' = ALL'ITALIA MA SIA STATA SCELTA ANCHE UNA REGIONE IF (stato<>"ITALIA/ITALY/I" AND stato<>"") OR (stato="ITALIA/ITALY/I" and regione<>"") THEN contaFound=0 if stato="ITALIA/ITALY/I" and regione<>"" then strSQL="SELECT * FROM tImb WHERE regione='"& Replace(regione,"'","''") & "' ORDER BY priorita, ragsoc" else if stato<>"ITALIA/ITALY/I" and regione="" then strSQL="SELECT * FROM tImb WHERE stato='"& Replace(stato,"'","''") & "' ORDER BY priorita, ragsoc" end if end if objRS.PageSize = iPageSize objRS.CacheSize = iPageSize objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText reccount = objRS.recordcount iPageCount = objRS.PageCount If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 If iPageCount = 0 Then Response.Write " 
 <% Else objRS.AbsolutePage = iPageCurrent iRecordsShown = 0 Do While iRecordsShown < iPageSize And Not objRS.EOF if stato="ITALIA/ITALY/I" and regione<>"" then If (strComp(objRS("regione"), regione, vbTextCompare) = 0) then contaRec=contaRec+1 end if else if stato<>"ITALIA/ITALY/I" and regione="" then If (strComp(objRS("stato"), stato, vbTextCompare) = 0) then contaRec=contaRec+1 end if end if end if %> 
 
 <%contaFound=contaFound+1 end if%> <% iRecordsShown = iRecordsShown + 1 objRS.movenext Loop objRS.Close set objRS = nothing %> 
 <% else %> 
 
 | 
								S
								E
								L
								E
								Z
								I
								O
								N
								A
								
								
								S
								E
								L
								E
								C
								T
								
								C
								O
								U
								N
								T
								R
								Y
								
								S
								E
								L
								E
								Z
								I
								O
								N
								A
								
								U
								N
								A
								
								
								R
								E
								G
								I
								O
								N
								E
								
								
							<%Else%>	
							
								S
								E
								L
								E
								Z
								I
								O
								N
								A
								
								U
								N
								
								F
								O
								R
								N
								I
								T
								O
								R
								E