<% Dim FileSys, File Set FileSys = Server.CreateObject( "Scripting.FileSystemObject" ) 'Captura el nom de la categoria dels articles a mostrar 'buscar=Replace(Request.Querystring("categoria"),"'","") buscar=Request.QueryString("categoria") 'Connexió amb la Base de Dades i obertura Set oBaseDades = Server.CreateObject("ADODB.Connection") oBaseDades.ConnectionString = "DSN=manresaportal.com." & Request.QueryString("basedades") oBaseDades.open 'Connexió amb la Tabla Set oTabla = Server.CreateObject("ADODB.RecordSet") oTabla.ActiveConnection = oBaseDades 'Realitzem la consulta i obrim la Tabla Consulta="Select * From Articles Where UCase(categoria) like '%" & UCase(buscar) & "%' ORDER BY MARCA,EUROS ASC" oTabla.Open Consulta Response.Write( "") Response.Write( "" ) Response.Write( "

" & Request.QueryString( "empresa" ) & "

" ) Response.Write( "
" ) DIM strFoto Response.Write( "") Response.Write( "" ) Response.Write( "

" & Request.QueryString( "categoria" ) & "

" ) Response.Write( "
" ) Response.Write( "" ) 'Capçalera Response.Write( "" ) Response.Write( "") Response.Write( "") Response.Write( "") Response.Write( "") Response.Write( "") Response.Write( "") if IsEmpty( Request.QueryString( "email" ) ) then else Response.Write( "") end if Response.Write( "" ) 'Bucle de tots els Articles de la categoria DO WHILE NOT oTabla.EOF 'Especifiquem la ubicació + nom foto strFoto = "http://www.manresaportal.com/" & Request.QueryString("directori") & "/" & oTabla( "ARTICLE" ) & ".jpg" File = Server.MapPath( "\" & Request.QueryString("directori") & "\" & oTabla( "ARTICLE" ) & ".jpg" ) 'Mostrem un registre Response.Write( "" ) If FileSys.FileExists( File ) = true then Response.Write( "" ) else Response.Write( "" ) end if Response.Write( "" ) Response.Write( "" ) Response.Write( "" ) Response.Write( "" ) Response.Write( "" ) if IsEmpty( Request.QueryString( "email" ) ) then else Response.Write( "") end if Response.Write( "" ) 'Saltem al següent registre oTabla.MoveNext LOOP Response.Write( "

FOTO

CODI

MARCA

DESCRIPCIÓ

PREU Euros

PREU Pts.

e-mail

" & oTabla( "ARTICLE" ) & "" & oTabla( "MARCA" ) & "" & oTabla( "DESCRIPCIO" ) & "

" & oTabla( "TEXTE" ) & "

" & FormatNumber( oTabla( "EUROS" ), 2 ) & "

" & FormatNumber( oTabla( "EUROS" ) * 166.386, 0 ) & "

" ) 'Tanquem Tabla i Base de Dades oTabla.close oBaseDades.close %>