Initial commit
This commit is contained in:
45
login.html.l
Normal file
45
login.html.l
Normal file
@@ -0,0 +1,45 @@
|
||||
{%
|
||||
local em = request.querystring.z and Escapes.urlspunescape(request.querystring.z)
|
||||
|
||||
local u
|
||||
local worked = false
|
||||
local zzz
|
||||
|
||||
if em and not verified then
|
||||
worked = true
|
||||
|
||||
u = DB.getuserbyemail(em)
|
||||
if u and u.privs ~= DB.USER_PRIVS_BANNED then
|
||||
-- Signing in
|
||||
zzz = SMTPAuth.sendauthinfo(u)
|
||||
elseif not u and (BigGlobe.cfg.membexcl == BigGlobe.MEMBEXCL_PUBLIC_WITHAPPROVAL or BigGlobe.cfg.membexcl == BigGlobe.MEMBEXCL_PUBLIC_NOAPPROVAL) then
|
||||
-- Public registration
|
||||
zzz = SMTPAuth.sendregisterinfo(em)
|
||||
else
|
||||
worked = false
|
||||
end
|
||||
|
||||
if worked and BigGlobe.cfg.anarchy == "ANARCHY" then
|
||||
response:addHeader("Refresh", "3;url=" .. zzz)
|
||||
response:statusCode(303)
|
||||
end
|
||||
end
|
||||
|
||||
title = BigGlobe.cfg.sitename .. " - Sign-in sent"
|
||||
%}
|
||||
|
||||
{% function content() %}
|
||||
{% if BigGlobe.cfg.anarchy == "ANARCHY" then %}
|
||||
<p>In anarchy mode, anyone can be anything. Please wait..</p>
|
||||
|
||||
<p>If that doesn't work, <a href="{{ Escapes.htmlescape(zzz) }}">click here</a>.</p>
|
||||
{% else %}
|
||||
{% if worked then %}
|
||||
<p>Link has been sent to {{ em and Escapes.htmlescape(em) }}. This page may be closed.</p>
|
||||
{% else %}
|
||||
<p>You are not authorized to register this account. {% if u and u.privs == DB.USER_PRIVS_BANNED then %}You have been banned.{% elseif BigGlobe.cfg.membexcl == BigGlobe.MEMBEXCL_MEMBERS_INVITE then %}This website is invite-only.{% elseif BigGlobe.cfg.membexcl == BigGlobe.MEMBEXCL_MODS_INVITE then %}Only moderators may invite.{% elseif BigGlobe.cfg.membexcl == BigGlobe.MEMBEXCL_ADMIN_INVITES then %}Only administrators may invite.{% end %}</p>
|
||||
{% end %}
|
||||
{% end %}
|
||||
{% end %}
|
||||
|
||||
{# base.inc
|
||||
Reference in New Issue
Block a user