[- use Embperl::Form::Validate; use File::Basename ; $epf1 = new Embperl::Form::Validate([ -key => 'user_email', required => 1, -key => 'user_password', required => 1, length_min => 5], 'login'); $epf2 = new Embperl::Form::Validate([ -key => 'user_email', required => 1], 'newuser'); $r = shift ; $fdat{user_email} ||= $fdat{email} ; -] [$ if not $udat{user_id}$] [$ if ($fdat{-newuser} || $fdat{-newpassword}) && !$r -> {error}$]
[= loginnew =]
[$else$][= login1 =]
[$endif$][= cookie_note =]
[$ if (!$fdat{-newuser} && !$dat{-newpassword}) ||$r -> {error} $][= login2 =]
[= login3 =]
[$ endif $] [$ else $] [$ endif $]