PDA

View Full Version : HOW TO auto read files and regenarate table in dreamweaver?


BLopes
10-22-2008, 10:51 AM
I there.
I'm trying to buid a page that once selected an item from a list, auto-reads files in a folder and and sort them in a table, with a calendar look.
The files are being feed to the folder with the name "ZON YY-MM-DD.gif" "PSI20 YY-MM-DD.gif" "JMAR YY-MM-DD.gif"
i.e.

"MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" |
--------------------------------------------------------------------
YY-MM-DD | YY-MM-DD | YY-MM-DD | YY-MM-DD | YY-MM-DD |
....
....
....
--------------------------------------------------------------------
08-10-20 | 08-10-21 | 08-10-22 | 08-10-23 | 08-10-24 |
--------------------------------------------------------------------
08-10-13 | 08-10-14 | 08-10-15 | 08-10-15 | 08-10-16 |
--------------------------------------------------------------------
Until now for each week I was coding in manually the new row for each item, but it's a pain changing the date and item.

<tr>
<td><div align="center">07-07-2008</div></td>
<td><div align="center">08-07-2008</div></td>
<td><div align="center">09-07-2008</div></td>
<td><div align="center">10-07-2008</div></td>
<td><div align="center">11-07-2008</div></td>
</tr>
<tr>
<td><div align="center">
<p><img src="ZON 08-07-08.gif" width="220" height="129" /></p>
</div></td>
<td><div align="center">
<p><img src="ZON 08-07-08.gif" width="220" height="129" /></p>
</div></td>
<td><div align="center">
<p><img src="ZON 09-07-08.gif" width="220" height="129" /></p>
</div></td>
<td><div align="center">
<p><img src="ZON 10-07-08.gif" width="220" height="129" /></p>
</div></td>
<td><div align="center">
<p><img src="ZON 11-07-08.gif" width="220" height="129" /></p>
</div></td>
</tr>


How can I do this automatically?
Doing it with FOR's WHILE's and IF's seems very troublesome.
Any code or pointers are welcome.
BLopes

davidj
10-22-2008, 12:22 PM
are the files text or gif images?

you can process text files but not data in images

you will have to do this using a scripting language like PHP


Doing it with FOR's WHILE's and IF's seems very troublesome.


i am afraid that you will need loops and conditions to write what you want.

[everything in life involves some trouble...
The only way to do anything and avoid trouble is to pay someone else to handle the trouble for you.]

BLopes
10-22-2008, 02:34 PM
The files are gif images.
My objective is to sort those images in a table that looks like a calender

BLopes
10-22-2008, 03:01 PM
What if I chose to order it my creation date or modification date?
How can i do this?

2bz2p
10-23-2008, 01:29 PM
What if I chose to order it my creation date or modification date?
How can i do this?
mysql and php will do this automatically everytime you load the page

Like DJ said either bang your head against a wall for an hour and learn how to hand code or pay someone, me personally went through the learning pains and still going through it, but I can make a site do whatever I can dream up.

good place to start is here.
http://www.dreamweaverclub.com/vtm/php-mysql-apache.php (http://www.dreamweaverclub.com/vtm/php-mysql-apache.php)

just my 2 cents
2b