2023-03-29 23:59:28 +02:00
|
|
|
{% apply spaceless %}
|
2011-11-23 06:12:19 +01:00
|
|
|
{# Automatically removes unnecessary whitespace #}
|
|
|
|
<div class="ban">
|
2013-07-16 12:33:37 +02:00
|
|
|
{% if ban.expires and time() >= ban.expires %}
|
|
|
|
<h2>{% trans %}You were banned! ;_;{% endtrans %}</h2>
|
|
|
|
{% else %}
|
|
|
|
<h2>{% trans %}You are banned! ;_;{% endtrans %}</h2>
|
|
|
|
{% endif %}
|
2011-11-23 06:12:19 +01:00
|
|
|
<p>
|
2013-07-16 12:33:37 +02:00
|
|
|
{% if ban.expires and time() >= ban.expires %}
|
|
|
|
{% trans %}You were banned from{% endtrans %}
|
|
|
|
{% else %}
|
|
|
|
{% trans %}You have been banned from{% endtrans %}
|
|
|
|
{% endif %}
|
2012-04-12 15:23:47 +02:00
|
|
|
{% if ban.board %}
|
|
|
|
<strong>{{ config.board_abbreviation|sprintf(ban.board) }}</strong>
|
2011-11-23 06:12:19 +01:00
|
|
|
{% else %}
|
2012-03-04 05:31:41 +01:00
|
|
|
{% trans %}all boards{% endtrans %}
|
2011-11-23 06:12:19 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if ban.reason %}
|
2012-03-04 05:31:41 +01:00
|
|
|
{% trans %}for the following reason:{% endtrans %}
|
2011-11-23 06:12:19 +01:00
|
|
|
{% else %}
|
2012-03-04 05:31:41 +01:00
|
|
|
{% trans %}for an unspecified reason.{% endtrans %}
|
2011-11-23 06:12:19 +01:00
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
{% if ban.reason %}
|
|
|
|
<p class="reason">
|
|
|
|
{{ ban.reason }}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
<p>
|
2012-03-04 05:31:41 +01:00
|
|
|
{% trans %}Your ban was filed on{% endtrans %}
|
2014-09-01 00:30:33 +02:00
|
|
|
<strong>{{ ban.created|date(config.ban_date) }}</strong>
|
|
|
|
{% if config.show_modname %}
|
|
|
|
{% if ban.username %}
|
|
|
|
{% trans %}by{% endtrans %} <strong> {{ ban.username }} </strong>
|
|
|
|
{% else %}
|
|
|
|
{% trans %}by{% endtrans %} <em> 'system' </em>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% trans %}and{% endtrans %} <span id="expires">
|
2013-07-16 12:33:37 +02:00
|
|
|
{% if ban.expires and time() >= ban.expires %}
|
|
|
|
{% trans %} has since expired. Refresh the page to continue.{% endtrans %}
|
|
|
|
{% elseif ban.expires %}
|
2012-03-04 05:31:41 +01:00
|
|
|
{% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %}
|
2011-11-23 06:12:19 +01:00
|
|
|
<strong>
|
|
|
|
{{ ban.expires|date(config.ban_date) }}
|
|
|
|
</strong>
|
|
|
|
<script>
|
|
|
|
var secondsLeft = {{ ban.expires - time() }};
|
|
|
|
var end = new Date().getTime() + secondsLeft*1000;
|
|
|
|
function updateExpiresTime() {
|
|
|
|
countdown.firstChild.nodeValue = until(end);
|
|
|
|
}
|
|
|
|
function until(end) {
|
|
|
|
var now = new Date().getTime();
|
|
|
|
var diff = Math.round((end - now) / 1000);
|
|
|
|
if (diff < 0) {
|
2012-03-04 05:31:41 +01:00
|
|
|
document.getElementById("expires").innerHTML = "{% trans %}has since expired. Refresh the page to continue.{% endtrans %}";
|
2011-11-23 06:12:19 +01:00
|
|
|
clearInterval(int);
|
|
|
|
return "";
|
|
|
|
} else if (diff < 60) {
|
|
|
|
return diff + " second" + (diff == 1 ? "" : "s");
|
|
|
|
} else if (diff < 60*60) {
|
|
|
|
return (num = Math.round(diff/(60))) + " minute" + (num == 1 ? "" : "s");
|
|
|
|
} else if (diff < 60*60*24) {
|
|
|
|
return (num = Math.round(diff/(60*60))) + " hour" + (num == 1 ? "" : "s");
|
|
|
|
} else if (diff < 60*60*24*7) {
|
|
|
|
return (num = Math.round(diff/(60*60*24))) + " day" + (num == 1 ? "" : "s");
|
|
|
|
} else if (diff < 60*60*24*365) {
|
|
|
|
return (num = Math.round(diff/(60*60*24*7))) + " week" + (num == 1 ? "" : "s");
|
|
|
|
} else {
|
|
|
|
return (num = Math.round(diff/(60*60*24*365))) + " year" + (num == 1 ? "" : "s");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var countdown = document.getElementById("countdown");
|
|
|
|
|
|
|
|
updateExpiresTime();
|
|
|
|
var int = setInterval(updateExpiresTime, 1000);
|
|
|
|
</script>
|
|
|
|
{% else %}
|
2012-03-04 05:31:41 +01:00
|
|
|
<em>{% trans %}will not expire{% endtrans %}</em>.
|
2011-11-23 06:12:19 +01:00
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</p>
|
2012-03-04 05:31:41 +01:00
|
|
|
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
|
2013-08-09 21:52:19 +02:00
|
|
|
|
2013-09-21 04:51:23 +02:00
|
|
|
{% if config.ban_page_extra %}
|
|
|
|
<p>{{ config.ban_page_extra }}</p>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if post and config.ban_show_post %}
|
2013-09-18 00:47:34 +02:00
|
|
|
<hr>
|
2014-05-14 19:51:49 +02:00
|
|
|
<p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p>
|
2013-09-18 00:47:34 +02:00
|
|
|
{{ post }}
|
|
|
|
<br>
|
|
|
|
{% endif %}
|
|
|
|
|
2013-09-21 04:58:12 +02:00
|
|
|
{% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%}
|
2013-09-21 04:51:23 +02:00
|
|
|
<hr>
|
|
|
|
{% if pending_appeal %}
|
|
|
|
<p>
|
|
|
|
{% trans %}You submitted an appeal for this ban on{% endtrans %}
|
|
|
|
<strong>{{ pending_appeal|date(config.ban_date) }}</strong>. {% trans %}It is still pending{% endtrans %}.
|
|
|
|
</p>
|
|
|
|
{% elseif denied_appeals|length >= config.ban_appeals_max %}
|
|
|
|
{% if denied_appeals|length == 1 %}
|
|
|
|
<p>
|
|
|
|
{% trans %}You appealed this ban on{% endtrans %}
|
|
|
|
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
|
|
|
|
{% trans %}and it was denied. You may not appeal this ban again.{% endtrans %}
|
|
|
|
</p>
|
|
|
|
{% else %}
|
|
|
|
<p>{% trans %}You have submitted the maximum number of ban appeals allowed. You may not appeal this ban again.{% endtrans %}</p>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% if denied_appeals|length %}
|
|
|
|
{% if denied_appeals|length == 1 %}
|
|
|
|
<p>
|
|
|
|
{% trans %}You appealed this ban on{% endtrans %}
|
|
|
|
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
|
|
|
|
{% trans %}and it was denied.{% endtrans %}
|
|
|
|
</p>
|
|
|
|
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
|
|
|
|
{% else %}
|
|
|
|
<p>
|
|
|
|
{% trans %}You last appealed this ban on{% endtrans %}
|
|
|
|
<strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong>
|
|
|
|
{% trans %}and it was denied.{% endtrans %}
|
|
|
|
</p>
|
|
|
|
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
<p>{% trans %}You may appeal this ban. Please enter your reasoning below.{% endtrans %}</p>
|
|
|
|
{% endif %}
|
2023-06-02 08:24:09 +02:00
|
|
|
<form class="ban-appeal" action="{{ config.file_post }}" method="post">
|
2013-09-21 04:51:23 +02:00
|
|
|
<input type="hidden" name="ban_id" value="{{ ban.id }}">
|
2021-07-24 14:47:56 +02:00
|
|
|
<textarea name="appeal" rows="4" cols="40" maxlength="{{ config.ban_appeal_max_chars }}"></textarea>
|
2013-09-21 04:51:23 +02:00
|
|
|
<input type="submit" value="Submit">
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2013-08-09 21:55:25 +02:00
|
|
|
{% endif %}
|
2011-11-23 06:12:19 +01:00
|
|
|
</div>
|
2023-03-29 23:59:28 +02:00
|
|
|
{% endapply %}
|