2011-11-23 00:12:19 -05:00
|
|
|
{% filter remove_whitespace %}
|
|
|
|
{# Automatically removes unnecessary whitespace #}
|
|
|
|
<div class="ban">
|
2012-03-03 23:31:41 -05:00
|
|
|
<h2>{% trans %}You are banned! ;_;{% endtrans %}</h2>
|
2011-11-23 00:12:19 -05:00
|
|
|
<p>
|
2012-03-08 22:03:25 -05:00
|
|
|
{% trans %}You have been banned from{% endtrans %}
|
2011-11-23 00:12:19 -05:00
|
|
|
{% if ban.uri %}
|
|
|
|
<strong>{{ config.board_abbreviation|sprintf(ban.uri) }}</strong>
|
|
|
|
{% else %}
|
2012-03-03 23:31:41 -05:00
|
|
|
{% trans %}all boards{% endtrans %}
|
2011-11-23 00:12:19 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if ban.reason %}
|
2012-03-03 23:31:41 -05:00
|
|
|
{% trans %}for the following reason:{% endtrans %}
|
2011-11-23 00:12:19 -05:00
|
|
|
{% else %}
|
2012-03-03 23:31:41 -05:00
|
|
|
{% trans %}for an unspecified reason.{% endtrans %}
|
2011-11-23 00:12:19 -05:00
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
{% if ban.reason %}
|
|
|
|
<p class="reason">
|
|
|
|
{{ ban.reason }}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
<p>
|
2012-03-03 23:31:41 -05:00
|
|
|
{% trans %}Your ban was filed on{% endtrans %}
|
|
|
|
<strong>{{ ban.set|date(config.ban_date) }}</strong> {% trans %}and{% endtrans %} <span id="expires">
|
2011-11-23 00:12:19 -05:00
|
|
|
{% if ban.expires %}
|
2012-03-03 23:31:41 -05:00
|
|
|
{% trans %}expires{% endtrans %} <span id="countdown">{{ ban.expires|until }}</span> {% trans %}from now, which is on{% endtrans %}
|
2011-11-23 00:12:19 -05: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-03 23:31:41 -05:00
|
|
|
document.getElementById("expires").innerHTML = "{% trans %}has since expired. Refresh the page to continue.{% endtrans %}";
|
2011-11-23 00:12:19 -05: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-03 23:31:41 -05:00
|
|
|
<em>{% trans %}will not expire{% endtrans %}</em>.
|
2011-11-23 00:12:19 -05:00
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</p>
|
2012-03-03 23:31:41 -05:00
|
|
|
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
|
2011-11-23 00:12:19 -05:00
|
|
|
</div>
|
|
|
|
{% endfilter %}
|
2012-03-08 22:03:25 -05:00
|
|
|
|