}
function escape_html(&$string) {
- return is_string($string) ? htmlspecialchars($string) : $string;
+ if(is_string($string)) {
+ $transtbl = Array('<' => '<', '>' => '>', '"' => '"');
+ return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,4};)/", "&" , strtr($string, $transtbl));
+ } else {
+ return $string;
+ }
}
class XorgPage extends DiogenesCorePage {
-{* $Id: index.tpl,v 1.2 2004-07-08 09:20:57 x2000habouzit Exp $ *}
+{* $Id: index.tpl,v 1.3 2004-08-26 12:31:16 x2000habouzit Exp $ *}
<div class="rubrique">Administration Polytechnique.org</div>
<tr class="impair"><td>
<strong>Sécurité : </strong>
<a href="logger.php">Logs des sessions</a> |
- <a href="logger_user.php">Logs utilisateur</a> |
+ <a href="utilisateurs.php">Logs utilisateur</a> |
<a href="logger_actions.php">Actions</a>
</td></tr>
</table>
-{* $Id: logger-view.tpl,v 1.3 2004-08-24 09:07:57 x2000habouzit Exp $ *}
+{* $Id: logger-view.tpl,v 1.4 2004-08-26 12:31:15 x2000habouzit Exp $ *}
<div class="rubrique">
Parcours des logs du site
<table class="bicol">
<tr>
- <th colspan="2">Propriétés de la session</th>
+ <th colspan="2">{$msg_session_properties}</th>
</tr>
<tr class="impair">
- <td><strong>user</strong></td>
+ <td class="titre">{$msg_user}</td>
<td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if} [<a href="?logauth={$session.auth}&loguser={$session.username}">user's log</a>]</td>
</tr>
<tr class="pair">
- <td><strong>hote</strong></td>
- <td><tt>IP: {$session.ip}</tt><br /><em>{$session.host}</em></td>
+ <td class="titre">{$msg_host}</td>
+ <td><em>{$session.host}</em> <tt>IP: {$session.ip}</tt></td>
</tr>
<tr class="impair">
- <td><strong>browser</strong></td>
+ <td class="titre">{$msg_browser}</td>
<td>{$session.browser}</td>
</tr>
</table>
<table class="bicol">
<tr>
- <th>stamp</th>
- <th>action</th>
- <th>data</th>
+ <th>{$msg_date}</th>
+ <th>{$msg_action}</th>
+ <th>{$msg_data}</th>
</tr>
{foreach from=$events item=myevent}
<tr class="{cycle values="impair,pair"}">
{/foreach}
</table>
-
{else}
<form method="post" action="{$smarty.server.PHP_SELF}">
<table class="bicol">
<tr>
- <th colspan="2">filter by..</th>
+ <th colspan="2">{$msg_filter_by}</th>
</tr>
<tr>
- <td>..<strong>date</strong></td>
+ <td><strong>{$msg_date}</strong></td>
<td>
- year
+ {$msg_year}
<select name="year" onchange="this.form.submit()">
{html_options options=$years selected=$year}
</select>
- month
+ {$msg_month}
<select name="month" onchange="this.form.submit()">
{html_options options=$months selected=$month}
</select>
- day
+ {$msg_day}
<select name="day" onchange="this.form.submit()">
{html_options options=$days selected=$day}
</select>
</td>
</tr>
<tr>
- <td>..<strong>user</strong></td>
+ <td><strong>{$msg_user}</strong></td>
<td>
<input type="text" name="loguser" value="{$loguser}" />
{html_options name="logauth" options=$auths selected=$logauth}
- <input type="submit" />
+ <input type="submit" value="{$msg_submit}" />
</td>
</tr>
</table>
<table class="bicol" style="font-size: 90%">
<tr>
- <th>start</th>
- <th>user</th>
- <th>summary</th>
- <th>actions</th>
+ <th>{$msg_start}</th>
+ <th>{$msg_user}</th>
+ <th>{$msg_summary}</th>
+ <th>{$msg_actions}</th>
</tr>
{foreach from=$sessions item=mysess}
<tr class="{cycle values="impair,pair"}">
{/foreach}
</td>
</tr>
-{/foreach}
+ {/foreach}
+{if $msg_nofilters}
+<tr>
+ <td>{$msg_nofilters}</td>
+</tr>
+{/if}
</table>
{/if}
-{* $Id: table-editor.tpl,v 1.6 2004-08-24 09:07:57 x2000habouzit Exp $ *}
+{* $Id: table-editor.tpl,v 1.7 2004-08-26 12:31:15 x2000habouzit Exp $ *}
{dynamic}
{if !$doedit}
{literal}
-<script language="javascript" type="text/javascript">
+<script type="text/javascript">
<!--
function del( myid ) {
if (confirm ("You are about to delete this entry. Do you want to proceed?")) {
- document.operations.action.value = "del";
- document.operations.{/literal}{$prefix}{literal}id.value = myid;
- document.operations.submit();
+ document.forms.operations.action.value = "del";
+ document.forms.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.forms.operations.submit();
return true;
}
}
function edit( myid ) {
- document.operations.action.value = "edit";
- document.operations.{/literal}{$prefix}{literal}id.value = myid;
- document.operations.submit();
+ document.forms.operations.action.value = "edit";
+ document.forms.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.forms.operations.submit();
return true;
}
// -->
</script>
{/literal}
-<form method="post" action="{$smarty.server.PHP_SELF}" name="operations">
-<input type="hidden" name="action" value="" />
-<input type="hidden" name="{$prefix}id" value="" />
+<form method="post" action="{$smarty.server.PHP_SELF}" id="operations">
+ <div>
+ <input type="hidden" name="action" value="" />
+ <input type="hidden" name="{$prefix}id" value="" />
+ </div>
</form>
<table class="bicol">
{else}
<form method="post" action="{$smarty.server.PHP_SELF}">
- <input type="hidden" name="action" value="update" />
- {if $id!=''}
- <input type="hidden" name="{$prefix}id" value="{$id}"/>
- {/if}
<table class="bicol">
<tr class="impair">
<th colspan="2">
- {if $id!=''}modification de l'entrée {$id}
- {else}nouvelle entrée{/if}
+ <input type="hidden" name="action" value="update" />
+ {if $id!=''}
+ <input type="hidden" name="{$prefix}id" value="{$id}"/>
+ modification de l'entrée
+ {else}
+ nouvelle entrée
+ {/if}
</th>
</tr>
{foreach from=$vars key=mykey item=myval}