#!/usr/bin/perl # # Perl CGI script for creating a new author # # get some standard routines require "../../etc/pasha_conf.pl"; require "${Pasha_dir}/lib/lib_cgi.pl"; require "${Pasha_dir}/lib/lib_pasha.pl"; # see what data was sent to us %Cgi = %{&get_cgi_input()}; # save update of review if ($Cgi{option} =~ /^Save/) { &make_changes( { %Cgi }); } # print the top of the HTML page &print_head(); # basic registration information &print_author_registration(); # print the bottom of the HTML page &print_foot(); ## # Add new author in the authors file and add password for htaccess ## sub make_changes { my(%cgi) = %{$_[0]}; my($line, $new_id); # sanity check for ("fullname", "email", "password", "affiliation", "phone") { unless ($cgi{$_} =~ /\w/) { &error("There was a problem with the $_ field. Please try again."); } } # email address in use already? if (&parse_authors($cgi{email}) > 0) { &error("!! Email address already registered. Please contact the conference organizers."); } # each author needs his/her own unique ID (time + PID based); $new_id = $Time . substr($$, -2, 2); # prepare new information $line = join("\t", $new_id, $cgi{fullname}, $cgi{email}, $cgi{password}, $cgi{affiliation}, $cgi{phone}); # write new entry to authors file &update_db_file("authors", "append", $line); # prepare new password entry $line = $cgi{email} . ":" . crypt($cgi{password}, 29); # write new entry to passwd.authors &update_db_file("passwd.authors", "append", $line); # feedback &print_head("Thanks for registering!"); print < You can now submit your work for review.

Note: In the logon box, enter your email address as the user name.

END &print_foot(); } # end &make_changes ## # Simple box with basic information for a new author ## sub print_author_registration { print <

Register to submit for ${Conference_nym}
  Your name (last name, first name):
Instructions:
Please enter your name, affiliation, email address and phone numbe so the conference organizers can get in touch with you, e.g. to request additional information or to let you know your submission has been accepted. You may also receive a message when you can look at the reviews for your submission.

The password can be something simple as long as you don't use it for any other online system. You will be prompted for this password (as well as your email address) when you want to add, update or delete your submissions.

Note that this information will not be made available to the conference reviewers.

  Your affiliation (institution, department):
  Your email address:
  Your password:
  Your phone number:
END } # end &print_author_registration()