#!/usr/bin/perl -wT use CGI qw(standard); use CGI::Carp qw(fatalsToBrowser); use Apache::Htpasswd; my $htpasswd="htpasswd"; my $main=new CGI(); print $main->header; print $main->start_html('Password Administration'); $main->import_names('Q'); if ($Q::form) { if (($Q::username) && ($Q::oldpass) && ($Q::newpass)) { # all the forms have been entered &change_pass } else { print "please fill in all fields"; } } else { # must be a first time customer print $main->startform; print "
| Username: | ",$main->textfield(-name=>'username',-size=>30)," |
| Password: | ",$main->password_field(-name=>'oldpass',-size=>30)," |
| New Password: | ",$main->password_field(-name=>'newpass',-size=>30)," |
| ",$main->submit(-name=>'form',-value=>'Change Password')," |