1 {**************************************************************************}
3 {* Copyright (C) 2003-2007 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
18 {* Foundation, Inc., *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
23 <h1>Gestion des IPs surveillées</h1>
25 {if $action eq "list"}
35 <strong>Ajouter une entrée</strong>
37 <td colspan="2" class="right">
38 <strong><a href="admin/ipwatch/create">créer{icon name=add}</a></strong>
41 {foreach from=$table item=ip}
42 <tr class="{cycle values="pair,impair"}">
44 <strong>{$ip.ip}</strong><br />
45 <small>{$ip.host}</small><br />
46 Ajoutée le {$ip.detection|date_format}
52 {foreach from=$ip.users item=user name=all}
54 <a href="profile/{$user}" class="popup2">{$user}</a>
55 <a href="admin/user/{$user}">{icon name=wrench title=Administrer}</a>
56 <a href="admin/logger/user/{$user}">{icon name=information title="Logs"}</a>{if !$smarty.foreach.all.last}<br />{/if}
61 <a href="admin/ipwatch/edit/{$ip.ip}">{icon name=page_edit title="Editer"}</a>
62 <a href="admin/ipwatch/delete/{$ip.ip}">{icon name=delete title="Supprimer"}</a>
67 {elseif $action eq "create" || $action eq "edit"}
68 [<a href="admin/ipwatch">Retour à la liste des IPs surveillées</a>]<br /><br />
69 <form method="post" action="admin/ipwatch">
70 <table class="tinybicol">
72 <th colspan="2">Commenter une adresse IP</th>
75 {if $action eq "create"}
76 <td class="titre">Adresse IP</td>
77 <td><input type="text" name="ipN" /></td>
80 <strong>{$ip.ip}</strong> ({$ip.host})
81 <input type="hidden" name="ipN" value="{$ip.ip}" />
84 {foreach from=$ip.users key=i name=all item=user}
86 {if $i is even}<tr class="impair">{/if}
88 <a href="profile/{$user}" class="popup2">{$user}</a>
89 <a href="admin/user/{$user}">{icon name=wrench title="Administrer}</a>
90 <a href="admin/logger/user/{$user}">{icon name=information title="Logs"}</a>{if !$smarty.foreach.all.last}<br />{/if}
92 {if $i is even && $smarty.foreach.all.last}<td></td>{/if}
93 {if $i is odd || $smarty.foreach.all.last}</tr>{/if}
97 <td class="titre">Date de détection</td>
98 <td>{$ip.detection|date_format}</td>
102 <td class="titre">Danger</td>
104 <select name="stateN">
105 {foreach from=$states key=state item=text}
106 <option value="{$state}"{if $ip.state eq $state} selected="selected"{/if}>{$text}</option>
112 <td colspan="2" class="titre">Description</td>
117 <small>Dernière édition par {$ip.edit} le {$ip.last|date_format}</small>
122 <td colspan="2" class="center">
123 <textarea cols="50" rows="10" name="descriptionN">{$ip.description}</textarea>
128 <input type="hidden" name="action" value="{$action}" />
129 <input type="submit" name="valid" value="Valider" />
136 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}