Modificare il file:
\dblist\print.asp
<% @Language = "VBScript" %> <% '---------------------------------------------------------------------------------------- '- ASP dbList - Version 8.1 - 30 July 2005 '- Copyright © 2005 - Livio Siri (http://www.livio.net) - All Rights Reserved. '---------------------------------------------------------------------------------------- Option Explicit Response.Buffer = True Dim Q Dim sDSN Dim Conn, k, h, RS, field, s, t Q = request.querystring("Q") Session.LCID = 1040 sDSN = Request.querystring("dsn") 'response.write Q & "<br>" 'response.end %> <!-- #include file ="adovbs.inc"--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head> <title>Stampa Archivio</title> <STYLE type=text/css> BODY { font-size : 12px; font-family : Verdana; color : navy; background-color : #FFFFFF; margin : 0; margin-left : 0; margin-right : 0; margin-top : 0; margin-bottom : 30; SCROLLBAR-FACE-COLOR: #8199DA; SCROLLBAR-HIGHLIGHT-COLOR: #B0C4DE; SCROLLBAR-SHADOW-COLOR: #333333; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #FFCC00; SCROLLBAR-TRACK-COLOR: #F0F0F0; SCROLLBAR-DARKSHADOW-COLOR: #8199DA; } TABLE {border:solid #CCCCCC 1;} TD {font-size : 7pt; color: black; font-family: Tahoma;border:solid #CCCCCC 1;} TH {font-size : 7pt; color: black; font-family: Tahoma;border:solid #CCCCCC 1;} A:hover { COLOR: #ff6600 } </STYLE> </head> <BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#000000 ALINK=#000000 VLINK=#000000 TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0> <% '--- Main ' On error resume next GR(sDSN) Response.write "</body>" Response.write "</html>" '---------------------------------------------------- Function GR(sDSN) Dim cnnGetRows Dim rstGetRows Dim arrDBData Dim arrDBFields Dim I, J Dim iRecFirst, iRecLast Dim iFieldFirst, iFieldLast Dim sValue Dim strDBFields, Wmax Dim field Set cnnGetRows = Server.CreateObject("ADODB.Connection") cnnGetRows.Open sDSN Set rstGetRows = cnnGetRows.Execute(Q) '--- show field names in the table header------------------------------------------------- Response.Write "<table align=center width='100%' border=1 CellSpacing=0 CellPadding=0><tr>" '--- loop through the fields in the recordset i = 0 for each field in rstGetRows.Fields ArrDBFields = ArrDBFields & field.name & " " i = i + 1 next strDBFields = Split(arrDBFields," ") Wmax = ubound(strDBFields) For i = 0 to Wmax Response.Write "<th>" Response.write strDBFields(i) Response.Write "</th>" next Response.write "</tr>" Response.write "<tr><th></th></tr>" On error resume next arrDBData = rstGetRows.GetRows() rstGetRows.Close Set rstGetRows = Nothing cnnGetRows.Close Set cnnGetRows = Nothing iRecFirst = LBound(arrDBData, 2) iRecLast = UBound(arrDBData, 2) iFieldFirst = LBound(arrDBData, 1) iFieldLast = UBound(arrDBData, 1) '--- Loop through the records (second dimension of the array) For I = iRecFirst To iRecLast Response.Write "<tr><td colspan=" & UBound(arrDBData, 1) + 1 & " bgcolor=black><img src=""images/pixel.gif"" width=1 heigth=1 border=0></td></tr>" '--- A table row for each record Response.Write "<tr>" & vbCrLf '--- Loop through the fields (first dimension of the array) For J = iFieldFirst To iFieldLast '--- A table cell for each field If ISNULL(arrDBData(J, I)) Then Response.Write "<td> </td>" & vbCrLf Else sValue = Server.HTMLEncode(arrDBData(J, I)) sValue = replace(sValue, CHR(13), "<br>") Response.Write "<td>" & sValue & "</td>" & vbCrLf End if Next ' J Response.Write "</tr>" & vbCrLf Next ' I Response.Write "</table>" & vbCrLf End Function %>
[
Íàçàä
]