Hela scriptet som visar thumbs..
Lika bra att visa hela scriptet:
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<%
Dim CurFile, PopFileShowSub, ShowPic, PictureNo
Dim strPathInfo, strPhysicalPath
Dim intTotPics, intPicsPerRow, intPicsPerPage, intTotPages, intPage, strPicArray()
intPicsPerRow = 3
intPicsPerPage = 3
intPage = CInt(Request.QueryString("Page"))
If intPage = 0 Then
intPage = 1
End If
CurFile = "1.asp"
PopFile = "sp.asp"
%>
<script language="JavaScript">
<!--
function jumppage(sel)
{
var i = sel.selectedIndex
self.location.href = sel.options[i].value
}
// -->
</script>
<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openGalleryWindow(url) {
if (document.all)
var xMax = screen.width, yMax = screen.height;
else
if (document.layers)
var xMax = window.outerWidth, yMax = window.outerHeight;
else
var xMax = 800, yMax=600;
var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
var xOffset = 100, yOffset = 100;
popupWin = window.open(url,'new_page','width=700,height=535,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',scrollbars=auto,toolbars=no,menubar=no,resizable=yes')
}
// done hiding -->
</script>
<style type="text/css">
<!--
.unnamed1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}
.unnamed2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
font-weight: lighter;
text-decoration: none;
background-color: #CCCCCC;
border: thin solid #000000;
}
-->
</style>
</head>
<body bgcolor="#666666" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<div align="center">
<table width="350" height="87" border="0" cellpadding="1" cellspacing="0">
<tr>
<td valign="top"><div align="center"> <span class="unnamed1">
<br>
</span>
<table width="250" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" class="unnamed1" id="AutoNumber1">
<tr>
<td align="center" width="20%"> <form action=<%=PopFile%> method="POST">
<p class="unnamed1"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Veckans
bilder :</font> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<select name="go" size=1 class="unnamed2" onChange="jumppage(this);">
<%
ShowSub = request("ShowSub")
ShowPic = request("ShowPic")
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
For each Folder in objFolder.SubFolders
If Left(Folder.Name,1)<>"_" Then
Response.write "<option "
If ShowSub=Folder.Name Then
Response.Write "selected "
End if
Response.Write"value='" & CurFile & "?ShowSub="
Response.Write(Replace(Folder.Name, " ", "%15"))
response.write "'>"
Response.Write(Folder.Name & "</option>")
If ShowSub <= " " Then
ShowSub = Folder.Name
End if
End if
Next
Set objFSO = Nothing
%>
</select>
</font></p>
</form></td>
</tr>
</table>
<span class="unnamed1">
<%
If ShowPic > " " then
ShowPic = Replace(ShowPic, " ", "%15")
Response.Write "<a href='JavaScript:history.go(-1)'><img src='" & ShowPic & "'><BR><BR><font face=""verdana"" size=""1""><b>Tillbaka</b></a>"
Else
%>
</span>
<table width="300" height="8" border="0" align="center" cellpadding="0" cellspacing="5" bordercolor="#000000" id="AutoNumber1">
<tr>
<%
strPhysicalPath = Server.MapPath(".\" & ShowSub)
If ShowSub > " " then
ShowSub = Replace(ShowSub, " ", "%15")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPhysicalPath)
Set objFolderContents = objFolder.Files
'Antal bilder i subnivån
intTotPics = 0
For Each objFileItem in objFolderContents
If Ucase(Right(objFileItem.Name,4))=".GIF" OR Ucase(Right(objFileItem.Name,4))=".JPG" THEN
intTotPics = intTotPics + 1
End if
Next
'Antal sidor i suben
If (intTotPics/intPicsPerPage) = (int(intTotPics/intPicsPerPage)) Then
intTotPages = int(intTotPics/intPicsPerPage)
Else
intTotPages = int(intTotPics/intPicsPerPage)+1
End If
Redim strPicArray(2,intTotPics)
'Lagra bildnamnen i en array
x = 0
For Each objFileItem in objFolderContents
If Ucase(Right(objFileItem.Name,4))=".GIF" OR Ucase(Right(objFileItem.Name,4))=".JPG" THEN
strPicArray(0,x) = objFileItem.Name
strPicArray(1,x) = Cstr(int(x/intPicsPerPage)+1)
x = x + 1
End if
Next
Request finns ju om du menar dessa?:
ShowSub = request("ShowSub")
ShowPic = request("ShowPic")
Om vi löser detta så är det kanske ett script för arkivet här i forumet...blir rätt bra om det löser sig!