Displaying different results

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jleampark
Forum Newbie
Posts: 16
Joined: Wed Jul 27, 2005 6:46 am

Displaying different results

Post 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.
jleampark
Forum Newbie
Posts: 16
Joined: Wed Jul 27, 2005 6:46 am

bump

Post by jleampark »

(bump)

Anyone?

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

(/bump)
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post 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.
Post Reply