#!/usr/bin/perl =pod This file was originally intended to be a cgi program for writing online journals. Original Author: Caro It has been seriously modified, hacked and generally canabalized to serve as a cgi-based on-line conference thingy. This is one of two files, to prevent us from having to check passwords and stuff every time. This one just checks the user's password and generates an input page for the client, the first copy of which has some javascript in it that pops up a new client window connected to the conference page. Modification Author: Tom =cut use English; #require "/home/supadm/public_html/enlightenment/cgi-bin/cgi-lib.pl"; require "cgi-lib.pl"; $ret=&ReadParse; # Get username and password: $user = $in{user}; $inputpassword = $in{password}; $speaker = $in{speaker}; print "Content-Type: text/html\n\n"; # Keep asking for name and password until we get them: unless(defined($user) && defined($inputpassword)) { # Call the subroutine to print the tops of cgi screens: &printHeader; &printPasswordCheckPage; exit; } # Make sure that really is the person's password: $found=&checkPassword; # If password doesn't match the one we have, prompt for correction: unless(1 == $found) { # Call the subroutine to print the tops of cgi screens: &printHeader; print "That's wrong.
"; &printPasswordCheckPage; exit; } print " Enlightenment Talk "; &printEntryPage; # this creates page for user data entry exit; sub checkPassword { =pod Returns 1 if the username and password are found, zero otherwise =cut open(INFILE, "

Can't do it today.
"; while (my $line = ) { chomp($line); ($username,$filedpassword,$speaker) = split(/\|/,$line); if (($username eq $user) && ($inputpassword eq $filedpassword)) { close INFILE; return 1; } } return 0; } sub printEntryPage { open USERENTRY,">../onlinecon/$user.html" or print "Couldn't open user entry file"; print USERENTRY " Enlightenment Talk

Enlightenment Online Conference

\n \n "; if (defined($speaker)) { print USERENTRY ""; } close USERENTRY; } sub printPasswordCheckPage { =pod prints the html form that asks for the password and the username =cut print "
And you are?
What's the word?
"; # Are you speaker or moderator for this conference? (if you aren't sure, you aren't) # #
} sub printHeader { ## Print header: print " Enlightenment Talk

Enlightenment Online Conference

"; }