")
rsDetails.Close
Set rsDetails = Nothing
' display table with results
sub loopRs(rs, nPageSize)
tPrezzo=0
if nPageSize=0 then nPageSize=PageSize
' Pagination:
dim iShadeTheDetail, iNumberOfRows, nColumns
nColumns = 0
iNumberOfRows = 0
if isObject(rs) then
' Pagination: UNTIL iNumberOfRows>=maxrecs
DO UNTIL rs.eof OR iNumberOfRows>=nPageSize
if IsNumeric(rs("Prezzo")) then tPrezzo = tPrezzo + rs("Prezzo")
' To insure that every other one is shaded
If iShadeTheDetail = 0 then
sShadeClass = "class=shade"
iShadeTheDetail = 1
Else
sShadeClass = ""
iShadeTheDetail = 0
End If
%>
>
<% nColumns = nColumns + 1 %>
<%
if IsBinaryField(rs.Fields("Cod")) or Format("Cod")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "Cod", "")
else
strData = GetData(rs.Fields("Cod"), "")
Response.Write ProcessLargeText(strData)
end if
%>
<% nColumns = nColumns + 1 %>
<%
if IsBinaryField(rs.Fields("Nome")) or Format("Nome")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "Nome", "")
else
strData = GetData(rs.Fields("Nome"), "")
Response.Write ProcessLargeText(strData)
end if
%>
<% nColumns = nColumns + 1 %>
<%
if IsBinaryField(rs.Fields("Descrizione")) or Format("Descrizione")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "Descrizione", "")
else
strData = GetData(rs.Fields("Descrizione"), "")
Response.Write ProcessLargeText(strData)
end if
%>
<% nColumns = nColumns + 1 %>
<%
if IsBinaryField(rs.Fields("Prezzo")) or Format("Prezzo")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "Prezzo", "")
else
strData = GetData(rs.Fields("Prezzo"), "")
Response.Write ProcessLargeText(strData)
end if
%>
<% nColumns = nColumns + 1 %>
<%
if IsBinaryField(rs.Fields("prenotato")) or Format("prenotato")=FORMAT_DATABASE_FILE then
Response.Write CreateImageControl(rs, "prenotato", "")
else
strData = GetData(rs.Fields("prenotato"), "")
Response.Write ProcessLargeText(strData)
end if
%>
<%
end sub
Function GetTotal(value, stype, iNumberOfRows, sFormat)
if sFormat = FORMAT_CURRENCY and value<>"" then
value = FormatCurrency(value)
elseif sFormat = FORMAT_NUMBER and value<>"" then
value = FormatNumber(CDbl(value), 2)
end if
if stype="COUNT" then GetTotal= "Count: " & CStr(iNumberOfRows)
if stype="TOTAL" then GetTotal = "Totale: € " & CStr(value)
if stype="AVERAGE" then GetTotal="Average: " & CStr(CDbl(value)/iNumberOfRows)
End Function
%>