'); printHeader("Advanced Configuration", 1); if (!OCC_ADVANCED_CONFIG) { warn('Advanced configuration is disabled. Enable it in config.php'); } // Submission? if (isset($_POST['submit']) && ($_POST['submit'] == "Update Setting")) { // Check for valid submission if (!validToken('chair')) { warn('Invalid submission'); } if (isset($_POST['module']) && (($_POST['module'] == 'OC') || in_array($_POST['module'], $OC_activeModulesAR)) && isset($_POST['setting']) && isset($OC_configAR[$_POST['setting']]) && isset($_POST['value'])) { if ($OC_configAR[$_POST['setting']] == $_POST['value']) { print '

Setting unchanged

'; } else { $q = "UPDATE `" . OCC_TABLE_CONFIG . "` SET `value`='" . safeSQLstr($_POST['value']) . "' WHERE `module`='" . safeSQLstr($_POST['module']) . "' AND `setting`='" . safeSQLstr($_POST['setting']) . "' LIMIT 1"; $r = ocsql_query($q) or err('Unable to update setting - ' . mysql_error()); if (mysql_affected_rows() != 1) { err('Setting failed to update properly'); } else { print '

Setting updated

'; } } } else { err('Invalid module, setting, or value'); } } print '

Use caution when updating settings through the advanced configuration page as no validation of setting value is provided. If your browser does not support the functionality of this page, you should use the standard configuration update page or edit a setting\'s value in the database config table. A directory of configuration settings is available.


Module:

'; printFooter(); ?>