public function doConfigPageInit($page) { $request = $_REQUEST; isset($request['action']) ? $action = $request['action'] : ($action = ''); isset($request['view']) ? $view = $request['view'] : ($view = ''); isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = ''); if (isset($request['action'])) { switch ($action) { case "add": pinsets_add($request); needreload(); redirect_standard(); break; case "delete": pinsets_del($itemid); needreload(); redirect_standard(); break; case "edit": pinsets_edit($itemid, $request); needreload(); redirect_standard('itemid', 'view'); break; } } }
public function doConfigPageInit($page) { $request = $_REQUEST; isset($request['extdisplay']) ? $extdisplay = $request['extdisplay'] : ($extdisplay = ''); isset($request['description']) ? $description = $request['description'] : ($description = ''); isset($request['destdial']) ? $destdial = $request['destdial'] : ($destdial = ''); isset($request['view']) ? $view = $request['view'] : ($view = ''); isset($request['action']) ? $action = $request['action'] : ($action = ''); switch ($action) { case "add": $extdisplay = $this->add($request['description'], $request['destdial']); needreload(); redirect_standard(); break; case "delete": $this->del($request['extdisplay']); needreload(); redirect_standard(); break; case "edit": $this->update($request['extdisplay'], $request['description'], $request['destdial']); needreload(); redirect_standard('extdisplay', 'view'); break; } }
public function doConfigPageInit($page) { $request = $_REQUEST; isset($request['action']) ? $action = $request['action'] : ($action = ''); isset($request['view']) ? $view = $request['view'] : ($view = 'form'); isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = ''); if (isset($request['action'])) { switch ($action) { case "add": cidlookup_add($request); needreload(); redirect_standard(); break; case "delete": cidlookup_del($itemid); needreload(); redirect_standard(); break; case "edit": cidlookup_edit($itemid, $request); needreload(); redirect_standard('itemid'); break; case "getJSON": switch ($request['jdata']) { case "cid_modules": header('Content-Type: application/json'); echo json_encode($this->cid_modules); exit; break; default: header('Content-Type: application/json'); echo json_encode(array('status' => 'ERROR', 'message' => 'Invalid Request')); exit; break; } break; } } }
case "edittrunk": if ($tech == 'pjsip') { $channelid = !empty($_REQUEST['trunk_name']) ? $_REQUEST['trunk_name'] : ''; } core_trunks_edit($trunknum, $channelid, $dialoutprefix, $maxchans, $outcid, $peerdetails, $usercontext, $userconfig, $register, $keepcid, trim($failtrunk), $disabletrunk, $trunk_name, $provider, $continue, $dialopts); // this can rewrite too, so edit is the same core_trunks_update_dialrules($trunknum, $dialpattern_insert, true); needreload(); redirect_standard('extdisplay'); break; case "deltrunk": core_trunks_del($trunknum); core_trunks_delete_dialrules($trunknum); core_routing_trunk_delbyid($trunknum); needreload(); redirect_standard(); break; case "populatenpanxx7": case "populatenpanxx10": $dialpattern_array = $dialpattern_insert; if (preg_match("/^([2-9]\\d\\d)-?([2-9]\\d\\d)\$/", $_REQUEST["npanxx"], $matches)) { // first thing we do is grab the exch: $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, "http://www.localcallingguide.com/xmllocalprefix.php?npa=" . $matches[1] . "&nxx=" . $matches[2]); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; FreePBX Local Trunks Configuration)"); $str = curl_exec($ch); curl_close($ch); // quick 'n dirty - nabbed from PEAR require_once $amp_conf['AMPWEBROOT'] . '/admin/modules/core/XML_Parser.php'; require_once $amp_conf['AMPWEBROOT'] . '/admin/modules/core/XML_Unserializer.php';
} elseif (conferences_add($account, $_REQUEST['name'], $_REQUEST['userpin'], $_REQUEST['adminpin'], $_REQUEST['options'], $_REQUEST['joinmsg_id'], $music, $users) !== false) { needreload(); redirect_standard(); } break; case "delete": conferences_del($extdisplay); needreload(); redirect_standard(); break; case "edit": //just delete and re-add conferences_del($account); conferences_add($account, $_REQUEST['name'], $_REQUEST['userpin'], $_REQUEST['adminpin'], $_REQUEST['options'], $_REQUEST['joinmsg_id'], $music, $users); needreload(); redirect_standard('extdisplay'); break; } } //get meetme rooms //this function needs to be available to other modules (those that use goto destinations) //therefore we put it in globalfunctions.php $meetmes = conferences_list(); ?> </div> <!-- right side menu --> <div class="rnav"><ul> <li><a id="<?php echo $extdisplay == '' ? 'current' : '';
?> > <input type='hidden' name='action' value=<?php echo $form_action; ?> > <?php if ($action == 'edit') { echo "<input type='hidden' name='id' value={$id}>"; } ?> <input type='hidden' name='cat' value=<?php echo $cat; ?> > <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit"); ?> " tabindex="<?php echo ++$tabindex; ?> "></h6></td> </form> <?php } // end edit cause if ($action == 'conf_edit') { $fields = "recording_id = {$recording_id}"; fbilling_edit('causes', $fields, $id); redirect_standard('cat'); }
if (isset($_POST['action'])) { switch ($action) { case "add": cidlookup_add($_POST); needreload(); redirect_standard(); break; case "delete": cidlookup_del($itemid); needreload(); redirect_standard(); break; case "edit": cidlookup_edit($itemid, $_POST); needreload(); redirect_standard('itemid'); break; } } //get list of callerid lookup sources $cidsources = cidlookup_list(); ?> </div> <!-- end content div so we can display rnav properly--> <!-- right side menu --> <div class="rnav"><ul> <li><a id="<?php echo $itemid == '' ? 'current' : ''; ?> " href="config.php?display=<?php
//if submitting form, update database if(isset($_REQUEST['action'])) { switch ($action) { case "add": sak_blacklist_add($_POST); redirect_standard(); break; case "delete": sak_blacklist_del($number); redirect_standard(); break; case "edit": sak_blacklist_del($editnumber); sak_blacklist_add($_POST); redirect_standard('editnumber'); break; } } $numbers = sak_blacklist_list(); ?> </div> <!-- NO rnav in this module --> <div class="content"> <?php if ($action == 'delete') echo '<h3>'._("Blacklist entry").' '.$itemid.' '._("deleted").'!</h3>';
switch ($action) { case "add": miscdests_add($_REQUEST['description'], $_REQUEST['destdial']); needreload(); redirect_standard(); break; case "delete": miscdests_del($extdisplay); needreload(); redirect_standard(); break; case "edit": //just delete and re-add miscdests_update($extdisplay, $_REQUEST['description'], $_REQUEST['destdial']); needreload(); redirect_standard('id'); break; } $miscdests = miscdests_list(); // Make array of feature code for <SELECT> list $featurecodes = featurecodes_getAllFeaturesDetailed(); if (isset($featurecodes)) { foreach ($featurecodes as $item) { $moduledesc = isset($item['moduledescription']) ? _($item['moduledescription']) : null; $moduleena = $item['moduleenabled'] == 1 ? true : false; if ($moduleena) { $featureena = $item['featureenabled'] == 1 ? true : false; if ($featureena) { $featureid = $item['modulename'] . ':' . $item['featurename']; $featuredesc = _($item['featuredescription']); $featurecodedefault = isset($item['defaultcode']) ? $item['defaultcode'] : '';
if (core_did_add($_REQUEST)) { needreload(); redirect_standard('extdisplay', 'extension', 'cidnum', 'didfilter', 'rnavsort'); } break; case 'delIncoming': $extarray = explode('/', $extdisplay, 2); core_did_del($extarray[0], $extarray[1]); needreload(); redirect_standard('didfilter', 'rnavsort'); break; case 'edtIncoming': $extarray = explode('/', $old_extdisplay, 2); if (core_did_edit($extarray[0], $extarray[1], $_REQUEST)) { needreload(); redirect_standard('extdisplay', 'extension', 'cidnum', 'didfilter', 'rnavsort'); } break; } ?> <?php $display_link = "config.php?display={$dispnum}"; $display_add = $display_link; $display_link .= isset($extdisplay) && $extdisplay != '' ? "&extdisplay=" . $extdisplay : ''; $display_link_current = $display_link . ($rnavsort == "description" ? "&rnavsort=extension" : "&rnavsort=description"); $rnav_add = $rnavsort == "extension" ? "&rnavsort=extension" : "&rnavsort=description"; $display_link .= $rnav_add; $display_add .= $rnav_add . "&didfilter={$didfilter}"; $toggle_sort = _(" (toggle sort)"); ?>
isset($_POST['action']) ? $postaction = $_POST['action'] : ($postaction = ''); switch ($postaction) { case "add": gabcast_add($_POST['ext'], $_POST['channbr'], $_POST['pin']); needreload(); redirect_standard(); break; case "delete": gabcast_del($_POST['ext']); needreload(); redirect_standard(); break; case "edit": gabcast_edit($_POST['ext'], $_POST['channbr'], $_POST['pin']); needreload(); redirect_standard('ext'); break; } // look for get isset($_GET['action']) ? $action = $_GET['action'] : ($action = ''); isset($_GET['ext']) ? $ext = $_GET['ext'] : ($ext = ''); switch ($action) { case "add": gabcast_sidebar($ext, $type, $iam); gabcast_show(null, $type, $iam); break; case "edit": gabcast_sidebar($ext, $type, $iam); gabcast_show($ext, $type, $iam); break; default:
public function doConfigPageInit($page) { $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; $miscapp_id = isset($_REQUEST['miscapp_id']) ? $_REQUEST['miscapp_id'] : false; $description = isset($_REQUEST['description']) ? $_REQUEST['description'] : ''; $ext = isset($_REQUEST['ext']) ? $_REQUEST['ext'] : ''; $dest = isset($_REQUEST['dest']) ? $_REQUEST['dest'] : ''; $enabled = isset($_REQUEST['enabled']) ? !empty($_REQUEST['enabled']) : true; if (isset($_REQUEST['goto0']) && $_REQUEST['goto0']) { $dest = $_REQUEST[$_REQUEST['goto0'] . '0']; } switch ($action) { case 'add': $conflict_url = array(); $usage_arr = framework_check_extension_usage($ext); if (!empty($usage_arr)) { $conflict_url = framework_display_extension_usage_alert($usage_arr); } else { $id = $this->add($description, $ext, $dest); needreload(); redirect('config.php?display=miscapps&type=setup&extdisplay=' . $id); } break; // TODO: need to lookup the current extension based on the id and if it is changing // do a check to make sure it doesn't conflict. If not changing, np. // // TODO: need to lookup the current extension based on the id and if it is changing // do a check to make sure it doesn't conflict. If not changing, np. // case 'edit': $fc = new \featurecode('miscapps', 'miscapp_' . $miscapp_id); $conflict_url = array(); if ($fc->getDefault() != $ext) { $usage_arr = framework_check_extension_usage($ext); if (!empty($usage_arr)) { $conflict_url = framework_display_extension_usage_alert($usage_arr); } } if (empty($conflict_url)) { $this->edit($miscapp_id, $description, $ext, $dest, $enabled); needreload(); redirect_standard('extdisplay'); } break; case 'delete': $this->delete($_REQUEST['id']); needreload(); redirect_standard(); break; } }
} if ($settings['dir_corp_password'] == '******') { unset($settings['dir_corp_password']); } polycomphones_save_general_edit($settings); redirect_standard('polycomphones_form'); } $general = polycomphones_get_general_edit(); if (!empty($general['dir_corp_password'])) { $general['dir_corp_password'] = '******'; } require 'modules/polycomphones/views/polycomphones_corporate.php'; break; case 'general_edit': if (isset($_POST['action']) && $_POST['action'] == 'edit') { $fields = array('digits', 'httpd_cfg_enabled', 'mb_main_home', 'lineKeys', 'ringType', 'missedCallTracking', 'callBackMode', 'serverFeatureControl_dnd', 'serverFeatureControl_cf', 'softkey_feature_basicCallManagement_redundant', 'call_transfer_blindPreferred', 'call_callWaiting_ring', 'call_hold_localReminder_enabled', 'call_rejectBusyOnDnd', 'up_useDirectoryNames', 'dir_local_readonly', 'se_pat_misc_messageWaiting_inst', 'apps_ucdesktop_adminEnabled', 'up_headsetMode', 'up_analogHeadsetOption', 'attendant_ringType', 'feature_directedCallPickup_enabled', 'attendant_spontaneousCallAppearances_normal', 'attendant_spontaneousCallAppearances_automata', 'powerSaving_enable', 'up_backlight_idleIntensity', 'up_backlight_onIntensity', 'powerSaving_idleTimeout_officeHours', 'powerSaving_idleTimeout_offHours', 'powerSaving_officeHours_startHour_monday', 'powerSaving_officeHours_startHour_tuesday', 'powerSaving_officeHours_startHour_wednesday', 'powerSaving_officeHours_startHour_thursday', 'powerSaving_officeHours_startHour_friday', 'powerSaving_officeHours_startHour_saturday', 'powerSaving_officeHours_startHour_sunday', 'powerSaving_officeHours_duration_monday', 'powerSaving_officeHours_duration_tuesday', 'powerSaving_officeHours_duration_wednesday', 'powerSaving_officeHours_duration_thursday', 'powerSaving_officeHours_duration_friday', 'powerSaving_officeHours_duration_saturday', 'powerSaving_officeHours_duration_sunday'); foreach ($fields as $field) { $settings[$field] = $_POST[$field]; } polycomphones_save_general_edit($settings); redirect_standard('polycomphones_form'); } $features_module = polycomphones_check_module('phonefeatures'); $general = polycomphones_get_general_edit(); require 'modules/polycomphones/views/polycomphones_general.php'; break; default: require 'modules/polycomphones/views/polycomphones.php'; break; } echo '</div>';
public function doConfigPageInit($page) { global $amp_conf; $dispnum = 'findmefollow'; //used for switch on config.php $request = $_REQUEST; isset($request['action']) ? $action = $request['action'] : ($action = ''); //the extension we are currently displaying isset($request['extdisplay']) ? $extdisplay = $request['extdisplay'] : ($extdisplay = ''); isset($request['account']) ? $account = $request['account'] : ($account = ''); isset($request['grptime']) ? $grptime = $request['grptime'] : ($grptime = $amp_conf['FOLLOWME_TIME']); isset($request['grppre']) ? $grppre = $request['grppre'] : ($grppre = ''); isset($request['strategy']) ? $strategy = $request['strategy'] : ($strategy = $amp_conf['FOLLOWME_RG_STRATEGY']); isset($request['annmsg_id']) ? $annmsg_id = $request['annmsg_id'] : ($annmsg_id = ''); isset($request['dring']) ? $dring = $request['dring'] : ($dring = ''); isset($request['needsconf']) ? $needsconf = $request['needsconf'] : ($needsconf = ''); isset($request['remotealert_id']) ? $remotealert_id = $request['remotealert_id'] : ($remotealert_id = ''); isset($request['toolate_id']) ? $toolate_id = $request['toolate_id'] : ($toolate_id = ''); isset($request['ringing']) ? $ringing = $request['ringing'] : ($ringing = ''); isset($request['pre_ring']) ? $pre_ring = $request['pre_ring'] : ($pre_ring = $amp_conf['FOLLOWME_PRERING']); isset($request['changecid']) ? $changecid = $request['changecid'] : ($changecid = 'default'); isset($request['fixedcid']) ? $fixedcid = $request['fixedcid'] : ($fixedcid = ''); if (isset($request['ddial'])) { $ddial = $request['ddial']; } else { $ddial = isset($request['ddial_value']) ? $request['ddial_value'] : ($amp_conf['FOLLOWME_DISABLED'] ? 'CHECKED' : ''); } if (isset($request['goto0']) && isset($request[$request['goto0'] . "0"])) { $goto = $request[$request['goto0'] . "0"]; } else { $goto = "ext-local,{$extdisplay},dest"; } if (isset($request["grplist"])) { $grplist = explode("\n", $request["grplist"]); if (!$grplist) { $grplist = null; } foreach (array_keys($grplist) as $key) { //trim it $grplist[$key] = trim($grplist[$key]); // remove invalid chars $grplist[$key] = preg_replace("/[^0-9#*+]/", "", $grplist[$key]); if ($grplist[$key] == ltrim($extdisplay, 'GRP-') . '#') { $grplist[$key] = rtrim($grplist[$key], '#'); } // remove blanks if ($grplist[$key] == "") { unset($grplist[$key]); } } // check for duplicates, and re-sequence $grplist = array_values(array_unique($grplist)); } // 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') { findmefollow_add($account, $strategy, $grptime, implode("-", $grplist), $goto, $grppre, $annmsg_id, $dring, $needsconf, $remotealert_id, $toolate_id, $ringing, $pre_ring, $ddial, $changecid, $fixedcid); needreload(); redirect_standard(); } //del group if ($action == 'delGRP') { findmefollow_del($account); needreload(); redirect_standard(); } //edit group - just delete and then re-add the extension if ($action == 'edtGRP') { findmefollow_del($account); findmefollow_add($account, $strategy, $grptime, implode("-", $grplist), $goto, $grppre, $annmsg_id, $dring, $needsconf, $remotealert_id, $toolate_id, $ringing, $pre_ring, $ddial, $changecid, $fixedcid); needreload(); redirect_standard('extdisplay', 'view'); } } } }