Modificare il file:
\Admin\Cancella\Prodotti_print.asp
<%@ Language=VBScript %> <!--#include file="include/Prodotti_dbconnection.asp"--> <!--#include file="include/Prodotti_variables.asp"--> <!--#include file="include/Prodotti_aspfunctions.asp"--> <link REL="stylesheet" href="include/style.css" type="text/css"> <% Session.LCID = 2064 On Error Resume Next strSQL = Session(strTableName & "SQL") if Len(strSQL)<3 then strSQL = gstrSQL set dbConnection = server.CreateObject ("ADODB.Connection") dbConnection.ConnectionString = strConnection dbConnection.Open Set rsDetails = server.CreateObject ("ADODB.Recordset") rsDetails.Open strSQL, dbConnection if NOT rsDetails.EOF then mypage = Request.Form("mypage") rsDetails.PageSize = Request.Form("pagesize") maxRecords = cdbl(rsDetails.RecordCount) maxPages=cdbl(rsDetails.PageCount) if cdbl(mypage) > cdbl(maxPages) then mypage = maxpages End IF rsDetails.AbsolutePage = mypage maxrecs=cdbl(rsDetails.pagesize) End IF Response.Write "<table align='center' width='95%' border='0' cellpadding=3 cellspacing=2>" call WriteTableHeader Call loopRs(rsDetails, CLng(Request.Form("pagesize"))) Response.Write("</table>") rsDetails.Close Set rsDetails = Nothing ' display table with results sub loopRs(rs, nPageSize) 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 ' To insure that every other one is shaded If iShadeTheDetail = 0 then sShadeClass = "class=shade" iShadeTheDetail = 1 Else sShadeClass = "" iShadeTheDetail = 0 End If %> <tr valign=top <%=sShadeClass%> > </tr> <% iNumberOfRows = iNumberOfRows + 1 rs.movenext Loop end if end sub sub WriteTableHeader %> <table align='center' width='95%' border='0' cellpadding=3 cellspacing=2> <tr> <% %> </tr> <% 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 = "Total: " & CStr(value) if stype="AVERAGE" then GetTotal="Average: " & CStr(CDbl(value)/iNumberOfRows) End Function %>
[
Íàçàä
]