public function doConfigPageInit($page) { $request = $_REQUEST; $dispnum = 'vmblast'; //used for switch on config.php $action = isset($request['action']) ? $request['action'] : ''; //the extension we are currently displaying $account = isset($request['account']) ? $request['account'] : ''; $extdisplay = isset($request['extdisplay']) ? ltrim($request['extdisplay'], 'GRP-') : ($account != '' ? $account : ''); $description = isset($request['description']) ? $request['description'] : ''; $audio_label = isset($request['audio_label']) ? $request['audio_label'] : -1; $password = isset($request['password']) ? $request['password'] : ''; $default_group = isset($request['default_group']) ? $request['default_group'] : '0'; $vmblast_list = isset($request['vmblast_list']) ? $request['vmblast_list'] : ''; $view = isset($request['view']) ? $request['view'] : 'form'; // do if we are submitting a form if (isset($request['action'])) { //check if the extension is within range for this user if (isset($account) && !checkRange($account)) { echo "<script>javascript:alert('" . _("Warning! Extension") . " " . $account . " " . _("is not allowed for your account") . ".');</script>"; } else { //add group if ($action == 'addGRP') { $conflict_url = array(); $usage_arr = framework_check_extension_usage($account); if (!empty($usage_arr)) { $conflict_url = framework_display_extension_usage_alert($usage_arr); } else { if (vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group)) { //$request['action'] = 'delGRP'; $_REQUEST['view'] = 'form'; $_REQUEST['extdisplay'] = $account; needreload(); //redirect_standard('extdisplay', 'view'); } } } //del group if ($action == 'delGRP') { vmblast_del($account); needreload(); } //edit group - just delete and then re-add the extension if ($action == 'editGRP') { vmblast_del($account); vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group); needreload(); } } } }
if (vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group)) { $_REQUEST['action'] = 'delGRP'; needreload(); redirect_standard('extdisplay'); } } } //del group if ($action == 'delGRP') { vmblast_del($account); needreload(); redirect_standard(); } //edit group - just delete and then re-add the extension if ($action == 'editGRP') { vmblast_del($account); vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group); needreload(); redirect_standard('extdisplay'); } } } ?> </div> <div class="rnav"><ul> <li><a id="<?php echo $extdisplay == '' ? 'current' : ''; ?> " href="config.php?display=<?php echo urlencode($dispnum);