Page 1 of 1

Displaying different results

Posted: Tue Apr 24, 2007 10:31 am
by jleampark
I have an intranet Project Registration page which has a very simple patch of PHP:

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";
}
?>
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:

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 x
What do you think it the best approach?

Thoughts? Suggestions?

Thanks.

bump

Posted: Wed Apr 25, 2007 12:46 pm
by jleampark
(bump)

Anyone?

Do you think it's do-able with PHP or would I be better with JavaScript (or something else)?

(/bump)

Posted: Thu Apr 26, 2007 12:17 am
by jmut
Whatever triggers the event that document three is considered updated should as well write this in a table or something.

Later when you build this menue you should check for each menu if updated or not. Wheather this menu is generated with php or javascript
is up to you and not relevant to this topic.