0 ) // array_push($errors, l10n('Your configuration is NOT saved due to above reasons.')); if ( !is_webmaster() and count($errors) == 0 ) array_push($infos, l10n('You are not authorized to change this configuration (Webmaster only).')); if ( is_webmaster() and count($errors) == 0 ) { $nsp = array_merge( $vag, array_intersect_key($nsp, $vag) ); // var_dump($nsp); $confvag = serialize($nsp); conf_update_param('virtual_AutoGrant', $confvag); array_push($infos, l10n('Your configuration is saved.')); } $vag = array_merge($vag, $nsp); } $template->set_filenames( array('VAG_admin' => dirname(__FILE__).'/template/VAG_admin.tpl') ); // foreach ($vag as $k => & $v) { // if (is_string($v)) $vag[$k] = htmlspecialchars($v, ENT_QUOTES, 'utf-8'); // else $vag[$k] = $v; // } // if (count($errors) != 0) $template->assign('errors', $errors); if (count($infos) != 0) $template->assign('infos', $infos); $vag = array_merge( $vag, array( 'Dir' => VAG_DIR, 'Path' => VAG_PATH, 'Ver' => VAG_VER, )); $template->assign( 'VAG', $vag ); $template->assign_var_from_handle('ADMIN_CONTENT', 'VAG_admin'); ?>