Modificare il file:
\Galleria\search_results_files.asp
<% Response.Buffer = True %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Galleria Immagini</title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <SCRIPT LANGUAGE="JavaScript"> // Pleasewait script part 1 from http://authors.aspalliance.com/peterbrunone/pleasewait.asp // This script is intended for use with a minimum of Netscape 4 or IE 4. // First we detect the browser type if(document.getElementById) { // IE 5 and up, NS 6 and up var upLevel = true; } else if(document.layers) { // Netscape 4 var ns4 = true; } else if(document.all) { // IE 4 var ie4 = true; } function showObject(obj) { if (ns4) { obj.visibility = "show"; } else if (ie4 || upLevel) { obj.style.visibility = "visible"; } } function hideObject(obj) { if (ns4) { obj.visibility = "hide"; } if (ie4 || upLevel) { obj.style.visibility = "hidden"; } } </SCRIPT> <script language="Javascript"> //adapted from http://www.sitepoint.com/article/resize-popup-fit-images-size function ImagePopup(sPicUrl) { window.open( "viewimage.asp?"+sPicUrl, "", "resizable=1,scrollbars=1,height=200,width=200,top=20,left=20"); } </script> </head> <body> <!--Please wait part 2--> <!--Build pleasewait container, add animated GIF--> <div ID="splashScreen" style="position:absolute;z-index:5;top:30%;left:35%;"> <table bgcolor="#000000" border=1 bordercolor="#000000" cellpadding=0 cellspacing=0 height=200 width=300> <tr> <td width="100%" height="100%" bgcolor="#CCCCCC" align="CENTER" valign="MIDDLE"> <br><br> <font face="Helvetica,Verdana,Arial" size=3 color="#000066"> <b>Ricerca in corso. Attendere...</b></font> <br> <img src="graphics\wait2.gif" border=1 width=75 height=15><br><br> </td> </tr> </table> </div> <%Response.Flush%> <!-- configuration options--> <!--#include file="config.txt"--> <div id="content"> <center> <table width="760" border="0" cellspacing="1" cellpadding="0"> <tr bgcolor="#dddddd"> <td width="100%" align="left" valign="top" colspan="3"> <p><!--#include file="layout/header_inc.asp"--><br></td> <tr> <td width="140" align="left" valign="top" bgcolor="#dddddd"> <p><!--#include file="layout/navbar_inc.asp"--></td> <td width="10"></td> <td width="600" align="center" valign="top"><br> <H1>Risultato della ricerca</H1><br><br> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr align="center" valign="top"> <td width="600"> <!-- Search engine code --> <% Dim StartTime StartTime = Timer %> <%Dim objFolder Dim strSearchText Dim objFSO Dim objSubFolder If Request.Form("SearchText") <> "" Then strSearchText = Request.Form("SearchText") '<-- The search string Response.Write "<p class='smText' style='text-align:left'> La ricerca per <B>" & strSearchText &"</B> ha riportato i seguenti risultati:<br><br></p>" Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(ImgDirectory)) Search objFolder DidSearch = 1 End If '********************************** Function Search(objFolder) 'loop through every file in the current folder For Each objFile in objFolder.Files strFileName = objFile.Name If Left(objFolder.Name, 8) <> "_vti_cnf" Then If InStr(1, strFileName, strSearchText, 1) then Folder = objFile.ParentFolder TrimChr = (InStr(1, Folder, ImgDirectory, 1)) + (len(ImgDirectory)) PartICareAbout = Right(Folder,(len(Folder)-trimChr)) DisplayName = replace(particareabout,"\","/") 'Optional: Remove comment to link images to folder thumbnail browser 'Response.Write "<div align='left'><img src='graphics/file.gif' border='0' height='17' width='17' style='margin-bottom:-3px' alt='Open Parent Folder'> <a class='browse' href=browse.asp?dir=" & escape(DisplayName) & ">" & objFile.Name & "</a></div>" 'Link images to image viewer (preferred) Response.Write "<div align='left'><img src='graphics/file.gif' border='0' height='17' width='17' style='margin-bottom:-3px' alt='Open Parent Folder'> <a class='browse' href=javascript:ImagePopup('" & ImgDirectory & "/" & escape(DisplayName) & "/" & escape(strFileName) & "')" & ">" & strFileName & "</a></div>" Response.Write "<div align='left' class='smText' style='margin-left:22px'>Posizione: " & DisplayName & "</div>" End If End If Next ' Recurse through each subfolder in this directory, run the Search function again For Each objSubFolder in objFolder.SubFolders If InStr(1, objSubFolder.Name, strSearchText, 1) then Folder = objFolder TrimChr = (InStr(1, Folder, ImgDirectory, 1)) + (len(ImgDirectory)) PartICareAbout = Right(Folder,(len(Folder)-trimChr)) DisplayName = replace(particareabout,"\","/") ' Optional: Use to display both folder and file links (set option in config.txt) If DisplayAllLinks = true then Response.Write "<div align='left'><img src='graphics/folder.gif' border='0' height='17' width='17' style='margin-bottom:-3px' alt='Open Folder'> <a class='browse' href=browse.asp?dir=" & escape(DisplayName) & ">" &DisplayName & "</a></div>" End If End If Search objSubFolder Next End Function %> <% If DidSearch = 1 Then %><br></td> </tr> <tr> <td align="left"><h2>Ricerca ultimata.....</h2> <%End If Dim EndTime EndTime = Timer Dim TimeDelta TimeDelta = FormatNumber(EndTime - StartTime, 4) If Request.Form("SearchText") <> "" Then Response.Write "<p class='smText' style='text-align:left'><i>Tempo di creazione della pagina: [" & TimeDelta & " secondi]</i></font>" End If%> <br> <br> <div align="center"> <a class="smText" href="browse.asp">[Visualizza immagini]</a> <a class="smText" href="search.asp">[Ricerca immagini]</a> </div> </td> </tr> </table><br> <br> </td> </tr> <tr> <td valign="top" bgcolor="#dddddd" colspan="3"> <p><!--#include file="layout/footer_inc.asp"--></td> </tr> </table> </center> </div> <%Response.Flush%> <!--Please wait part 3, close splashscreen--> <SCRIPT LANGUAGE="JavaScript"> if(upLevel) { var splash = document.getElementById("splashScreen"); } else if(ns4) { var splash = document.splashScreen; } else if(ie4) { var splash = document.all.splashScreen; } hideObject(splash); </SCRIPT> </body> </html>
[
Íàçàä
]