aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/manage/bans.html
blob: 96e1ed1ed7d06d1c5cd6ad150d699cbca14bcd33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?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 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']}&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 o Rango</td><td><input type="text" name="ip" value="${ip}" size="20" 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') ?>