aboutsummaryrefslogblamecommitdiff
path: root/cgi/templates/manage/bans.html
blob: 81e0f71efe5a53d6206e8b6107aa3a73cc391db9 (plain) (tree)



























































































                                                                                                                                                                                                         
<?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="post">
<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 IP</th>
  <th>Máscara de red</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['netmask']}</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']}&amp;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</td><td><input type="text" name="ip" value="${ip}" size="20" style="width:100%;" /></td></tr>
  <tr><td class="postblock">Máscara de red</td><td><input type="text" name="netmask" value="${startvalues['netmask']}" style="width:100%;" /></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') ?>