//echo '<input type="hidden" name="nr" value="'.$i.'">'; echo '<input type="hidden" name="submitted" value="1" >'; echo '<input type="hidden" name="sub_cat' . $i . '" value="' . $rek['id_c'] . '">'; //echo "<td><input type='Submit' name='revise".$i."' value='revision'></td>"; //header("Location: sub_cat_revise.php"); echo $att = manifest_dbi_get_att_sub_cat($rek['id_c']); // echo '<td>'; echo '<td>'; //each time take one selected echo "</form>"; echo '<form action="extension_add.php" method="POST">'; echo '<td>'; $selected = manifest_dbi_get_att_name(manifest_dbi_get_att_sub_cat($id_c)); //selected one $id_c = $rek['id_c']; $ext_list = extension_list(); echo '<select name="atts">'; for ($z = 0; $z <= 53; $z++) { $rek_list = mysql_fetch_array($ext_list); if ($rek_list[0] == $rek[2]) { echo '<option value="' . $z . '" selected >' . $rek_list[4] . '</option>'; } else { echo '<option value="' . $z . '" >' . $rek_list[4] . '</option>'; } } echo '</select>'; echo '</td>'; echo '<input type="hidden" name="sub_cat" value="' . $id_c . '">'; // echo '<td>'; //item types /*
function cf_submenu_dashboard() { echo "<h2 class='heading'>FormGet Powerful Extension</h2><h4 class='heading'>Extensions that simplify your work.</h4><hr/>"; echo extension_list(); }
function addsip($account, $callerid, $action) { sipexists(); global $db; if ($action == "add") { $devices = extension_list(); if (is_array($devices)) { foreach ($devices as $device) { if ($device[0] === $account) { echo "<script>javascript:alert('" . _("This SIP Extension [") . $device[0] . "] is already in use" . "');</script>"; return false; } } } } $sipfields = array(array($account, 'account', $account), array($account, 'accountcode', isset($_REQUEST['accountcode']) ? $_REQUEST['accountcode'] : ''), array($account, 'secret', isset($_REQUEST['secret']) ? $_REQUEST['secret'] : ''), array($account, 'canreinvite', isset($_REQUEST['canreinvite']) ? $_REQUEST['canreinvite'] : 'no'), array($account, 'context', isset($_REQUEST['context']) ? $_REQUEST['context'] : 'from-internal'), array($account, 'dtmfmode', isset($_REQUEST['dtmfmode']) ? $_REQUEST['dtmfmode'] : 'rfc2833'), array($account, 'host', isset($_REQUEST['host']) ? $_REQUEST['host'] : 'dynamic'), array($account, 'type', isset($_REQUEST['type']) ? $_REQUEST['type'] : 'friend'), array($account, 'mailbox', isset($_REQUEST['mailbox']) ? $_REQUEST['mailbox'] : ''), array($account, 'username', isset($_REQUEST['username']) ? $_REQUEST['username'] : ''), array($account, 'nat', isset($_REQUEST['nat']) ? $_REQUEST['nat'] : 'no'), array($account, 'port', isset($_REQUEST['port']) ? $_REQUEST['port'] : '5060'), array($account, 'qualify', !empty($_REQUEST['qualify']) ? $_REQUEST['qualify'] : 'no'), array($account, 'callgroup', isset($_REQUEST['callgroup']) ? $_REQUEST['callgroup'] : ''), array($account, 'pickupgroup', isset($_REQUEST['pickupgroup']) ? $_REQUEST['pickupgroup'] : ''), array($account, 'disallow', isset($_REQUEST['disallow']) ? $_REQUEST['disallow'] : ''), array($account, 'allow', isset($_REQUEST['allow']) ? $_REQUEST['allow'] : ''), array($account, 'record_in', isset($_REQUEST['record_in']) ? $_REQUEST['record_in'] : 'Never'), array($account, 'record_out', isset($_REQUEST['record_out']) ? $_REQUEST['record_out'] : 'Never'), array($account, 'nocall', isset($_REQUEST['nocall']) ? $_REQUEST['nocall'] : ''), array($account, 'allowcall', isset($_REQUEST['allowcall']) ? $_REQUEST['allowcall'] : ''), array($account, 'subscribecontext', isset($_REQUEST['subscribecontext']) ? $_REQUEST['subscribecontext'] : 'ext-local'), array($account, 'rob', isset($_REQUEST['rob']) ? $_REQUEST['rob'] : 'Never'), array($account, 'cw', isset($_REQUEST['cw']) ? $_REQUEST['cw'] : 'Never'), array($account, 'allowsubscribe', isset($_REQUEST['allowsubscribe']) ? $_REQUEST['allowsubscribe'] : ''), array($account, 'call-limit', !empty($_REQUEST['calllimit']) ? $_REQUEST['calllimit'] : '99'), array($account, 'videosupport', isset($_REQUEST['videosupport']) ? $_REQUEST['videosupport'] : ''), array($account, 't38pt_udptl', isset($_REQUEST['t38pt_udptl']) ? $_REQUEST['t38pt_udptl'] : ''), array($account, 'language', isset($_REQUEST['language']) ? $_REQUEST['language'] : ''), array($account, 'callerid', $callerid)); $compiled = $db->prepare('INSERT INTO sip (id, keyword, data) values (?,?,?)'); $result = $db->executeMultiple($compiled, $sipfields); if (DB::IsError($result)) { die($result->getMessage() . "<br><br>" . 'error adding to SIP table'); } $sql = "INSERT INTO globals VALUES ('E{$account}', 'SIP')"; $result = $db->query($sql); if (DB::IsError($result)) { die($result->getMessage() . "<br><br>" . 'error adding to Globals table'); } if ($_REQUEST['outcid'] != '') { $outcid = $_REQUEST['outcid']; $sql = "INSERT INTO globals VALUES ('ECID{$account}', '{$outcid}')"; $result = $db->query($sql); if (DB::IsError($result)) { die($result->getMessage() . "<br><br>" . 'error adding to Globals table'); } } if ($_REQUEST['ringtime'] != '') { $ringtime = $_REQUEST['ringtime']; $sql = "INSERT INTO globals VALUES ('RINGTIME{$account}', '{$ringtime}')"; $result = $db->query($sql); if (DB::IsError($result)) { die($result->getMessage() . "<br><br>" . 'error adding to Globals table'); } } return true; }