Project

General

Profile

« Previous | Next » 

Revision 95

Added by stefan about 19 years ago

Moved settings from config.php into database.
NOT FULLY WORKING!!!

View differences:

save.php
168 168
	$config_filename = $WB_PATH.'/config.php';
169 169
	$config_content = "" .
170 170
	"<?php \n".
171
	"\n".
172
	"define('ER_LEVEL', '$er_level');\n".
173
	$er_level_code.
174
	"\n".
175
	"define('DEFAULT_LANGUAGE', '".str_replace(';', '', $_POST['language'])."');\n".
176
	"\n".
177
	"define('APP_NAME', 'wb');\n".
178
	"\n".
179 171
	"define('DB_TYPE', '".DB_TYPE."');\n".
180 172
	"define('DB_HOST', '".DB_HOST."');\n".
181 173
	"define('DB_USERNAME', '".DB_USERNAME."');\n".
182 174
	"define('DB_PASSWORD', '".DB_PASSWORD."');\n".
183 175
	"define('DB_NAME', '".DB_NAME."');\n".
184
	"\n".
185 176
	"define('TABLE_PREFIX', '".TABLE_PREFIX."');\n".
186 177
	"\n".
187
	"define('DEFAULT_TIMEZONE', '".$timezone_offset."');\n".
188
	"define('DEFAULT_DATE_FORMAT', '".str_replace(';', '', $_POST['date_format'])."');\n".
189
	"define('DEFAULT_TIME_FORMAT', '".str_replace(';', '', $_POST['time_format'])."');\n".
190
	"\n".
191
	"define('HOME_FOLDERS', ".$_POST['home_folders'].");\n".
192
	"\n".
193
	"define('DEFAULT_TEMPLATE', '".$_POST['template']."');\n".
194
	"define('MULTIPLE_MENUS', ".str_replace(';', '', $_POST['multiple_menus']).");\n".
195
	"\n".
196
	"define('INTRO_PAGE', ".str_replace(';', '', $_POST['intro_page']).");\n".
197
	"define('PAGE_TRASH', '".str_replace(';', '', $_POST['page_trash'])."');\n".
198
	"define('PAGE_LEVEL_LIMIT', '".str_replace(';', '', $_POST['page_level_limit'])."');\n".
199
	"define('HOMEPAGE_REDIRECTION', ".str_replace(';', '', $_POST['homepage_redirection']).");\n".
200
	"define('PAGE_LANGUAGES', ".str_replace(';', '', $_POST['page_languages']).");\n".
201
	"\n".
202
	"define('WYSIWYG_EDITOR', '".addslashes($_POST['wysiwyg_editor'])."');\n".
203
	"\n".
204
	"define('MANAGE_SECTIONS', ".str_replace(';', '', $_POST['manage_sections']).");\n".
205
	"define('SECTION_BLOCKS', ".str_replace(';', '', $_POST['section_blocks']).");\n".
206
	"\n".
207
	"define('SMART_LOGIN', ".str_replace(';', '', $_POST['smart_login']).");\n".
208
	"define('FRONTEND_LOGIN', ".str_replace(';', '', $_POST['frontend_login']).");\n".
209
	"define('FRONTEND_SIGNUP', ".str_replace(';', '', $_POST['frontend_signup']).");\n".
210
	"\n".
211
	"define('SERVER_EMAIL', '".$_POST['server_email']."');\n".
212
	"\n".
213
	"define('SEARCH', '".$admin->get_post('search')."');\n".
214
	"\n".
215
	"define('PAGE_EXTENSION', '".str_replace(';', '', $_POST['page_extension'])."');\n".
216
	"define('PAGE_SPACER', '".str_replace(';', '', $_POST['page_spacer'])."');\n".
217
	"\n".
218
	"define('PAGES_DIRECTORY', '".PAGES_DIRECTORY."');\n".
219
	"define('MEDIA_DIRECTORY', '".MEDIA_DIRECTORY."');\n".
220
	"\n".
221
	"define('OPERATING_SYSTEM', '".str_replace(';', '', $_POST['operating_system'])."');\n".
222
	"define('OCTAL_FILE_MODE', ".$file_mode.");\n".
223
	"define('STRING_FILE_MODE', '".$file_mode."');\n".
224
	"define('OCTAL_DIR_MODE', ".$dir_mode.");\n".
225
	"define('STRING_DIR_MODE', '".$dir_mode."');\n".
226
	"\n".
227 178
	"define('WB_PATH', '".$WB_PATH."');\n".
228 179
	"define('WB_URL', '".WB_URL."');\n".
229
	"\n".
230 180
	"define('ADMIN_PATH', '".$ADMIN_PATH."');\n".
231 181
	"define('ADMIN_URL', '".ADMIN_URL."');\n".
232 182
	"\n".

Also available in: Unified diff