mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
A better demo home page
This commit is contained in:
parent
2fd6bde504
commit
f39507688a
|
|
@ -102,7 +102,10 @@ if ($_REQUEST["action"] == 'gotodemo')
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -207,7 +210,7 @@ foreach ($demoprofiles as $profilarray)
|
|||
{
|
||||
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>';
|
||||
print '<tr>';
|
||||
print '<td align="left">';
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ if ($_SESSION["dol_authmode"] == 'forceuser'
|
|||
include_once("../conf/conf.php");
|
||||
require_once("../main.inc.php");
|
||||
|
||||
// Define url to go after disconnect
|
||||
$urlfrom=empty($_SESSION["urlfrom"])?'':$_SESSION["urlfrom"];
|
||||
|
||||
// Module Phenix
|
||||
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");
|
||||
|
||||
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