A better demo home page
This commit is contained in:
parent
2fd6bde504
commit
f39507688a
@ -102,7 +102,10 @@ if ($_REQUEST["action"] == 'gotodemo')
|
|||||||
|
|
||||||
if ($disablestring)
|
if ($disablestring)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT.'/index.php?disablemodules='.$disablestring);
|
$url=DOL_URL_ROOT.'/index.php?disablemodules='.$disablestring;
|
||||||
|
if (! empty($_REQUEST["urlfrom"])) $url.='&urlfrom='.$_REQUEST["urlfrom"];
|
||||||
|
if (! empty($conf->global->MAIN_DEMO)) $url.='&username='.urlencode($conf->global->MAIN_DEMO);
|
||||||
|
header("Location: ".$url);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,7 +210,7 @@ foreach ($demoprofiles as $profilarray)
|
|||||||
{
|
{
|
||||||
if ($profilarray['default'] >= 0)
|
if ($profilarray['default'] >= 0)
|
||||||
{
|
{
|
||||||
$url=$_SERVER["PHP_SELF"].'?action=gotodemo&demochoice='.$profilarray['key'];
|
$url=$_SERVER["PHP_SELF"].'?action=gotodemo&demochoice='.$profilarray['key'].'&urlfrom='.urlencode($_SERVER["PHP_SELF"]);
|
||||||
//if ($i % $NBOFCOLS == 0) print '<tr>';
|
//if ($i % $NBOFCOLS == 0) print '<tr>';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
|
|||||||
@ -33,6 +33,9 @@ if ($_SESSION["dol_authmode"] == 'forceuser'
|
|||||||
include_once("../conf/conf.php");
|
include_once("../conf/conf.php");
|
||||||
require_once("../main.inc.php");
|
require_once("../main.inc.php");
|
||||||
|
|
||||||
|
// Define url to go after disconnect
|
||||||
|
$urlfrom=empty($_SESSION["urlfrom"])?'':$_SESSION["urlfrom"];
|
||||||
|
|
||||||
// Module Phenix
|
// Module Phenix
|
||||||
if ($conf->phenix->enabled && $conf->phenix->cookie)
|
if ($conf->phenix->enabled && $conf->phenix->cookie)
|
||||||
{
|
{
|
||||||
@ -56,5 +59,13 @@ dolibarr_syslog("Start session name=".$sessionname." Session id()=".session_id()
|
|||||||
|
|
||||||
session_unregister("dol_login");
|
session_unregister("dol_login");
|
||||||
|
|
||||||
header("Location: ".DOL_URL_ROOT."/index.php");
|
|
||||||
|
// Define url to go
|
||||||
|
$url=DOL_URL_ROOT."/index.php"; // By default go to login page
|
||||||
|
if ($urlfrom)
|
||||||
|
{
|
||||||
|
$url=DOL_URL_ROOT.$urlfrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
header("Location: ".$url);
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user