Commit 91624b8a authored by tbrehm's avatar tbrehm
Browse files

Added the configuration variable $conf['demo_mode'] in the config.inc.php...

Added the configuration variable $conf['demo_mode'] in the config.inc.php file. It disables the newly introduced demo mode which limits certain actions in the interface part of ispconfig: the demo mode can be used to run the ispconfig interface part as online demo.
parent dbbafff1
......@@ -31,6 +31,7 @@ require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -31,6 +31,7 @@ require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -34,6 +34,7 @@ if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
//* Check permissions for module
$app->auth->check_module_permissions('designer');
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
// Lade Template
$app->uses('tpl');
......
......@@ -34,6 +34,7 @@ require_once('../../lib/app.inc.php');
if($_SESSION['s']['user']['typ'] != 'admin'){
die('Admin permissions required.');
}
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -34,6 +34,7 @@ if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
//* Check permissions for module
$app->auth->check_module_permissions('designer');
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
// Lade Template
$app->uses('tpl');
......
......@@ -31,6 +31,7 @@ require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -31,6 +31,7 @@ require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -31,6 +31,7 @@ require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
......
......@@ -4,6 +4,8 @@ require_once('../../lib/config.inc.php');
$conf['start_session'] = false;
require_once('../../lib/app.inc.php');
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
$app->load('remoting');
$server = new SoapServer(null, array('uri' => $_SERVER['REQUEST_URI']));
......
......@@ -81,6 +81,8 @@ class page_action extends tform_actions {
function onBeforeUpdate() {
global $app, $conf;
if($conf['demo_mode'] == true && $this->id <= 3) $app->tform->errorMessage .= 'This function is disabled in demo mode.';
if($_POST['passwort'] != $_POST['passwort2']) {
$app->tform->errorMessage = $app->tform->lng('password_mismatch');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment