<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Option Explicit Dim dateInicial dateInicial = Now() %> <% Dim oCon 'As cConnexio Set oCon = New cConnexio oCon.fNew Server.MapPath(DATABASE) 'Recull paràmetres de paginació Dim page, maxPage 'As Integer page = fGetPage 'Definim paràmetres d'exportació Dim oOpcExport 'As cOpcionsExport Set oOpcExport = New cOpcionsExport oOpcExport.fSetFormato fGetFormatoResultado() oOpcExport.fSetWithResumen false oOpcExport.fSetFiltro fGenerateFilter 'Tot aquest rotllo per ordenar es només per treure $,[,« als camps AUTOR o TITULO que el tinguin com a primer caràcter oOpcExport.fSetOrden "iif(isnull(AUTOR),iif(left(TITULO,1)='$' or left(TITULO,1)='[' or left(TITULO,1)='«',mid(TITULO,2),TITULO),iif(left(AUTOR,1)='$' or left(AUTOR,1)='[',mid(AUTOR,2),AUTOR)), AÑO, FICHA" oOpcExport.fSetNumRegsPage DB_REGS_BY_PAGE oOpcExport.fSetPage page Dim bibliografia 'As String bibliografia = request.form("fBibliografia") 'Exportem Dim oExportarHtml 'As cExportarHtml Set oExportarHtml = New cExportarHtml oExportarHtml.fInit oCon,fGetTable(bibliografia), oOpcExport maxPage = fGetMaxPage(oExportarHtml.fGetNumRecords) oCon.fClose 'Mostrem document segons format definit (word, html) Dim format ' As String format = fGetFormato If format = FORMAT_WORD Then '''response.ContentType = "application/msword" response.ContentType = "application/rtf" response.Charset = "ISO-8859-1" response.AddHeader "content-disposition", "attachment;filename=" & fGetWordName() End If Dim editable editable = False %> <% If format = FORMAT_HTML Then %>
<% If oExportarHtml.fGetNumRecords > 0 Then %> Opciones de descarga:     <%response.write("Encontradas " & oExportarHtml.fGetNumRecords & " fichas.")%> <% Else %> <%response.write("No se han encontrado fichas que cumplan los criterios de búsqueda.")%> <% End If %>
<% End If %> <% If format = FORMAT_HTML Then %> <% If maxPage > 1 Then %>
"/> "/> "/> "/> "/> "/> "/> "/> "/> "/> "/> "/>
 <%=page%> de <%=maxPage%> páginas 
<% End If %> <% End If %>