Displaying different results
Posted: Tue Apr 24, 2007 10:31 am
I have an intranet Project Registration page which has a very simple patch of PHP:
All this code does is look in a directory and displays (with hyperlink) all the documents in the folder.
But, with these projects, oftentimes the documents get updated. What my customer wants is something similar to above but with an addition. When someone clicks on a link and the document referenced has been updated, a SUBmenu would open with all the updates hyperlinked.
Does that make sense?
If not, here's a graphic:
What do you think it the best approach?
Thoughts? Suggestions?
Thanks.
Code: Select all
<?php
foreach (glob("Projectform/2*.*") as $filename)
{
// split the file name in 2 parts (one before and one after the dot)
$fileparts = explode("/",$filename);
echo "<a href=\"/econ/esmpd/projreg/" . $dir . "/" . $filename . "\">" . $fileparts[1] . "</a><br />\n";
}
?>But, with these projects, oftentimes the documents get updated. What my customer wants is something similar to above but with an addition. When someone clicks on a link and the document referenced has been updated, a SUBmenu would open with all the updates hyperlinked.
Does that make sense?
If not, here's a graphic:
Code: Select all
When you first visit
* linked document one
* linked document two
* linked document three
.
.
.
* linked document x
When you click on document three, you find it has been updated
* linked document one
* linked document two
* linked document three
** update one
** update two
** update three
.
.
.
* linked document xThoughts? Suggestions?
Thanks.