2011-11-23 06:12:19 +01:00
|
|
|
{% filter remove_whitespace %}
|
|
|
|
{# 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 %}
|
|
|
|
<strong>{{ ban.set|date(config.ban_date) }}</strong> {% 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
|
|
|
|
|
|
|
<p>{{ config.ban_page_message }}</p>
|
2011-11-23 06:12:19 +01:00
|
|
|
</div>
|
|
|
|
{% endfilter %}
|
2012-03-09 04:03:25 +01:00
|
|
|
|