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