OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN); // Create a new option object for displaying the setting's page's HTML form $oOptions = new OA_Admin_Option('settings'); // Prepare an array for storing error messages $aErrormessage = array(); $pattern = '/[^a-zA-Z0-9\\._-]/'; $group = preg_replace($pattern, '', $_REQUEST['group']); $plugin = preg_replace($pattern, '', $_REQUEST['plugin']); if ($plugin) { $backURL = "plugin-index.php?action=info&package={$plugin}"; } else { $backURL = "plugin-index.php?selection=plugins"; } // get the settings for this plugin $oManager = new OX_Plugin_ComponentGroupManager(); $aComponentSettings = $oManager->getComponentGroupSettings($group, true); // If the settings page is a submission, deal with the form data if (isset($_POST['submitok']) && $_POST['submitok'] == 'true') { // Prepare an array of the HTML elements to process, and the // location to save the values in the settings configuration // file $aElements = array(); foreach ($aComponentSettings as $k => $v) { if (0 == strcmp($v['type'], 'checkbox')) { $aItemSettings = array($group => $v['key'], 'bool' => 'true'); } else { $aItemSettings = array($group => $v['key']); } $aElements += array($group . '_' . $v['key'] => $aItemSettings); // Register the HTML element value MAX_commonRegisterGlobalsArray(array($group . '_' . $v['key']));