From 21ee9e5a7bd8b0ee27bd05306242b75434fc8df2 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Thu, 26 Aug 2004 12:31:15 +0000 Subject: [PATCH] various fixes --- include/xorg.page.inc.php | 7 ++++++- templates/admin/index.tpl | 4 ++-- templates/logger-view.tpl | 48 +++++++++++++++++++++++++--------------------- templates/table-editor.tpl | 37 +++++++++++++++++++---------------- 4 files changed, 54 insertions(+), 42 deletions(-) diff --git a/include/xorg.page.inc.php b/include/xorg.page.inc.php index e305ef6..e364a26 100644 --- a/include/xorg.page.inc.php +++ b/include/xorg.page.inc.php @@ -24,7 +24,12 @@ function function_dyn($params) { } 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 { diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index f711c70..6f57ad3 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -1,4 +1,4 @@ -{* $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 $ *}
Administration Polytechnique.org
@@ -19,7 +19,7 @@ Sécurité : Logs des sessions   |   - Logs utilisateur   |   + Logs utilisateur   |   Actions diff --git a/templates/logger-view.tpl b/templates/logger-view.tpl index 96bb96a..1488c7d 100644 --- a/templates/logger-view.tpl +++ b/templates/logger-view.tpl @@ -1,4 +1,4 @@ -{* $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 $ *}
Parcours des logs du site @@ -10,18 +10,18 @@ - + - + - - + + - +
Propriétés de la session{$msg_session_properties}
user{$msg_user} {$session.username} {if $session.suer}(suid by {$session.suer}){/if} [user's log]
hoteIP: {$session.ip}
{$session.host}
{$msg_host}{$session.host} IP: {$session.ip}
browser{$msg_browser} {$session.browser}
@@ -30,9 +30,9 @@ - - - + + + {foreach from=$events item=myevent} @@ -43,37 +43,36 @@ {/foreach}
stampactiondata{$msg_date}{$msg_action}{$msg_data}
- {else}
- + - + - +
filter by..{$msg_filter_by}
..date{$msg_date} - year + {$msg_year} -  month +  {$msg_month} -  day +  {$msg_day}
..user{$msg_user} {html_options name="logauth" options=$auths selected=$logauth} - +
@@ -84,10 +83,10 @@ - - - - + + + + {foreach from=$sessions item=mysess} @@ -102,7 +101,12 @@ {/foreach} -{/foreach} + {/foreach} +{if $msg_nofilters} + + + +{/if}
startusersummaryactions{$msg_start}{$msg_user}{$msg_summary}{$msg_actions}
{$msg_nofilters}
{/if} diff --git a/templates/table-editor.tpl b/templates/table-editor.tpl index 4981732..497238c 100644 --- a/templates/table-editor.tpl +++ b/templates/table-editor.tpl @@ -1,4 +1,4 @@ -{* $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} @@ -9,29 +9,31 @@ {if !$doedit} {literal} - {/literal} - - - + +
+ + +
@@ -81,15 +83,16 @@ {else} - - {if $id!=''} - - {/if}
{foreach from=$vars key=mykey item=myval} -- 2.1.4
- {if $id!=''}modification de l'entrée {$id} - {else}nouvelle entrée{/if} + + {if $id!=''} + + modification de l'entrée + {else} + nouvelle entrée + {/if}