Avatar billede hopir Novice
31. marts 2007 - 10:34 Der er 7 kommentarer og
3 løsninger

galleri igen. flere billeder henad

hey, har for ikk så lang tid siden fået hjælp til at få billeder til at stå 2 og 2 i den her kode:


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
  <title>template: home</title>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

  <!-- **** Layout Stylesheet **** -->
  <link rel="stylesheet" type="text/css" href="style/style104_left.css" />

  <!-- **** Colour Scheme Stylesheet **** -->
  <link rel="stylesheet" type="text/css" href="style/colour2.css" />

</head>

<body>
  <div id="main">
    <div id="links">
      <!-- **** INSERT LINKS HERE **** -->
      <a href="#">another link</a> | <a href="#">another link</a> | <a href="#">another link</a> | <a href="#">another link</a>
    </div>
    <div id="logo"><h1>template heading goes here</h1></div>
    <div id="content">
      <div id="column1">
       
      <div id="menu">
        <h1>navigate_</h1>
        <ul>
          <li><a id="selected" href="index.html">home</a></li>
          <li><a href="page1.html">page 1</a></li>
          <li><a href="page2.html">page 2</a></li>
          <li><a href="page3.html">page 3</a></li>
          <li><a href="contact.html">contact</a></li>
        </ul>
      </div>
       
      <div class="sidebaritem">
        <h1>news_</h1>
        <!-- **** INSERT NEWS ITEMS HERE **** -->
        <h2>1st January 2006</h2>
        <p>The company announces the launch of it's new website.</p>
        <h2>1st January 2006</h2>
        <p>The company announces the launch of it's new website.</p>
        <p>NOTES: This area can be used for news or any other info.</p>
      </div>
       
      <div id="addlinks">
        <h1>Billeder</h1>
        <!-- **** INSERT ADDITIONAL LINKS HERE **** -->
        <ul>
          <%
qfolder = request.querystring("f")
'if qfolder = "" then
    folderspec = server.mappath(".")
    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set demofolder = filesys.GetFolder(folderspec)
    Set folcoll = demofolder.SubFolders
    For Each subfol in folcoll

        folsize = left((subfol.size/1000000), 3)
        folist = folist & " <li><a href='?f=" & subfol.name & "'><strong title='view'>&#187;</strong> " & subfol.Name & " </a><small>&nbsp;(" & folsize & " MB)</small>" & vbcrlf
        folist = folist & " </li>"
    Next
    set filesys = nothing
Response.Write folist

%>
        </ul>
      </div>
       
      <div class="sidebaritem">
        <h1>information_</h1>
        <!-- **** INSERT OTHER INFORMATION HERE **** -->
        <p> This space can be used for additional information such as a contact
          phone number, address or maybe even a graphic. </p>
      </div>
      </div>
<%
if request("f") <> "" then
%>
      <div id="column2">
      <%
qfolder = request.querystring("f")


filepath = server.mappath(".") & "\" & qfolder
captionfile = filepath & "\captions.txt"
Set filesys = CreateObject("Scripting.FileSystemObject")
Dim SomeArray()
'caption part
    If filesys.FileExists(captionfile) then
        set file = filesys.GetFile(captionfile)
        Set TextStream = file.OpenAsTextStream(ForReading,TristateUseDefault)
        captioncount = 0
        Do While Not TextStream.AtEndOfStream
            Line = TextStream.readline
            ReDim Preserve SomeArray(captioncount)
            SomeArray(captioncount) = line
            'response.write captioncount & " " & somearray(captioncount) & "<br>"
            captioncount = captioncount + 1
            'Response.write Line
        Loop
        textStream.close
    end if

'folder part
    Set demofolder = filesys.GetFolder(filepath)
    Set filecoll = demofolder.Files
    filecount = 0
    For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1
if b = 1 then

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""50%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""150"" height=""150"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
else
b = 0
  imagepath = "<td align=""center"" width=""50%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""150"" height=""150""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
        end if
    Next
    set filesys = Nothing
%>
      <p><%=filist%></p>
    </div>
<%
else
%>
      <div id="column2">
        <h1>introduction</h1>
        <!-- **** INSERT PAGE CONTENT HERE **** -->
        <p>
          This template is the fourth design in series 1 (hence the imaginative naming
          convention!). The design has 8 different colour schemes (each with a different
          logo) and 2 different layout styles, when downloaded from my own site. Here,
          it is available with colour scheme 2 and a 2 column layout (news, additional
          links and other info on the left).
        </p>
        <p>
          This website template is released as an 'open source' design (under the
          <a href="http://creativecommons.org/licenses/by/2.5">Creative Commons Attribution
          2.5 Licence</a>), which means that you are free to
          download and use it for anything you want (including modifying and amending it).
          All of the logo images are from digital photographs taken by me, so there are no
          issues with copyright there. All I ask is that you leave the 'design by dcarter'
          link in the footer of the template, but other than that...
        </p>
        <p>
          This template is written entirely in XHTML 1.1 and CSS, and can be validated
          using the links in the footer.
        </p>
        <p>
          You can view my other 'open source' template designs
          <a href="http://www.dcarter.co.uk/templates.html">here</a>.
        </p>
        <h1>example elements</h1>
        <p>Here are some example elements available with this template.</p>
        <h2>links</h2>
        <p><a href="index.html">example link 1</a></p>
        <h2>block quotes</h2>
        <blockquote>
          <p>
            Some blockquote text. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
            incididunt ut labore et dolore magna aliqua.
          </p>
        </blockquote>
        <h2>lists</h2>
        <ul>
          <li>list item 1</li>
          <li>list item 2</li>
        </ul>
        <br />
        <h2>images</h2>
        <p>images can be placed on the left, in the center or on the right.</p>
        <span class="left"><img src="style/graphic.jpg" alt="example graphic" /></span>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
          incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
          exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
          irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
          pariatur.
        </p>
        <span class="center"><img src="style/graphic.jpg" alt="example graphic" /></span>
        <span class="right"><img src="style/graphic.jpg" alt="example graphic" /></span>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
          incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
          exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
          irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
          pariatur.
        </p>
      </div>
    </div>
<% end if %>
    <div id="footer">
      &copy 2006 your name | <a href="#">email@emailaddress</a> | <a href="http://validator.w3.org/check?uri=referer">XHTML 1.1</a> | <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> | <a href="http://www.dcarter.co.uk">design by dcarter</a>
    </div>
  </div>

<div style="font-size: 0.8em; text-align: center; margin-top: 1.0em; margin-bottom: 1.0em;">
Design provided by <a href="http://www.freewebtemplates.com/">Free Web Templates</a> - your source for free website templates
</div>
</body>
</html>

</body>
</html>

kunne godt tænke mig at vide hvordan man gør så der kommer flere billeder på en række

de står nu
-billede-billede-
-billede-billede-

hvordan får man flere billeder på så der er fx 3 henad??

//jesper
Avatar billede mitbrugernavn Praktikant
31. marts 2007 - 12:11 #1
du skifter dette stykke ud ->

  For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1
if b = 1 then

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""50%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""150"" height=""150"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
else
b = 0
  imagepath = "<td align=""center"" width=""50%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""150"" height=""150""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
        end if
    Next


med dette stykke ->   

For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then 'når tælleren står i 1 starter den tabellen

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 3 then 'når tælleren står i 3 så afslutter den og sætter tæller i 0
b = 0
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
    Next
Avatar billede mitbrugernavn Praktikant
31. marts 2007 - 12:12 #2
hvis du ønsker f.eks. 4 ved siden af hinanden så sådan:

For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then 'når tælleren står i 1 starter den tabellen

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 3 then b = 0
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
    Next
Avatar billede mitbrugernavn Praktikant
31. marts 2007 - 12:14 #3
ups det gik for hurtigt med at trykke på enter vi prøver lige igen

hvis du ønsker f.eks. 4 ved siden af hinanden så sådan:

For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then
        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if

if b = 3 then
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 4 then
b = 0
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
    Next
Avatar billede hopir Novice
31. marts 2007 - 12:31 #4
hey når jeg bruger denne her kode får jeg fejlen uventet next


For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then 'når tælleren står i 1 starter den tabellen

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 3 then 'når tælleren står i 3 så afslutter den og sætter tæller i 0
b = 0
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
    Next
Avatar billede mitbrugernavn Praktikant
01. april 2007 - 09:04 #5
hovsa jeg havde lige fået slettet et - end if til sidst - prøv dette

For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then 'når tælleren står i 1 starter den tabellen

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 3 then 'når tælleren står i 3 så afslutter den og sætter tæller i 0
b = 0
  imagepath = "<td align=""center"" width=""33%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
end if
    Next
Avatar billede hopir Novice
01. april 2007 - 21:13 #6
jeg har prøvet at flytte koden over i et andet design og det virker men når jeg sætter ovenstående kode ind istedet for, får jeg fejlen end var ventet. har fundet ud af det er fordi jeg har en uafsluttet if sætning. men det forstår jeg ikke når jeg kopierer koden og har det hele med
Avatar billede mitbrugernavn Praktikant
02. april 2007 - 08:14 #7
prøv at lægge koden så vi kan se det.
Avatar billede hopir Novice
04. april 2007 - 11:07 #8
ej nu går det helt galt :b jeg kan ikke få det til at virke. jeg lægger koden til albummet og siden:

index.asp

<!-- Visit studio7designs.com and opensourcetemplates.org for more website templates ::  This template was created by studio7designs.com for public use under the creative commons licence 2.5 -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>

<head>

<title>Nautica08</title>

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="description" content="studio7designs" />
<meta name="keywords" content="#" />
<meta name="googlebot" content="index, follow" />
<meta name="language" content="en-us, english" />
<meta name="classification" content="#" />
<meta name="author" content="www.studio7designs.com" />
<meta name="copyright" content="#" />
<meta name="location" content="#" />
<meta name="zipcode" content="#" />


<link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen, projection, tv " />

</head>

<body>

<!-- start top menu and blog title-->

<div id="blogtitle">
        <div id="small"><a href="#">Your Blog news</a> or current info and links ::</div>
        <div id="small2">  <a href="#">News</a>  |  <a href="#">Services</a>  |  <a href="#">Projects</a> | <a href="#">Supplies</a> | <a href="#">Information</a></div>
</div>
       
        <div id="topmenu">
       
       
        <ul class="BLUE">
        <li><a href="#" title="Downloads"><span>Downloads</span></a></li>
        <li><a href="#" title="Gallery"><span>Photo Gallery</span></a></li>
        <li><a href="#" title="Links"><span>Subscribe</span></a></li>
        <li><a href="#" title="Links"><span>Tech Blog</span></a></li>
        <li><a href="#" title="Links"><span>Contact</span></a></li>
        <li><a href="#" title="Links"><span>RSS Feeds</span></a></li>
        </ul>
</div>

<!-- end top menu and blog title-->

<!-- start left box-->

<div id="leftcontent">
    <img style="margin-top:-9px; margin-left:-12px;" src="images/top2.jpg" alt="" />
   
    <h3 align="left">Main Menu</h3>
   
   
    <div align="left">
        <ul class="BLUE">
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
        </ul>
    </div>
   
    <h3 align="left">Sub menu</h3>
    <div align="left">
        <ul class="BLUE">
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
            <li><a href="#">Sample Link</a></li>
        </ul>
   
    <p>Nullam non metus. Duis in metus vitae elit luctus convallis. Ut sagittis. Nam tempor. Nam vehicula adipiscing augue. Vestibulum pretium lacinia erat. Duis ut enim. In hendrerit vulputate lectus. Donec ipsum magna, tempor ornare, fringilla sit amet, placerat</p>
   
    </div>
   
    <!-- You have to modify the "padding-top: when you change the content of this div to keep the footer image looking aligned -->
   
    <img style="padding-top:2px; margin-left:-12px; margin-bottom:-4px;" src="images/specs_bottom.jpg" alt="" />
   
   

</div>

<!-- end left box-->

<!-- start content -->

<div id="centercontent">

   
    <h1>Nautica 08 </h1>
    <p><a href="http://www.studio7designs.com"><img src= "images/logo.jpg" border="0" style="width: 300px; height: 65px;"/></a><br /></p>
   
    <div class="centercontentleft">Sample Box for Products</div><p><a href="#">Lorem ipsum</a> dolor sit amet, consectetuer adipiscing elit. Ut elit pede, vestibulum in, tempor a, nonummy eget, mauris. Aliquam erat volutpat. Nulla facilisi. In hac habitasse platea dictumst. Nullam porttitor orci feugiat odio. Nam vestibulum interdum lectus. Etiam eros. Donec imperdiet lorem a tortor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut at mi ut enim luctus commodo. Fusce a purus. Morbi eget odio. Sed convallis eleifend felis. Integer fermentum consectetuer est. Sed vitae nisi ac pede scelerisque feugiat. Etiam mollis urna non lacus tincidunt cursus. Aliquam erat volutpat. Nam tempus.</p>
   
   
    <p><img style="width: 200px; height: 299px; float: right; padding:9px;" alt="#" src="images/sample.jpg" hspace="5" vspace="5" />
   
   
    Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi vestibulum, tortor a sagittis facilisis, sapien ante sollicitudin urna, eu hendrerit sem massa et arcu. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec tincidunt nisi in odio. Aenean semper, nisi ut lobortis tristique, odio elit venenatis nisl, semper condimentum metus eros vel tortor. Pellentesque at nulla. Sed metus nisi, malesuada pharetra, malesuada vel, dictum eget, eros. Cras sed metus. Aenean facilisis nunc nec sem. Nulla facilisi. Sed placerat diam ut libero. Vestibulum fringilla. Nam tincidunt. Nam metus metus, rutrum eu, sagittis id, venenatis in, velit. Sed tempor blandit ipsum. Phasellus nisi massa, pretium in, gravida ac, hendrerit vitae, massa. Nulla facilisi.</p>
   
   
    <p><a href="http://www.opensourcetemplates.org">Nullam non metus.</a> Duis in metus vitae elit luctus convallis. Ut sagittis. Nam tempor. Nam vehicula adipiscing augue. Vestibulum pretium lacinia erat. Duis ut enim. In hendrerit vulputate lectus. Donec ipsum magna, tempor ornare, fringilla sit amet, placerat vel, purus. Pellentesque tempus est a dolor. Quisque neque nulla, interdum eu, blandit ut, tempus quis, ligula. Cras ac purus. Sed quis urna. Nulla facilisi. Nam ornare sem consequat augue. Ut dapibus diam sit amet dolor adipiscing dictum. Praesent tristique eros vel mauris. Maecenas lacus velit, sodales consectetuer, molestie et, faucibus in, odio. Vivamus libero velit, sodales a, feugiat vel, tempor vitae, libero. Duis aliquam ipsum.</p>
   
    <img style="width: 153px; height: 59px; float: left; padding:9px;" src="images/n8g.jpg" alt="Nautica08" />
   
    <p>Duis sagittis est ac turpis. Nam ac quam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque malesuada massa. Ut gravida volutpat felis. Aliquam massa leo, commodo a, placerat in, volutpat ut, turpis. Phasellus in turpis. Fusce turpis diam, ullamcorper id, tincidunt at, fringilla eu, lacus. Maecenas in mauris vel ipsum blandit euismod. Aliquam consequat egestas lectus. Mauris a est. Sed sit amet neque. In in urna.
   
    Maecenas nonummy accumsan tortor. In hac habitasse platea dictumst. Fusce suscipit mollis neque. Maecenas turpis dolor, rhoncus eu, ullamcorper eu, tincidunt sed, leo. Quisque molestie. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pellentesque convallis mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed euismod, turpis ac congue facilisis, mi nisl consequat felis, ut egestas nisl velit in justo. Fusce eu tortor faucibus diam dictum adipiscing. In nisl. Nam lacus orci, scelerisque at, pulvinar in, commodo ut, arcu. Aliquam porttitor. Nullam aliquet risus id erat. Pellentesque leo nisl, hendrerit at, ornare in, volutpat in, ante. Nulla pretium velit sit amet nisi. Nam eu magna. Aenean viverra auctor neque. <a href="#">Pellentesque elit.</a></p>

</div>


<!-- end content -->

<!-- start right box -->

<div id="rightcontent">
    <img style="margin-top:-9px; margin-left: -5px;" src="images/top2.jpg" alt="" />
   
    <img style="width: 153px; height: 59px; float: left; padding:9px;" src="images/n8g.jpg" alt="Nautica08" />
   
    <p><a href="#">Pick a location:</a><br />
    sit amet, consectetuer adipiscing elit, sed diam nonummy nibh  euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad  minim veniam, quis nostrud exercitation ulliam corper</p>
    <p> Pick a location:<br />
    sit amet, consectetuer adipiscing elit, sed diam nonummy nibh  euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad  minim veniam, quis nostrud exercitation ulliam corper</p>
    <p> Pick a location:<br />
    sit amet, consectetuer adipiscing elit, sed diam nonummy nibh  euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad  minim veniam, quis nostrud exercitation ulliam corper</p>
   
    <img style="padding-top:5px; margin-left:-5px; margin-bottom:-4px;" src="images/specs_bottom.jpg" alt="" />
</div>

<!-- end right box -->
<!-- start footer -->

<div id="footer">&copy; 2006 Design by <a href="http://www.studio7designs.com">Studio7designs.com</a> | <a href="http://www.arbutusphotography.com">ArbutusPhotography.com</a> | <a href="http://www.opensourcetemplates.org">Opensourcetemplates.org</a>


<!-- start left boxes -->

    <div class="centercontentleftb">
        <div class="centercontentleftimg">Sample Box for Products</div>
            <div class="centercontentrightimg">Sample Box for Products</div>
    </div>
   
    <!-- endleft boxes -->
   
    <!-- start right boxes -->           
           
    <div class="centercontentrightb">
            <div class="centercontentleftimg">Sample Box for Products</div>
        <div class="centercontentrightimg">Sample Box for Products</div>
    </div>
   
        <!-- end right boxes -->

<!-- end bottom boxes -->

</div>

<!-- end footer -->




</body>
</html>



album kode:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
'Copy this file into a directory with folders containing images (jpg, gif).
'(optional) create a text file called captions.txt in each folder.
' with a caption on each line to go with each picture (in alphabetical order).
' set border size to a value greater than zero if you want a border around the picture.
' set border color if you have set a border size greater than 0.
' set the text-align: within the <style> tag to be left/center/right.
' set the font-family: within the <style> tag to be the font of your choice.
border_size = "7"
border_color = "silver"
%>
<html>
<head>
    <title>Gallery</title>
<style type="text/css">
    body {
    font-family: tahoma;
    text-align: center;
        }
</style>
</head>
<a name="top"></a>
<h2>Picture Gallery</h2>
<body>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

qfolder = request.querystring("f")
if qfolder = "" then
    folderspec = server.mappath(".")
    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set demofolder = filesys.GetFolder(folderspec)
    Set folcoll = demofolder.SubFolders
    For Each subfol in folcoll
        folsize = left((subfol.size/1000000), 3)
        folist = folist & "<a href='?f=" & subfol.name & "'><strong title='view'>&#187;</strong> " & subfol.Name & " </a><small>&nbsp;(" & folsize & " MB)</small>" & vbcrlf
        folist = folist & "<BR>" 
    Next
    set filesys = nothing
    Response.Write folist

else

filepath = server.mappath(".") & "\" & qfolder
captionfile = filepath & "\captions.txt"
Set filesys = CreateObject("Scripting.FileSystemObject")
Dim SomeArray()
'caption part
    If filesys.FileExists(captionfile) then
        set file = filesys.GetFile(captionfile)
        Set TextStream = file.OpenAsTextStream(ForReading,TristateUseDefault)
        captioncount = 0
        Do While Not TextStream.AtEndOfStream
            Line = TextStream.readline
            ReDim Preserve SomeArray(captioncount)
            SomeArray(captioncount) = line
            'response.write captioncount & " " & somearray(captioncount) & "<br>"
            captioncount = captioncount + 1
            'Response.write Line
        Loop
        textStream.close
    end if

'folder part
    Set demofolder = filesys.GetFolder(filepath)
    Set filecoll = demofolder.Files
    filecount = 0
    For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
        imagepath = "<strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath & vbcrlf
        filist = filist & "<BR>"
        filecount = filecount + 1
        data = ""
        end if
    Next
    set filesys = Nothing
    filist = filist & "<br><small><a href='http://www.allscoop.com/' target='_blank'>allscoop free image gallery</a></small>"
%>

<h3><a href="." title="up one level">&#171;</a>
&nbsp;<%=qfolder%></h3>

<p><%=filist%></p>

<% end if %>
<p style="font-size: xx-small;"><a href="#top" title="top of page">top of page</a></p>
</body>
</html>

gerne med 4 billeder på en række

/jesper
Avatar billede mitbrugernavn Praktikant
04. april 2007 - 15:00 #9
her har du en rå fil - uden alt det andet - så kan du bedre se hvad der foregår.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="750" border="1">
  <tr>
    <td width="20%" valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font size="2">Billedmenu:</font><br>
      <%
qfolder = request.querystring("f")
'if qfolder = "" then
    folderspec = server.mappath(".")
    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set demofolder = filesys.GetFolder(folderspec)
    Set folcoll = demofolder.SubFolders
    For Each subfol in folcoll

        folsize = left((subfol.size/1000000), 3)
        folist = folist & "<a href='?f=" & subfol.name & "'><strong title='view'>&#187;</strong> " & subfol.Name & " </a><br>"
        folist = folist & " "
    Next
    set filesys = nothing
Response.Write folist

%>
      </strong> </font></td>
    <td width="80%" align="left" valign="top">
<%
if request("f") <> "" then
%>
      <%
qfolder = request.querystring("f")


filepath = server.mappath(".") & "\" & qfolder
captionfile = filepath & "\captions.txt"
Set filesys = CreateObject("Scripting.FileSystemObject")
Dim SomeArray()
'caption part
    If filesys.FileExists(captionfile) then
        set file = filesys.GetFile(captionfile)
        Set TextStream = file.OpenAsTextStream(ForReading,TristateUseDefault)
        captioncount = 0
        Do While Not TextStream.AtEndOfStream
            Line = TextStream.readline
            ReDim Preserve SomeArray(captioncount)
            SomeArray(captioncount) = line
            'response.write captioncount & " " & somearray(captioncount) & "<br>"
            captioncount = captioncount + 1
            'Response.write Line
        Loop
        textStream.close
    end if

'folder part
    Set demofolder = filesys.GetFolder(filepath)
    Set filecoll = demofolder.Files
    filecount = 0
  For Each file in filecoll
        Ext = UCase(Right(File.Path, 3))
        If Ext = "JPG" OR Ext = "GIF" Then
        on error resume next
        data = SomeArray(filecount)
        on error goto 0
        hrefpath = qfolder & "/" & file.name
b = b + 1 'dette er din tæller
if b = 1 then 'når tælleren står i 1 starter den tabellen

        imagepath = "<table width=""100%"" border=""1"">  <tr><td align=""center"" width=""25%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "' width=""100"" height=""100"" border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td><td>"
        filecount = filecount + 1
        data = ""
end if
if b = 2 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""25%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
if b = 3 then 'når tælleren står i 2 laver den en celle ved siden af den første

  imagepath = "<td align=""center"" width=""25%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> "
        filecount = filecount + 1
        data = ""
end if
  if b = 4 then 'når tælleren står i 3 så afslutter den og sætter tæller i 0
b = 0
  imagepath = "<td align=""center"" width=""25%""><strong>" & data & "</strong><br><a href='" & hrefpath & "' title='free image gallery' border=0><img src='" & hrefpath & "'  width=""100"" height=""100""  border='" & border_size & "' title=""" & data & """ style='border-color: " & border_color & ";'></a><br>"
        filist = filist & imagepath
        filist = filist & "</td> </tr></table>"
        filecount = filecount + 1
        data = ""
end if
end if
    Next
    set filesys = Nothing
%>
      <p><%=filist%></p>

<%
end if
%>


</td>
  </tr>
</table>
</body>
</html>
Avatar billede hopir Novice
13. april 2007 - 12:44 #10
hey tak for svaret nu fungerer det...
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester