#!/usr/bin/perl -U # # IMPORTANT! # # Do not use an extension like .pl or .cgi with this # script file. Leave it as .htm # Most UNIX based browsers try to display files with cgi extemsions # rather than executing them. # # ------------- # File: admin.htm # Description: Generates man html page for the list administrators # provides URLs to those lists thst are present. # admin rights are checked in individual admin scripts. # UserID/passwd authentication of admins is handled by httpd # # Author: Ugur Ayfer # #==================================================================== require 'TEMPLATE/config.pl'; print qq~ WASPII - Announcement Mailing Lists

Logo

Announcements Lists

ADMINISTRATION

Your IP: $ENV{'REMOTE_ADDR'}

Subscription based announcement mailing lists:

~; foreach $dir(<*>) { # check all directories under he current dir for lists if (-d $dir) { # if not a dir, cannot be a list service if ($dir =~ /TEMPLATE/i) { next }; # Dont disclose the TEMPLATE list dir unless (-e "$dir/config.pl") { next } # if there is no confirm.pl there, it # is not a list # find $list_name in lists config.pl file and dislpay its value as # list description $descr = ""; open(CONF, "$dir/config.pl") || ($descr = 'Error: config file cannot be opened'); while () { if (index( $_, '$list_name') eq -1) { next }; ($part1, $descr) = split("=", $_); $descr=~ s/\";/\"/; # get rid of the last semicolon replace"; with " last; } close(CONF); print "$dir - $descr
\n"; } } print "

--- End Of List ---


"; print "
"; # # If user comes from a site admin host, he/she can create a new list. # site admin hosts are declared in a .../LISTS_HOMEDIR/.hosts.admin file # one IP number per line # wild card IP numbers are allowed. # sample .hosts.admin file : # 139.179.10.54 # 139.179.111. # $admin_link = ""; open(ADMIN, "./.hosts.admin") || ($admin_link = ""); $myip = $ENV{'REMOTE_ADDR'}; while () { unless (index($myip, chop($_)) eq -1 ) {next}; $admin_link = " Create a New List"; } close(ADMIN); print qq~

$admin_link


 

 
~;