Galleri..
Hej..Jeg har fundet et galleri som jeg prøver at bruge på min side - det virker fint hvis jeg udenlukkende bruger koden på scriptet, men så snart jeg sætter det ind i egen kode virker det ikke.
Hvad gør jeg galt??
KILDEKODE:
<html>
<head>
<title>THULE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function co(element,mode) {
if (mode=="in") {
cursortype = 'hand'
colorval = '#333333'
} else if (mode=="out") {
cursortype = ''
colorval = '#F4F4F4'
}
element.style.background=colorval;
element.style.cursor=cursortype;
}
</script>
<style type="text/css">
<!--
A {text-decoration: none}
A:link { text-decoration: none; color: black;}
A:visited { text-decoration: none; color: black;}
A:active { text-decoration: none; color: black;}
A:hover { text-decoration: none; color: white;}
//-->
</style>
</head>
<body bgcolor="#5B5B5B" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000">
<table width="100%%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="20%" rowspan="4"> </td>
<td width="60%" rowspan="4" valign="top">
<table width="100%%" border="1" cellspacing="0" cellpadding="0" height="100%" bordercolor="#000000">
<tr>
<td height="229" valign="top">
<table width="100%%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#333333">
<td colspan="2"> </td>
</tr>
<tr>
<td width="22%" valign="top" bgcolor="#F4F4F4"> </td>
<td width="78%" bgcolor="#F4F4F4">
<p> </p>
<p> </p>
<!--#include file="menu.inc" -->
</td>
</tr>
<tr bgcolor="#333333">
<td colspan="2" height="2"> </td>
</tr>
<tr bgcolor="#F4F4F4">
<td colspan="2" height="100%">
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font size="2"><u><font size="4">GYSER
THULE</font></u></font></b><br>
<b>17. januar 2003<br>
</b></font></p>
<p align=center>
<table width="100%%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%
'------------------------------------------------
'henter info om siden
'------------------------------------------------
page = trim(Request.QueryString("page"))
start = trim(Request.QueryString("start"))
'------------------------------------------------
'Åbner Filsystem
'------------------------------------------------
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
'------------------------------------------------
'grund variabler
'------------------------------------------------
row_count = 0
row = 1
max_row = 3
count = 1
If NOT start <> "" then
Start = 1
End If
%>
<p align=center>
<%
'------------------------------------------------
'Info variabler
'------------------------------------------------
info_page = 0
info_page_count = 0
info_Count = 0
'------------------------------------------------
'Info Script, udregner og udskriver info til siden
'------------------------------------------------
If page <> "" then
response.write "side <a href='index.asp'>1</a> "
else
Response.write "side 1 "
End If
For Each objFileItem in objFolderContents
info_Count = info_Count + 1
info_page = info_page + 1
if info_page = 9 then
info_page_count = info_page_count + 1
info_page = 0
End If
If info_page = 0 then
If trim(info_page_count + 1) = trim(page) then
response.write info_page_count + 1 & " "
Else
response.write "<a href='index.asp?start=" & info_count & "&page=" & info_page_count + 1 & "'>" & info_page_count + 1 & "<a> "
End If
End If
Next
Response.write "<br>Der er ialt <b>" & (info_Count) & "</b> billeder"
if (info_page_count) * 9 = info_count then
Response.write " på <b>" & (info_page_count) & "</b> sider<br>"
Else
Response.write " på <b>" & (info_page_count) + 1 & "</b> sider<br>"
End If
%>
<div align="center">
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<%
For Each objFileItem in objFolderContents
If objFileItem.Name = "index.asp" then
Else
If CLng(count) < CLng(start) then
count = count + 1
Else
If CLng(row) => CLng(max_row) And row_count = 3 then
Else
If row_count > 2 then
response.write "<tr>"
row_count = 0
row = row + 1
End If
Response.write " <td><a href='"
Response.Write(objFileItem.Name)
Response.write "'><img border=0 src='" & (objFileItem.Name) & "' alt='" & (objFileItem.Name) & "' width=100 height=100></a>"
row_count = row_count + 1
count = count + 1
End If
End If
End If
Next
%>
</tr>
</table>
<!-- Made by Koldy 2001 - www.koldy.dk - thomas@koldy.dk -->
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="20%" rowspan="4"> </td>
</tr>
<tr> </tr>
<tr> </tr>
<tr> </tr>
</table>
</body>
</html>
