- or download this
if ( param ) {
} else {
}
sub start_handler {}
sub char_handler {}
- or download this
sub start_handler {
my ($expat, $element, %attributes) =@_;
...
$::flag=2;
}
}
- or download this
sub start_handler {
my $element = $_[1];
$::flag = 1 if $::flag == 0 && $element eq 'username';
$::flag = 2 if $::flag == 1 && $element eq 'password';
}
- or download this
sub char_handler {
my ($expat, $text) =@_;
...
#print a link back to login.pl
}
}
- or download this
return unless $::flag;
- or download this
warn '$::flag must be 0, 1, or 2 only' if $::flag > 2 or $::flag <
+ 0;
- or download this
my $text = $_[1];
- or download this
if ($::flag==1 && $text eq (param("username"))) {
$::flag=1;
}
- or download this
if ( $::flag==2 && $text eq param('password') ) {
} elsif ( $::flag==2 && $text ne param('password') {
}
- or download this
if ( $::flag==2 ) {
if ( $text eq param('password') ) {
} else {
}
}
- or download this
return unless $::flag == 2;
if ( $text eq param('password') ) {
} else {
}
- or download this
if ( $text eq param('password') ) {
print redirect( 'http://www.domain.com/cgi-bin/xml_final/viewd
+b.pl?username=' . param('username') );
...
end_html;
}
exit; # no reason to continue processing if the browser is movin
+g on
- or download this
sub char_handler {
return unless $::flag;
...
}
exit;
}
- or download this
my ($parser, $document, $users);
local($::flag);
...
$document = $parser->parse (\*USERS);
close (USERS);
- or download this
$::flag = 0;
open USERS, '../../xml_final/users/users.xml' or die "Could not open u
+sers.xml: $!";
...
my $document = $parser->parse(\*USERS);
close USERS;
- or download this
unless ( param ) {
print login_form();
...
a({ -href => 'newuser.pl'}, 'New User?') ),
end_html;
}
- or download this
#!/usr/bin/perl
...
}
exit;
}