|
|
@ -28,6 +28,16 @@ sub register { |
|
|
|
my ($c, $unixtime) = @_; |
|
|
|
my ($c, $unixtime) = @_; |
|
|
|
return strftime("%Y-%m-%d %H:%M", localtime($unixtime)); |
|
|
|
return strftime("%Y-%m-%d %H:%M", localtime($unixtime)); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$app->helper(access_allowed => sub { |
|
|
|
|
|
|
|
my ($c, $level) = @_; |
|
|
|
|
|
|
|
$level //= ''; |
|
|
|
|
|
|
|
if ($level eq 'user' and not $c->session('useruid')) { |
|
|
|
|
|
|
|
$c->redirect_to('/user/eaccess'); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
1; |
|
|
|
1; |
|
|
|