From 6c85148b00f7b0b8d4c39393069ddc97b657044a Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Fri, 26 Jan 2007 12:19:15 +0000 Subject: [PATCH] Better visibility of the https git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1397 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs/css/default.css | 9 +++++++++ modules/auth.php | 10 ++++++++++ templates/core/password_prompt.tpl | 31 ++++++++++++++++++++++++++++--- templates/skin/common.menu.tpl | 2 +- 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/htdocs/css/default.css b/htdocs/css/default.css index b1ab0a0..c3e8da1 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -161,6 +161,15 @@ table.tinybicol th, table.bicol th { text-align: center; vertical-align: middle; } + +table.tinybicol th a:link, table.tinybicol th a:visited, +table.tinybicol th a:active, table.tinybicol th a:hover, +table.bicol th a:link, table.bicol th a:visited, +table.bicol th a:active, table.bicol th a:hover { + color: #9999FF; + background: inherit; +} + table.tinybicol td, table.bicol td { color: #000000; background: inherit; diff --git a/modules/auth.php b/modules/auth.php index 35618c1..a9afa5f 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -24,6 +24,7 @@ class AuthModule extends PLModule function handlers() { return array( + 'login' => $this->make_hook('login', AUTH_COOKIE), 'groupex/donne-chall.php' => $this->make_hook('chall', AUTH_PUBLIC), 'groupex/export-econfiance.php' @@ -38,6 +39,14 @@ class AuthModule extends PLModule ); } + function handler_login(&$page) + { + $allkeys = func_get_args(); + unset($allkeys[0]); + $url = join('/',$allkeys); + pl_redirect($url ? $url : 'events'); + } + function handler_chall(&$page) { $_SESSION["chall"] = uniqid(rand(), 1); @@ -127,6 +136,7 @@ class AuthModule extends PLModule function handler_groupex(&$page) { require_once dirname(__FILE__).'/auth/auth.inc.php'; + $page->assign('referer', true); $gpex_pass = $_GET["pass"]; $gpex_url = urldecode($_GET["url"]); diff --git a/templates/core/password_prompt.tpl b/templates/core/password_prompt.tpl index 29aea88..e16de14 100644 --- a/templates/core/password_prompt.tpl +++ b/templates/core/password_prompt.tpl @@ -30,13 +30,15 @@

-{if $smarty.server.HTTP_REFERER} +{if $referer || $platal->pl_self() neq 'login'}

Accès restreint

Bonjour,
- La page que vous avez demandé ({$smarty.server.HTTP_REFERER}) nécessite une authentification + La page que vous avez demandé + ({if $referer}{$smarty.server.HTTP_REFERER}{else}{$globals->baseurl}/{$platal->pl_self()}{/if}) + nécessite une authentification.

{else}

@@ -75,7 +77,11 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
- +
Connexion{if $smarty.server.HTTPS}{icon name=lock}{/if} Identification + {if !$smarty.server.HTTPS} + (pl_self()}">{icon name=lock_add} Passer en connexion sécurisée) + {/if} +
@@ -126,6 +132,25 @@ Probl (Activer obligatoirement le javascript)

+
+ +
+ {if $smarty.server.HTTPS} + {icon name=lock} : Vous utilisez actuellement une connexion HTTPS sécurisée. Aucune information ne circule + en clair entre chez vous en Polytechnique.org, ce qui permet d'assurer une confidentialité maximale. + {else} + {icon name=lock_open} : Vous utilisez actuellement une connexion HTTP non sécurisée. Toutes les informations + (excepté le mot de passe de connexion au site) circulent en clair entre chez vous et + Polytechnique.org. Il vous est possible d'utiliser une connexion sécurisée en cliquant sur le lien +
+ Plus d'informations sur la connexion sécurisée se trouvent + sur cette page. + {/if} +
+ {if $smarty.request.response}
diff --git a/templates/skin/common.menu.tpl b/templates/skin/common.menu.tpl index 7a47557..fe52c75 100644 --- a/templates/skin/common.menu.tpl +++ b/templates/skin/common.menu.tpl @@ -22,7 +22,7 @@ {if !$smarty.session.auth} - + -- 2.1.4