<%if(user === undefined || user === null) {%>
<body>
<h1>You are not authorized to access this application</h1>
<p>If you believe this is an issue, contact @Jemma#6508 on Discord</p>
<p>Error: <%=error%></p>
</body>
<script>
    wiiuErrorViewer.openByCodeAndMessage(5980020, '<%=error%>\n\nIf you have any questions contact the developers in the Discord server.');
    wiiuBrowser.closeApplication();
</script>
<%} else {%>
<script>
    <%if(user.account_status === 1) {%>
    wiiuErrorViewer.openByCodeAndMessage(5980009, '<%=user.user_id%> has been limited from posting until: \n\n<%= moment(user.ban_lift_date) %>.\n\nReason: <%=user.ban_reason%>\n\nIf you have any questions contact the developers in the Discord server.');
    location.href = '/communities'
    <%} else if(user.account_status === 2) {%>
    wiiuErrorViewer.openByCodeAndMessage(5980010, '<%=user.user_id%> has been banned until: \n\n<%= moment(user.ban_lift_date) %>.\n\nReason: <%=user.ban_reason%>\n\nIf you have any questions contact the developers in the Discord server.');
    wiiuBrowser.closeApplication();
    <%} else if(user.account_status === 3) {%>
    wiiuErrorViewer.openByCodeAndMessage(5980011, '<%=user.user_id%> has been banned forever.\n\nReason: <%=user.ban_reason%>\n\nIf you have any questions contact the developers in the Discord server.');
    wiiuBrowser.closeApplication();
    <%}%>
</script>
<%}%>
