📄 verifyform.pm
字号:
# $Id: VerifyForm.pm,v 1.8 2005/06/29 18:29:55 martin Exp $## Copyright 2005 Nature Publishing Group# This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2# of the License, or (at your option) any later version.## The Bibliotech::Component::VerifyForm class provides output to show when a# new user is verified (gets their email and clicks the link).package Bibliotech::Component::VerifyForm;use strict;use base 'Bibliotech::Component';use Bibliotech::Const;sub last_updated_basis { 'NOW';}sub html_content { my ($self, $class, $verbose, $main) = @_; my $cgi = $self->bibliotech->cgi; my $user_id = $cgi->param('userid'); my $verifycode = $cgi->param('code'); my $user; eval { $user_id && $verifycode or die "Verification parameters not supplied.\n"; $self->bibliotech->verify_user($user_id, $verifycode); $user = $self->bibliotech->allow_first_login($user_id); }; if ($@) { return Bibliotech::Page::HTML_Content->simple($cgi->div({class => 'errormsg'}, $@)); } my $cookie = Bibliotech::AuthCookie->login_cookie($user, $self->bibliotech); $self->bibliotech->request->err_headers_out->add('Set-Cookie' => $cookie); undef $user; my $o = $cgi->div({class => 'actionmsg'}, 'Thank you. Your email address has been verified, and you are now logged in.'); if (my $redirect_uri = Bibliotech::AuthCookie->get_login_redirect_cookie($self->bibliotech->request)) { if ($redirect_uri =~ m|/add\b.*uri=.+|) { $o .= $cgi->p({class => 'welcome'}, $cgi->img({src => $self->bibliotech->location.'arrow.gif'}), 'Continue:', $cgi->a({href => $redirect_uri}, 'Save the link')); # says 'Save the link' on nature.com } } $o .= $self->include('/verifyinclude'); return Bibliotech::Page::HTML_Content->simple($o);}1;__END__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -