|
whore
Join Date: May 2004
Location: South of Houston, Texas by 20 or so minutes.
Posts: 123/0.07
Threads: 0
|
Re: Coldfusion
Forgive how long it took to get back to this post.. um.. I forgot :(
Well you could setup a real simple access database with a table called tblImages. Inside the table have these fields Image_Number(primary field), Image_Name, Image_Description, Image_Small, and Image_Large. Setup an image folder place your images there.
Ok the code below "should" work, I whipped this up in notepad real quick. Some of the code you will have to modify like #request.dsn#.
Picture Gallery webpage
<cfquery name="query_images" datasource="#request.dsn#" username="#request.dsnUsername#" password="#request.dsnPassword#">
SELECT Image_Number, Image_Name, Image_Small
FROM tblImages
ORDER BY Image_Name
</cfquery>
<html>
<head>
<title> :: Picture Gallery :: </title>
</head>
<body bgcolor="ffffff">
<table border="0" width="600">
<tr>
<th>Here is the header</th>
<tr>
<cfoutput query="query_images">
<tr>
<td align="center" valign="top">
:: #Image_Name# ::
<hr height=1>
<br>
<a href="larger_view.cfm?number=#Image_Number#">
<img src="images/#Image_Small#" alt="#Image_Description# border="1">
<br>
Click Here to see a larger version
</a>
</td>
</tr>
</cfoutput>
</table>
</body>
</html>
Large Picture webpage
<cfif isDefined("#url.number#")>
<cfquery name="query_images" datasource="#request.dsn#" username="#request.dsnUsername#" password="#request.dsnPassword#">
SELECT Image_Number, Image_Name, Image_Description, Image_Big
FROM tblImages
WHERE Image_Number = #url.number#
</cfquery>
<html>
<head>
<title> :: #Image_Name# :: </title>
</head>
<body bgcolor="ffffff">
<table border="0" width="600">
<tr>
<th> :: #Image_Name# :: </th>
<tr>
<cfoutput query="query_images">
<tr>
<td align="left" valign="top">
<hr height=1>
<br> <img src="images/#Image_Big#" alt="#Image_Description# border="1">
<br>
#Image_Description#
</td>
</tr>
</cfoutput>
</table>
</body>
</html>
<cfelse>
<hr>
Go back!
<hr>
</cfif>
|