setcwstatus($account, $_REQUEST['cw'], 'write'); $account = ''; $email = ''; $pager = ''; $name = ''; } } if ($action == 'delete') { delExten($extdisplay, "deletefromextension"); exec($wScript); exec($wIaxScript); exec($wZapScript); exec($wOpScript); unset($uservm[$incontext][$extdisplay]); saveVoicemail($uservm); $result = delextensions('ext-local', $extdisplay); exec($wScript1); needreload(); deleteastdb($extdisplay); rmdirr("/var/spool/asterisk/vm/{$extdisplay}"); } if ($action == 'advEdit') { $callerid = '"' . $_REQUEST['cidname'] . '" ' . '<' . $account . '>'; delExten($account); if ($_REQUEST['tech'] == 'iax2') { addiax($account, $callerid); } else { if ($_REQUEST['tech'] == 'sip') { addsip($account, $callerid); } else { addzap($account, $callerid);
$grplist = array_values(array_unique($grplist)); } if ($action == 'addGRP') { $errgroup = addgroup($account, implode("-", $grplist), $strategy, $grptime, $grppre, $goto, $callerannounce, $alertinfo, $ringing, $description); if ($errgroup != false) { exec($wScript1); needreload(); } } if ($action == 'delGRP') { delextensions('ext-group', ltrim($extdisplay, 'GRP-')); exec($wScript1); needreload(); } if ($action == 'edtGRP') { delextensions('ext-group', $account); addgroup($account, implode("-", $grplist), $strategy, $grptime, $grppre, $goto, $callerannounce, $alertinfo, $ringing, $description); exec($wScript1); needreload(); } ?> </div> <div class="rnav" style="width:190px;"> <li><a id="<?php echo $extdisplay == '' ? 'current' : ''; ?> " href="config.php?mode=pbx&display=<?php echo urlencode($dispnum); ?> " onFocus="this.blur()"><?php
function delqueue($account) { global $db; //delete from extensions table delextensions('ext-queues', $account); delextensions('ext-queues', $account . '*'); delextensions('ext-queues', $account . '**'); $sql = "DELETE FROM queues WHERE id = '{$account}'"; $result = $db->query($sql); if (DB::IsError($result)) { die($result->getMessage() . $sql); } }