[add] load cache/config/options.php if exist.
This commit is contained in:
parent
e557660d28
commit
05b32af487
1 changed files with 10 additions and 6 deletions
16
index.php
16
index.php
|
@ -19,7 +19,7 @@ $GLOBALS['config']['defaultUrl'] = 'https://duckduckgo.com/';
|
||||||
// default size for thumbnail
|
// default size for thumbnail
|
||||||
$GLOBALS['config']['defaultThumbSize'] = '120x90';
|
$GLOBALS['config']['defaultThumbSize'] = '120x90';
|
||||||
// generate only thumbnail or generate thumbnail + 1280x1024 image
|
// generate only thumbnail or generate thumbnail + 1280x1024 image
|
||||||
$GLOBALS['config']['onlyThumb'] = true;
|
$GLOBALS['config']['onlyThumb'] = false;
|
||||||
// list of available size for thumb
|
// list of available size for thumb
|
||||||
$GLOBALS['config']['thumbSize'] = array(
|
$GLOBALS['config']['thumbSize'] = array(
|
||||||
's' => '120x90',
|
's' => '120x90',
|
||||||
|
@ -35,6 +35,10 @@ $GLOBALS['config']['disableExec'] = false;
|
||||||
// Enable log for success, suspect, error
|
// Enable log for success, suspect, error
|
||||||
$GLOBALS['config']['log'] = false;
|
$GLOBALS['config']['log'] = false;
|
||||||
|
|
||||||
|
if (file_exists('cache/config/options.php')) {
|
||||||
|
require 'cache/config/options.php';
|
||||||
|
}
|
||||||
|
|
||||||
if (get_magic_quotes_gpc()) {
|
if (get_magic_quotes_gpc()) {
|
||||||
function stripslashes_deep($value) {
|
function stripslashes_deep($value) {
|
||||||
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
|
$value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
|
||||||
|
@ -339,7 +343,7 @@ function savePass($passOne, $passTwo, $token) {
|
||||||
$GLOBALS[\'config\'][\'salt\'] = \''.$confSalt.'\';
|
$GLOBALS[\'config\'][\'salt\'] = \''.$confSalt.'\';
|
||||||
$GLOBALS[\'config\'][\'pwd\'] = \''.$confPwd.'\';
|
$GLOBALS[\'config\'][\'pwd\'] = \''.$confPwd.'\';
|
||||||
?>';
|
?>';
|
||||||
file_put_contents('cache/config/genConf.php',$confFile);
|
file_put_contents('cache/config/genConf.php', $confFile);
|
||||||
}
|
}
|
||||||
header("Location:?");
|
header("Location:?");
|
||||||
}
|
}
|
||||||
|
@ -363,9 +367,9 @@ function n_print($data, $name = '') {
|
||||||
echo '<h2>', $name, '</h2>';
|
echo '<h2>', $name, '</h2>';
|
||||||
echo '<fieldset style="border: 1px solid orange; padding: 5px;color: #333; background-color: #fff;">';
|
echo '<fieldset style="border: 1px solid orange; padding: 5px;color: #333; background-color: #fff;">';
|
||||||
echo '<legend style="border:1px solid orange;padding: 1px;background-color:#eee;color:orange;">
|
echo '<legend style="border:1px solid orange;padding: 1px;background-color:#eee;color:orange;">
|
||||||
', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], '
|
', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], '
|
||||||
</legend>';
|
</legend>';
|
||||||
echo '<pre>', htmlentities(print_r($data, 1)), '</pre>';
|
echo '<pre>', htmlentities(print_r($data, 1)), '</pre>';
|
||||||
echo '
|
echo '
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br />
|
<br />
|
||||||
|
@ -377,7 +381,7 @@ function printThumbShot($file) {
|
||||||
header("Content-type: image/png");
|
header("Content-type: image/png");
|
||||||
header('Expires: ', gmdate('D, d M Y H:i:s', time()).' GMT');
|
header('Expires: ', gmdate('D, d M Y H:i:s', time()).' GMT');
|
||||||
echo file_get_contents($file.'_thumb.png');
|
echo file_get_contents($file.'_thumb.png');
|
||||||
exit() ;
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPage($page) {
|
function getPage($page) {
|
||||||
|
@ -576,7 +580,7 @@ if (!empty($ui['request']) && $ui['p'] !== 'install' && $ui['p'] !== 'login' &&
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
require getPage($ui['p']);
|
require getPage($ui['p']);
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in a new issue