upnotice.cgi

See the other CGIs Japanese Page


Functionalities

    Automatic display of update information.
  • Display messages when files are updated.
  • Use with SSI
  • Message is displayed in HTML format with encircled by <LI></LI>

Installation

  1. Put upnotice.cgi into a CGI executable directory.
  2. Put a data file as the name of "upfiles.dat" into the directory upnotice.cgi is placed. You can change the data directory and file if you change "$datafile" in the upnotice.cgi.
  3. Modify the Perl path of the first line of the upnotice.cgi to match your server environment.
  4. Modify permission of the upnotice.cgi properly.
  5. Prepare an HTML file which SSI executable and put SSI in to the HTML file as follows.
    <!--#exec cgi="cgi-bin/upnotice.cgi" -->
  6. upnotice.cgi will work when you open the HTML file you put upnotice.cgi into it.
Datafile
    A message will be displayed when specified file is updated. The message will be displayed for seven days in default. You can change the duration by changing the value of "$expire".
    File and message can be specified in upfiles.dat as "filename, message" which separated by a comma.
    The filename in "$datafile" is a relative path from where the CGI locates.
    If you specify "EMPTY" to the first column, the following message will be displayed if none of file is updated.
    "#" at the beginning of the line will be a comment line.
    Spaces and tabs will be ignored.
    An example of the data file shown below.
    -----------
    bbs/bbs.dat, The BBS has been updated.
    ../evcal/evcal.dat,  The event calendar has been udpated.
    ../dialy/dialy.html, The dialy has been updated.
    ../index.shtml,      The top page has been updated.
    #../abc.html, This page has been removed.
    EMPTY, There is no updated page so far.
    -----------
    
Sample and Source
    Sample
    upnotice.cgi Sample of data file


Revision history
  • 1.002 : 9/24/05 : Modified to be displayed with the order from new
  • 1.001 : 8/14/05 : Typo fix
  • 1.0 : 8/13/05 : Cleaned up for release