 |
 |
|
 |
|
|
|
 |
 |
 |
 |
|
| |
|
<%
searchStr = replace(request("searchStr"), "'", "''")
searchStr = replace(searchStr, "delete", "")
searchStr = Ucase(searchStr)
whatLetter = replace(request("l"), "'", "''")
whatLetter = replace(whatLetter, "delete", "")
id = replace(request("id"), "'", "''")
id = replace(id, "delete", "")
notSearch = false
select case (searchStr="" and whatLetter="" and id="")
case false
response.write""
notSearch = false
case true
set rs = Server.CreateObject("ADODB.Recordset")
set thru = server.createobject("adodb.connection")
thru.open LS_connection
rs.open "qyLettere", thru, 3
select case rs.eof
case false
response.write " Utilizza questa sezione per effettuare ricerche nel glossario.
La ricerca può essere eseguita o attraverso la scelta di una lettera dell'alfabeto o inserendo un termine nel campo di ricerca.
 Cerca per iniziale:" & space(2)
do while not rs.eof
response.write "" & rs.fields("Alfabeto").value & "" & space(1)
rs.movenext
loop
response.write " "
case true
response.write "Nessuna voce di glossario al momento disponibile."
end select
rs.close
thru.close
notSearch = true
%>
|
|
|
<%
end select
%>
|
|
<%
select case notSearch
case false
dim paramSearch(3)
if not searchStr="" then paramSearch(1)="Nome LIKE '%" & searchStr & "%'"
if not whatLetter="" then paramSearch(2)="Alfabeto='" & whatLetter & "'"
if not id="" then paramSearch(3)="ID =" & id
paramSql = ""
for i=1 to 3
if paramSearch(i)<>"" then
if paramSql = "" then
paramSql = " WHERE "
else
paramSql = paramSql + " AND "
end if
paramSql = paramSql + paramSearch(i)
end if
next
MySql= "SELECT * FROM tbGlossario "& paramSql &" ORDER BY Nome ASC;"
'response.write MySql
set rs = Server.CreateObject("ADODB.Recordset")
set thru = server.createobject("adodb.connection")
thru.open LS_connection
rs.cursorlocation=aduseclient
rs.Open MySql, LS_connection, adOpenStatic, adLockReadOnly, adCmdText
If Request.QueryString("page") = "" Then
iCurrentPage = 1
Else
iCurrentPage = CInt(Request.QueryString("page"))
End If
rs.PageSize = 10
If rs.PageCount > 0 then
rs.AbsolutePage = iCurrentPage
Else
iCurrentPage = 0
End If
%>
|
<% If rs.Eof then %>
|
|
<%
Else
do while rs.AbsolutePage = iCurrentPage And Not rs.EOF
%>
|
|
|
<%
select case notSearch
case false
If rs.PageCount > 1 then
'Print Previous Page if required
'If iCurrentPage <> 1 then
'Response.Write "Precedente"
'Else
'Response.Write "Precedente"
'End If
'Print direct access page numbers.
For intCount = 1 to rs.PageCount
If intCount = 1 then
Response.Write " | "
End If
If intCount = iCurrentPage then
Response.Write "" & intCount & " | "
Else
Response.Write "" & intCount & " | "
End If
Next
End If
end select
%>
|
<%
rs.movenext
loop
End if
end select
%>
|
|
|
 |
|
 |
|
|
| |
|
|