1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
   |  
<?php
	// Change this secret key so it matches the one in the imagemanager/filemanager config
	$secretKey = md5("code123456789");
 
	// Check here if the user is logged in or not
	$cook = $_COOKIE["userid"]; 
	if (isset($cook)) {
		if (!isset($_SESSION["userid"])){
		die("You are not logged in.");
	}
	}
	// Override any config values here
	$config = array();
	//$config['filesystem.path'] = 'c:/Inetpub/wwwroot/somepath';
	//$config['filesystem.rootpath'] = 'c:/Inetpub/wwwroot/somepath';
 
	// Generates a unique key of the config values with the secret key
	$key = md5(implode('', array_values($config)) . $secretKey);
?>
 
<html>
<body onload="document.forms[0].submit();">
<form method="post" action="<?php echo htmlentities($_GET['return_url']); ?>">
<input type="hidden" name="key" value="<?php echo htmlentities($key); ?>" />
<?php
        foreach ($config as $key => $value) {
                echo '<input type="hidden" name="' . htmlentities(str_replace('.', '__', $key)) . '" value="' . htmlentities($value) . '" />';
        }
?>
</form>
</body>
</html> | 
Partager