<?py include('templates/base_top.html') ?> <?py include('templates/manage/menu.html') ?> <?py from tenjin.helpers.html import * ?> <center> <div class="replymode">Bans</div> <?py if mode == 0: ?> <form action="#{cgi_url}manage/ban/" name="banform" method="get"> <table> <tr> <td class="postblock">Dirección IP</td> <td><input type="text" name="ip" size="20" /></td> </tr> <tr><td colspan="2"><input type="submit" value="Ir a formulario de ban" style="width:100%;" /></td></tr> </table> </form> <hr /> <table class="managertable"> <tr> <th>Dirección o Rango IP</th> <th>Boards</th> <th>Agregado</th> <th>Expira</th> <th>Ciego</th> <th>Puesto por</th> <th>Razón</th> <th>Nota</th> <th>Acción</th> </tr> <?py for ban in bans: ?> <tr> <td>${ban['ip']}</td> <td>${ban['boards']}</td> <td>${ban['added']}</td> <td>${ban['until']}</td> <td>${ban['blind']}</td> <td>${ban['staff']}</td> <td>${ban['reason']}</td> <td>${ban['note']}</td> <td> [<a href="#{cgi_url}manage/ipshow?ip=#{ban['ip']}">Ver posts</a>] [<a href="#{cgi_url}manage/ban?ip=#{ban['ip']}&edit=#{ban['id']}">Editar</a>] [<a href="#{cgi_url}manage/bans/delete/#{ban['id']}">Eliminar</a>] </td> </tr> <?py #endfor ?> </table> <?py elif mode == 1: ?> <form action="#{cgi_url}manage/ban" name="banform" method="post"> <table> <tr><td class="postblock">IP o Rango</td><td><input type="text" name="ip" value="${ip}" size="20" style="width:100%;" /> <small> <br>Formatos soportados: <ul> <li><b>IPv4 o IPv6.</b><br>Ejemplo: <em>160.25.60.122 o 2001:db8::7334</em></li> <li><b>Rango glob.</b> Sólo IPv4.<br>Ejemplo: <em>192.16.*.* o 200.20.4.10-80</em></li> <li><b>Rango CIDR.</b> IPv4 y IPv6.<br>Ejemplo: <em>190.6.0.0/16 o 2620:0:2d0:200::7/32</em></li> </ul> </small> </td></tr> <tr> <td class="postblock">Board(s)</td> <td> <input type="checkbox" name="board_all" id="b_all" value="1"#{checked(startvalues['where'] == '')} /><label for="b_all" style="font-weight:bold">Todos los boards</label><hr /> <?py for board in boards: ?> <input type="checkbox" name="board_#{board['dir']}" id="b#{board['dir']}" value="1"#{checked(board['dir'] in startvalues['where'])} /><label for="b#{board['dir']}">${board['name']}</label><br /> <?py #endfor ?> <?py if edit_id > 0: ?> <input type="hidden" name="edit" value="${edit_id}" /> <?py #endif ?> </td> </tr> <tr><td class="postblock">Mensaje</td><td><textarea name="reason" style="width:100%;">${startvalues['reason']}</textarea></td></tr> <tr><td class="postblock">Nota para staff</td><td><input type="text" name="note" value="${startvalues['note']}" style="width:100%;" /></td></tr> <tr><td class="postblock">Ciego</td><td><input type="checkbox" name="blind" id="blind" value="1"#{checked(startvalues['blind'] == '1')} /><label for="blind"></label></td></tr> <tr><td class="postblock">Expira en <span style="font-weight:normal;">(segundos)</span></td><td><input type="text" id="seconds" name="seconds" value="#{startvalues['seconds']}" style="width:100%;" /> <br /> <div id="timelist"> <a href="#" data-secs="0">Nunca</a> <a href="#" data-secs="3600">1h</a> <a href="#" data-secs="21600">6h</a> <a href="#" data-secs="43200">12h</a> <a href="#" data-secs="86400">1d</a> <a href="#" data-secs="259200">3d</a> <a href="#" data-secs="604800">1w</a> <a href="#" data-secs="2592000">30d</a> <a href="#" data-secs="31536000">1y</a> </div> </td> </tr> <tr> <td colspan="2"><input type="submit" value="Colocar ban" style="width:100%;" /></td> </tr> </table> </form> <?py #endif ?> </center> <hr /> <?py include('templates/base_bottom.html') ?>