Revision 1530
Added by Dietmar almost 13 years ago
index.php | ||
---|---|---|
21 | 21 |
session_start(); |
22 | 22 |
define('SESSION_STARTED', true); |
23 | 23 |
} |
24 |
$mod_path = dirname(str_replace('\\', '/', __FILE__)); |
|
25 |
$doc_root = rtrim(str_replace('\\', '/',$_SERVER['DOCUMENT_ROOT']),'/'); |
|
26 |
$mod_name = basename($mod_path); |
|
27 |
$wb_path = dirname(dirname(str_replace('\\', '/', __FILE__))); |
|
28 |
$wb_root = str_replace($doc_root,'',$wb_path); |
|
29 | 24 |
|
25 |
$mod_path = dirname(str_replace('\\', '/', __FILE__)); |
|
26 |
$doc_root = rtrim(str_replace('\\', '/',$_SERVER['DOCUMENT_ROOT']),'/'); |
|
27 |
$mod_name = basename($mod_path); |
|
28 |
$wb_path = dirname(dirname(str_replace('\\', '/', __FILE__))); |
|
29 |
$wb_root = str_replace(realpath($doc_root),'',$wb_path); |
|
30 |
|
|
30 | 31 |
// Function to highlight input fields which contain wrong/missing data |
31 | 32 |
function field_error($field_name='') { |
32 | 33 |
if(!defined('SESSION_STARTED') || $field_name == '') return; |
... | ... | |
89 | 90 |
document.getElementById('file_perms_box').style.display = 'none'; |
90 | 91 |
} |
91 | 92 |
} |
92 |
|
|
93 | 93 |
</script> |
94 | 94 |
</head> |
95 | 95 |
<body> |
... | ... | |
189 | 189 |
</tr> |
190 | 190 |
<tr> |
191 | 191 |
<?php |
192 |
$config = '<font class="good">Writeable</font>'; |
|
193 |
$configFile = '/config.php'; |
|
194 |
if(!isset($_SESSION['config_rename'])) { |
|
195 |
if( ( file_exists($wb_path.$configFile)==false ) && (file_exists($wb_path.'/config.php.new')==true ) ){ |
|
196 |
if( (is_writeable($wb_path.'/config.php.new')==true) && (rename($wb_path.'/config.php.new',$wb_path.'/config.php')) ) { |
|
197 |
$config = '<font class="good">Writeable</font>'; |
|
198 |
$_SESSION['config_rename'] = true; |
|
199 |
} else { |
|
200 |
$installFlag = false; |
|
192 |
$config = '<font class="good">Writeable</font>'; |
|
193 |
$configFile = '/config.php'; |
|
194 |
if(!isset($_SESSION['config_rename']) ) { |
|
195 |
|
|
196 |
if( (file_exists($wb_path.$configFile)==true)) { |
|
197 |
if ( filesize($wb_path.$configFile) > 128) { |
|
198 |
$installFlag = false; |
|
199 |
$config = '<font class="bad">Not empty!!?</font>'; |
|
200 |
} elseif( is_writeable($wb_path.$configFile)==true ) { |
|
201 |
$config = '<font class="good">isWriteable</font>'; |
|
202 |
$_SESSION['config_rename'] = true; |
|
203 |
} |
|
204 |
} elseif((file_exists($wb_path.'/config.php.new')==true)) { |
|
201 | 205 |
$configFile = '/config.php.new'; |
202 |
$config = '<font class="bad">Unwriteable</font>'; |
|
203 |
} |
|
204 |
} elseif( (file_exists($wb_path.'/config.php.new')==true) && ( file_exists($wb_path.$configFile)==true ) ) { |
|
205 |
if( (file_exists($wb_path.$configFile)==true) ) { |
|
206 | 206 |
$installFlag = false; |
207 |
$config = '<font class="bad">Already installed?</font>'; |
|
207 |
$config = '<font class="bad">Please rename</font>'; |
|
208 |
} else { |
|
209 |
$installFlag = false; |
|
210 |
$config = '<font class="bad">Missing!!?</font>'; |
|
208 | 211 |
} |
209 |
} elseif( (is_writeable($wb_path.'/config.php.new')==false) ) { |
|
210 |
$installFlag = false; |
|
211 |
$configFile = '/config.php.new'; |
|
212 |
$config = '<font class="bad">Unwriteable</font>'; |
|
212 |
|
|
213 | 213 |
} |
214 |
} |
|
215 | 214 |
?> |
216 | 215 |
<td width="150px" style="color: #666666;"><?php print $wb_root.$configFile ?></td> |
217 | 216 |
<td width="150px"><?php echo $config ?></td> |
Also available in: Unified diff
update templates allcss and round (Tks to Rübenwurzel)
Add UPGRADE Instructions
Update INSTALL Instructions
Optimize config.php handling for installation