#Discus board new messages script #------------------------------------------------------------------------------- #This script is copyright (c) 1997-98 by Kevin W. Paulisse and William F. Polik, #all rights reserved. You may not modify or delete this copyright header. #The use of this product is subject to a license agreement. Contact Kevin #Paulisse (paulisse@mulliken.chem.hope.edu) for further information. #------------------------------------------------------------------------------- # If you have topics on your board that are password protected, # you can exclude them from being searched by the new message # search. This eliminates a security hole of users being able # to read the first few words of messages in read-only areas. # These entries are numbers corresponding to the subdirectory # in which the topic is placed. # @private_topics = ('1', '2'); # If you want to change the default selection on the new messages # top page, you can do so here by commenting/uncommenting lines. $CHECKED{'last'} = "CHECKED"; # Search last x days/hours #$CHECKED{'user'} = "CHECKED"; # Search by username/password #$CHECKED{'since'} = "CHECKED"; # Search since 12:01 am ... # If you want the message tree view to be enabled by default, you # can define this variable $CHECKED{'treeview'} = "CHECKED"; #------------------------------------------------------------------------------ open (FILE, "$discus_conf"); @file = ; close (FILE); $evals = ""; foreach $line (@file) { if ($line =~ /^(\w+)=(.*)/) { $varname = $1; $value = $2; $value =~ s/'/\\'/g; $evals .= "\$$varname='$value'; "; } } eval($evals); require "$admin_dir/source/src-board-subs-common"; $version_number .= "-w95" if ($platform eq "win95" || $win95); $version_number .= "NT" if ($platform eq "winnt" || $NT || $winnt); $version_number .= "[$server]" if $server ne ""; # This tries to keep long lines out of no frames interface $maxchar = 40; $maxchar = 25 if $interface eq "noframes"; &parse_form; &read_cookie; open (LOG, "$admin_dir/log.txt"); @LOG = ; close (LOG); @LOG = reverse @LOG; ($time) = &ex('get_date_time', "long"); ######################################################### # This is the static page that gets spit out if ($FORM{'method'} eq "") { $option_string = ""; foreach $logline (@LOG) { ($what,$who,$when,$where,$anon) = split(/;/, $logline); next if $what =~ /^D/; last if $what !~ /^D/; } $count = scalar(@LOG); $when = "" if $what =~ /^D/; if ($when ne "") { ($lasttime) = &ex('get_date_time', "long", $when); } $lasttime = "N/A" if $when eq ""; $counter = -1; $todays_day = (localtime(time))[6]; for($i = ($todays_day + 5); $i >= ($todays_day); $i -= 1) { $counter += 1; $option_string .= "