[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/10: Task #1159 - Déconnexion/reconnexion
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/10: Task #1159 - Déconnexion/reconnexion - pop-up? Bug #1151Bug cannot display properly when only one submenu |
Date: |
Wed, 26 Aug 2015 18:11:19 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 91b80006b99e5f8804e922b6a58f5a5a9c6ed833
Author: Dany De Bontridder <address@hidden>
Date: Wed Aug 26 20:02:15 2015 +0200
Task #1159 - Déconnexion/reconnexion - pop-up?
Bug #1151Bug cannot display properly when only one submenu
---
html/do.php | 4 +++-
html/index.php | 17 ++++++++++++-----
html/login.php | 10 +++++++---
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/html/do.php b/html/do.php
index 9417f65..51671d1 100644
--- a/html/do.php
+++ b/html/do.php
@@ -42,7 +42,9 @@ if ( ! isset($_REQUEST['gDossier']))
if ( ! isset ($_SESSION['g_theme']))
{
echo "<h2>"._('Vous êtes déconnecté')."</h2>";
- redirect('user_login.php');
+ $backurl=$_SERVER['REQUEST_URI'];
+
$url="index.php?".http_build_query(array('reconnect'=>1,'backurl'=>urlencode($backurl)));
+ redirect($url);
exit();
}
diff --git a/html/index.php b/html/index.php
index 8bc66e7..e008e56 100644
--- a/html/index.php
+++ b/html/index.php
@@ -207,7 +207,9 @@ background-repeat: repeat-x repeat-y;
<BODY>';
$my_domain="";
require_once '../include/constant.php';
-require_once ('config.inc.php');
+require_once '../include/config.inc.php';
+require_once NOALYSS_INCLUDE.'/ac_common.php';
+
if ( strlen(domaine) > 0 )
{
$my_domain="Domaine : ".domaine;
@@ -217,6 +219,11 @@ if (defined("RECOVER") && isset ($_REQUEST['recover']) )
{
require_once '../include/recover.php';
}
+// reconnect , create a variable to reconnect properly in login.php
+$goto="";
+if (isset ($_REQUEST['reconnect']) && isset ($_REQUEST['backurl'])) {
+ $goto='<input type="hidden" value="'.$_REQUEST['backurl'].'"
name="backurl">';
+}
echo '
<span
style="background-color:#879ed4;color:white;padding-left:4px;padding-right:4px;">
version 6.8.1.6 - '.$my_domain.'
@@ -232,8 +239,9 @@ version 6.8.1.6 - '.$my_domain.'
<BR>
<BR>
-<form action="login.php" method="post" name="loginform">
-<TABLE><TR><TD>
+<form action="login.php" method="post" name="loginform">'.
+ $goto .
+'<TABLE><TR><TD>
<TABLE BORDER=0 CELLSPACING=0>
<TR>
<TD class="cell">Utilisateur</TD>
@@ -244,8 +252,7 @@ version 6.8.1.6 - '.$my_domain.'
<TD><INPUT TYPE="PASSWORD" class="input_text" value="" NAME="p_pass"
tabindex="2"></TD>
</TR>';
-require_once('constant.php');
-require_once('ac_common.php');
+
if ( $g_captcha == true )
{
diff --git a/html/login.php b/html/login.php
index e39c9a2..2bae355 100644
--- a/html/login.php
+++ b/html/login.php
@@ -53,7 +53,7 @@ if ( isset ($_POST["p_user"] ) )
echo "<META HTTP-EQUIV=\"REFRESH\"
content=\"0;url=admin/setup.php\">";
exit();
}
- include_once ("class_user.php");
+ include_once NOALYSS_INCLUDE."/class_user.php";
$User=new User($rep);
$User->Check(false,'LOGIN');
if ($g_captcha == true)
@@ -68,8 +68,12 @@ if ( isset ($_POST["p_user"] ) )
exit();
}
}
- echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php\">";
-
+ $backurl='user_login.php';
+ if ( isset ($_POST['backurl'])) {
+ $backurl=urldecode($_POST['backurl']);
+ }
+ echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url={$backurl}\">";
+ exit();
}
else
{
- [Noalyss-commit] [noalyss] branch master updated (3d76f6d -> 1dc7ee2), Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 01/10: #1153 Dialog box : move smoke.css in each style sheet CSS to customize them, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 03/10: Bug #1151Bug cannot remove a submenu, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 07/10: Add variable NOALYSS_TEMPLATE, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 04/10: #1153 Dialog box : confirm_form in javascript , use of smoke, add style, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 05/10: Bug #1151Bug cannot display properly when only one submenu, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 08/10: Bug #1151 typo, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 06/10: Task #1159 - Déconnexion/reconnexion - pop-up? Bug #1151Bug cannot display properly when only one submenu,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/10: Code Documentation, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 02/10: Task #1151 - Amélioration configuration des menus Bug #1151error with the profile.p_id , confusion with profile_menu.pm_id, Dany De Bontridder, 2015/08/26
- [Noalyss-commit] [noalyss] 10/10: improve appearance, Dany De Bontridder, 2015/08/26