Exemplo n.º 1
0
/**
 * Destination drawselects.
 *
 * This is where the magic happens. Query all modules for valid destinations
 * Then build a javascript based multi-select box.
 * Hide the second select box until the first is selected.
 * Auto-populate the second based on the first.
 *
 * The first is almost always a module name, though it can be custom as well.
 * The second is the actually destination
 *
 * @param  string $goto             The current goto destination setting. EG: ext-local,2000,1
 * @param  int $i                   the destination set number (used when drawing multiple destination sets in a single form ie: digital receptionist)
 * @param  array $restrict_modules  Array of modules or array of modules with ids to restrict getting destinations from
 * @param  bool $table              Wrap this in a table row using <tr> and <td> (deprecated should not be used in 13+)
 * @param  string $nodest_msg       No Destination selected message
 * @param  bool $required           Whether the destination is required to be set
 * @param  bool $output_array       Output an array instead of html (you will need to make sure the html is correct later on for the functionality of this to work correctly)
 * @param  bool $reset              Reset the drawselect_* globals (useful when using multiple destination dropdowns on a page, each with their own restricted modules)
 * @param  bool $disable            Set html element to disabled on creation
 * @param  string $class            String of classes to add to to the html element (class="<string>")
 * @return mixed                    Array if $output_array is true otherwise a string of html
 */
function drawselects($goto, $i, $restrict_modules = false, $table = true, $nodest_msg = '', $required = false, $output_array = false, $reset = false, $disable = false, $class = '')
{
    global $tabindex, $active_modules, $drawselect_destinations, $drawselects_module_hash, $fw_popover;
    static $drawselects_id_hash;
    if ($reset) {
        unset($drawselect_destinations);
        unset($drawselects_module_hash);
        unset($drawselects_id_hash);
    }
    //php session last_dest
    $fw_popover = isset($fw_popover) ? $fw_popover : FALSE;
    $disabled = $disable ? "disabled" : "";
    $html = $destmod = $errorclass = $errorstyle = '';
    if ($nodest_msg == '') {
        $nodest_msg = '== ' . modgettext::_('choose one', 'amp') . ' ==';
    }
    if ($table) {
        $html .= '<tr><td colspan=2>';
    }
    //wrap in table tags if requested
    if (!isset($drawselect_destinations)) {
        $popover_hash = array();
        $add_a_new = _('Add new %s &#133');
        //check for module-specific destination functions
        foreach ($active_modules as $rawmod => $module) {
            $restricted = false;
            if (is_array($restrict_modules) && !in_array($rawmod, $restrict_modules) && !isset($restrict_modules[$rawmod])) {
                $restricted = true;
            }
            $funct = strtolower($rawmod . '_destinations');
            $popover_hash = array();
            //if the modulename_destinations() function exits, run it and display selections for it
            if (function_exists($funct)) {
                modgettext::push_textdomain($rawmod);
                $destArray = $funct($i);
                //returns an array with 'destination' and 'description', and optionally 'category'
                modgettext::pop_textdomain();
                if (is_Array($destArray)) {
                    foreach ($destArray as $dest) {
                        $cat = isset($dest['category']) ? $dest['category'] : $module['displayname'];
                        $cat = str_replace(array("|"), "", $cat);
                        $cat = str_replace("&", _("and"), $cat);
                        $ds_id = isset($dest['id']) ? $dest['id'] : $rawmod;
                        // don't restrict the currently selected destination
                        if ($restricted && $dest['destination'] != $goto) {
                            continue;
                        }
                        if (empty($restrict_modules[$rawmod]) || is_array($restrict_modules[$rawmod]) && in_array($ds_id, $restrict_modules[$rawmod])) {
                            $popover_hash[$ds_id] = $cat;
                            $drawselect_destinations[$cat][] = $dest;
                            $drawselects_module_hash[$cat] = $rawmod;
                            $drawselects_id_hash[$cat] = $ds_id;
                        }
                    }
                }
                if ($restricted) {
                    continue;
                }
                if (isset($module['popovers']) && !$fw_popover) {
                    modgettext::push_textdomain($rawmod);
                    $funct = strtolower($rawmod . '_destination_popovers');
                    modgettext::pop_textdomain();
                    if (function_exists($funct)) {
                        $protos = $funct();
                        foreach ($protos as $ds_id => $cat) {
                            if (empty($restrict_modules[$rawmod]) || is_array($restrict_modules[$rawmod]) && in_array($ds_id, $restrict_modules[$rawmod])) {
                                $popover_hash[$ds_id] = $cat;
                                $drawselects_module_hash[$cat] = $rawmod;
                                $drawselects_id_hash[$cat] = $ds_id;
                            }
                        }
                    } else {
                        if (empty($destArray)) {
                            // We have popovers in XML, there were no destinations, and no mod_destination_popovers()
                            // funciton so generate the Add a new selection.
                            //
                            $drawselects_module_hash[$module['displayname']] = $rawmod;
                            $drawselects_id_hash[$module['displayname']] = $rawmod;
                            $drawselect_destinations[$module['displayname']][99999] = array("destination" => "popover", "description" => sprintf($add_a_new, $module['displayname']));
                        }
                    }
                }
                // if we have a popver_hash either from real values or mod_destination_popovers()
                // then we create the 'Add a new option
                foreach ($popover_hash as $ds_id => $cat) {
                    if (isset($module['popovers'][$ds_id]) && !$fw_popover) {
                        $drawselect_destinations[$cat][99999] = array("destination" => "popover", "description" => sprintf($add_a_new, $cat), "category" => $cat);
                    }
                }
            }
        }
        //sort destination alphabetically
        if (is_array($drawselect_destinations)) {
            ksort($drawselect_destinations);
        }
        if (is_array($drawselects_module_hash)) {
            ksort($drawselects_module_hash);
        }
    }
    $ds_array = $drawselect_destinations;
    //set variables as arrays for the rare (impossible?) case where there are none
    if (!isset($drawselect_destinations)) {
        $drawselect_destinations = array();
    }
    if (!isset($drawselects_module_hash)) {
        $drawselects_module_hash = array();
    }
    $foundone = false;
    $tabindex_needed = true;
    //get the destination module name if we have a $goto, add custom if there is an issue
    if ($goto) {
        foreach ($drawselects_module_hash as $mod => $description) {
            foreach ($drawselect_destinations[$mod] as $destination) {
                if ($goto == $destination['destination']) {
                    $destmod = $mod;
                }
            }
        }
        if ($destmod == '') {
            //if we haven't found a match, display error dest
            $destmod = 'Error';
            $drawselect_destinations['Error'][] = array('destination' => $goto, 'description' => 'Bad Dest: ' . $goto, 'class' => 'drawselect_error');
            $drawselects_module_hash['Error'] = 'error';
            $drawselects_id_hash['Error'] = 'error';
        }
        //Set 'data-last' values for popover return to last saved values
        $data_last_cat = str_replace(' ', '_', $destmod);
        $data_last_dest = $goto;
    } else {
        //Set 'data-last' values for popover return to nothing because this is a new 'route'
        $data_last_cat = '';
        $data_last_dest = '';
    }
    //draw "parent" select box
    $style = ' style="' . ($destmod == 'Error' ? 'background-color:red;' : '') . '"';
    $html .= '<select data-last="' . $data_last_cat . '" name="goto' . $i . '" id="goto' . $i . '" class="form-control destdropdown ' . $class . '" ' . $style . ' tabindex="' . ++$tabindex . '"' . ($required ? ' required ' : '') . ' data-id="' . $i . '" ' . $disabled . '>';
    $html .= '<option value="" style="">' . $nodest_msg . '</option>';
    foreach ($drawselects_module_hash as $mod => $disc) {
        $label_text = modgettext::_($mod, $drawselects_module_hash[$mod]);
        /* end i18n */
        $selected = $mod == $destmod ? ' SELECTED ' : ' ';
        $style = ' style="' . ($mod == 'Error' ? 'background-color:red;' : '') . '"';
        $html .= '<option value="' . str_replace(' ', '_', $mod) . '"' . $selected . $style . '>' . $label_text . '</option>';
    }
    $html .= '</select> ';
    //draw "children" select boxes
    $tabindexhtml = ' tabindex="' . ++$tabindex . '"';
    //keep out of the foreach so that we don't increment it
    foreach ($drawselect_destinations as $cat => $destination) {
        $style = '';
        if ($cat == 'Error') {
            $style .= ' ' . $errorstyle;
        }
        //add error style
        $style = ' style="' . ($cat == 'Error' ? 'background-color:red;' : $style) . '"';
        // if $fw_popover is set, then we are in a popover so we don't allow another level
        //
        $rawmod = $drawselects_module_hash[$cat];
        $ds_id = $drawselects_id_hash[$cat];
        if (isset($active_modules[$rawmod]['popovers'][$ds_id]) && !$fw_popover) {
            $args = array();
            foreach ($active_modules[$rawmod]['popovers'][$ds_id] as $k => $v) {
                $args[] = $k . '=' . $v;
            }
            $data_url = 'data-url="config.php?' . implode('&', $args) . '" ';
            $data_class = 'data-class="' . $ds_id . '" ';
            $data_mod = 'data-mod="' . $rawmod . '" ';
        } else {
            $data_url = '';
            $data_mod = '';
            if (isset($active_modules[$rawmod]['popovers']) && !$fw_popover) {
                $data_class = 'data-class="' . $ds_id . '" ';
            } else {
                $data_class = '';
            }
        }
        $hidden = $cat == $destmod ? '' : 'hidden';
        $class_tag = ' class="form-control destdropdown2 ' . $rawmod . " " . $hidden . " " . $class;
        $class_tag .= $rawmod == $ds_id ? '"' : ' ' . $ds_id . '"';
        $name_tag = str_replace(' ', '_', $cat) . $i;
        $html .= '<select ' . $data_url . $data_class . $data_mod . 'data-last="' . $data_last_dest . '" name="' . $name_tag . '" id="' . $name_tag . '" ' . $tabindexhtml . $style . $class_tag . ' data-id="' . $i . '" ' . $disabled . '>';
        foreach ($destination as $key => $dest) {
            $selected = $goto == $dest['destination'] ? 'SELECTED ' : ' ';
            $ds_array[$cat][$key]['selected'] = $goto == $dest['destination'] ? true : false;
            $child_label_text = $dest['description'];
            $style = ' style="' . ($cat == 'Error' ? 'background-color:red;' : '') . '"';
            $html .= '<option value="' . $dest['destination'] . '" ' . $selected . $style . '>' . $child_label_text . '</option>';
        }
        $html .= '</select>';
    }
    if (isset($drawselect_destinations['Error'])) {
        unset($drawselect_destinations['Error']);
    }
    if (isset($drawselects_module_hash['Error'])) {
        unset($drawselects_module_hash['Error']);
    }
    if ($table) {
        $html .= '</td></tr>';
    }
    //wrap in table tags if requested
    return $output_array ? $ds_array : $html;
}
}
$currentmodule = "(none)";
$modlines = '';
$modules = array();
foreach ($featurecodes as $item) {
    $moduledesc = isset($item['moduledescription']) ? modgettext::_($item['moduledescription'], $item['modulename']) : null;
    // just in case the translator put the translation in featurcodes module:
    if ($moduledesc !== null && !empty($moduledesc) && $moduledesc == $item['moduledescription']) {
        $moduledesc = _($moduledesc);
    }
    $featuredesc = !empty($item['featuredescription']) ? modgettext::_($item['featuredescription'], $item['modulename']) : "";
    // just in case the translator put the translation in featurcodes module:
    if (!empty($item['featuredescription']) && $featuredesc == $item['featuredescription']) {
        $featuredesc = _($featuredesc);
    }
    $help = !empty($item['featurehelptext']) ? modgettext::_($item['featurehelptext'], $item['modulename']) : "";
    if (!empty($item['featurehelptext']) && $help == $item['featurehelptext']) {
        $help = _($help);
    }
    //TODO: What did we do here before when the module was disabled?
    //bueller, bueller, bueller
    $moduleena = $item['moduleenabled'] == 1 ? true : false;
    $default = isset($item['defaultcode']) ? $item['defaultcode'] : '';
    $custom = isset($item['customcode']) ? $item['customcode'] : '';
    $code = $custom != '' ? $custom : $default;
    $thismodule = $item['modulename'];
    if ($thismodule != $currentmodule) {
        $lastmodule = $currentmodule;
        $currentmodule = $thismodule;
        $title = ucfirst($thismodule);
        $modules[$thismodule]['title'] = $title;
Exemplo n.º 3
0
     foreach ($modules[$name]['vulnerabilities']['vul'] as $vul) {
         $security_issues_to_report[$vul] = true;
     }
 } else {
     $module_display[$category]['data'][$name]['vulnerabilities'] = array();
 }
 $module_display[$category]['data'][$name]['raw']['online'] = !empty($modules_online[$name]) ? $modules_online[$name] : array();
 $module_display[$category]['data'][$name]['raw']['local'] = !empty($modules_local[$name]) ? $modules_local[$name] : array();
 $module_display[$category]['data'][$name]['name'] = $name;
 $module_display[$category]['data'][$name]['pretty_name'] = !empty($name_text) ? $name_text : $name;
 $module_display[$category]['data'][$name]['repo'] = $modules[$name]['repo'];
 $module_display[$category]['data'][$name]['dbversion'] = !empty($modules[$name]['dbversion']) ? $modules[$name]['dbversion'] : '';
 $module_display[$category]['data'][$name]['publisher'] = !empty($modules[$name]['publisher']) ? $modules[$name]['publisher'] : '';
 $module_display[$category]['data'][$name]['salert'] = $salert;
 if (!empty($modules_online[$name]['attention'])) {
     $module_display[$category]['data'][$name]['attention'] = nl2br(modgettext::_($modules[$name]['attention'], $loc_domain));
 }
 if (!empty($modules_online[$name]['changelog'])) {
     $module_display[$category]['data'][$name]['changelog'] = format_changelog($modules_online[$name]['changelog']);
 } elseif (!empty($modules_local[$name]['changelog'])) {
     $module_display[$category]['data'][$name]['changelog'] = format_changelog($modules_local[$name]['changelog']);
 }
 $module_display[$category]['data'][$name]['description'] = isset($module_display[$category]['data'][$name]['description']) ? trim(preg_replace('/\\s+/', ' ', $module_display[$category]['data'][$name]['description'])) : '';
 if (!empty($module_display[$category]['data'][$name]['previous'])) {
     foreach ($module_display[$category]['data'][$name]['previous'] as &$release) {
         if (preg_match("/" . $release['version'] . "[\\s|:|\\*](.*)/m", $release['changelog'], $matches)) {
             $release['pretty_change'] = !empty($matches[1]) ? format_changelog($matches[1]) : _('No Change Log');
         }
     }
 }
 $track = !empty($modules_local[$name]['track']) ? $modules_local[$name]['track'] : 'stable';
Exemplo n.º 4
0
            $classes = array();
            //build defualt module url
            $href = isset($mod['href']) ? $mod['href'] : "config.php?display=" . $mod['display'];
            $target = isset($mod['target']) ? ' target="' . $mod['target'] . '" ' : '';
            //highlight currently in-use module
            if ($display == $mod['display']) {
                $classes[] = 'ui-state-highlight';
                $classes[] = 'ui-corner-all';
            }
            //highlight disabled modules
            if (isset($mod['disabled']) && $mod['disabled']) {
                $classes[] = 'ui-state-disabled';
                $classes[] = 'ui-corner-all';
            }
            // try the module's translation domain first
            $items[$mod['name']] = '<li><a href="' . $href . '"' . $target . (!empty($classes) ? ' class="' . implode(' ', $classes) . '">' : '>') . modgettext::_($mod['name'], $mod['module']['rawname']) . '</a></li>';
            $_item_sort[$mod['name']] = $mod['sort'];
        }
        uksort($items, '_item_sort');
        $mods[$t] .= implode($items) . '</ul>';
        unset($items);
        unset($_item_sort);
    }
    uksort($mods, '_menu_sort');
    $out .= implode($mods);
}
if ($amp_conf['SHOWLANGUAGE']) {
    $out .= '<a id="language-menu-button" ' . 'class="button-right ui-widget-content ui-state-default">' . _('Language') . '</a>';
    $out .= '<ul id="fpbx_lang" style="display:none;">';
    $out .= '<li data-lang="en_US"><a href="#">' . _('English') . '</a></li>';
    $out .= '<li data-lang="bg_BG"><a href="#">' . _('Bulgarian') . '</a></li>';
Exemplo n.º 5
0
function featurecodeadmin_destinations()
{
    $featurecodes = featurecodes_getAllFeaturesDetailed();
    if (isset($featurecodes)) {
        $text_domain = array();
        foreach ($featurecodes as $result) {
            // Ignore disabled codes, and modules, and ones not providing destinations
            //
            if ($result['featureenabled'] == 1 && $result['moduleenabled'] == 1 && $result['providedest'] == 1) {
                $modulename = $result['modulename'];
                $description = modgettext::_($result['featuredescription'], $modulename);
                // Just in case the translation was not found in either the module or amp, we will try to see
                // if they put it in the featurecode module i18n
                if ($description == $result['featuredescription']) {
                    $description = _($description);
                }
                $thisexten = $result['customcode'] != '' ? $result['customcode'] : $result['defaultcode'];
                $extens[] = array('destination' => 'ext-featurecodes,' . $result['defaultcode'] . ',1', 'description' => $description . ' <' . $thisexten . '>');
            }
        }
    }
    if (isset($extens)) {
        return $extens;
    } else {
        return null;
    }
}
Exemplo n.º 6
0
}
$prev_category = NULL;
if (is_array($active_modules)) {
    $dis = $amp_conf['AMPEXTENSIONS'] == 'deviceanduser' ? _("Add Device") : _("Add Extension");
    $active_modules['au']['items'][] = array('name' => _("Apply Changes Bar"), 'display' => '99');
    $active_modules['au']['items'][] = array('name' => $dis, 'display' => '999');
    foreach ($active_modules as $key => $module) {
        //create an array of module sections to display
        if (isset($module['items']) && is_array($module['items'])) {
            foreach ($module['items'] as $itemKey => $item) {
                if (!isset($module['rawname'])) {
                    continue;
                }
                $listKey = !empty($item['display']) ? $item['display'] : $itemKey;
                $item['rawname'] = $module['rawname'];
                $item['name'] = modgettext::_($item['name'], $module['rawname']);
                $module_list[$listKey] = $item;
            }
        }
    }
}
$module_list[99] = array("name" => _("Apply Changes Bar"));
$module_list[999] = array("name" => $amp_conf['AMPEXTENSIONS'] == 'deviceanduser' ? _("Add Device") : _("Add Extension"));
$module_list['*'] = array("name" => _("ALL SECTIONS"));
uasort($module_list, function ($a, $b) {
    return strnatcmp($a['name'], $b['name']);
});
$selected = array();
$unselected = array();
foreach ($module_list as $key => $val) {
    if (!empty($user['sections']) && is_array($user['sections']) && (in_array($key, array_values($user['sections'])) || $user['sections'][0] == '*')) {
Exemplo n.º 7
0
             echo '<input type="radio" id="uninstall_' . prep_id($name) . '" name="moduleaction[' . prep_id($name) . ']" value="uninstall" /> ' . '<label for="uninstall_' . prep_id($name) . '">' . _('Uninstall') . '</label> <br />';
         }
         break;
 }
 echo "\t\t\t\t</div>\n";
 echo "\t\t\t\t<div class=\"tabbertab\" title=\"" . _("Description") . "\">\n";
 if (isset($modules[$name]['publisher'])) {
     echo "<h5>" . sprintf(_("Publisher: %s"), $modules[$name]['publisher']) . "</h5>";
 }
 echo "<h5>" . sprintf(_("License: %s"), isset($modules[$name]['license']) ? $modules[$name]['license'] : "GPLv2") . "</h5>";
 if ($salert) {
     echo "<h5>" . sprintf(_("Fixes Vulnerabilities: %s"), implode($modules[$name]['vulnerabilities']['vul'], ', ')) . "</h5>";
 }
 if (isset($modules[$name]['description']) && !empty($modules[$name]['description'])) {
     echo "<h5>" . sprintf(_("Description for version %s"), $modules[$name]['version']) . "</h5>";
     echo nl2br(modgettext::_($modules[$name]['description'], $loc_domain));
 } else {
     echo _("No description is available.");
 }
 if (isset($modules[$name]['info']) && !empty($modules[$name]['info'])) {
     echo '<p>' . _('More info') . ': <a href="' . $modules[$name]['info'] . '" target="_new">' . $modules[$name]['info'] . '</a></p>';
 } else {
     echo '<p>' . _('More info') . ': <a href="' . "{$freepbx_help_url}&freepbx_module=" . urlencode($name) . '" target="help">' . sprintf(_("Get help for %s"), $name_text) . '</a></p>';
 }
 echo "\t\t\t\t</div>\n";
 if (isset($modules[$name]['changelog']) && !empty($modules[$name]['changelog'])) {
     echo "\t\t\t\t<div class=\"tabbertab\" title=\"" . _("Changelog") . "\">\n";
     echo "<h5>" . sprintf(_("Change Log for version %s"), $modules[$name]['version']) . "</h5>";
     // convert "1.x.x:" and "*1.x.x*" into bold, and do nl2br
     // TODO: need to fix this to convert 1.x.xbetax.x, 1.x.xalphax.x, 1.x.xrcx.x, 1.x.xRCx.x formats as well
     //
Exemplo n.º 8
0
            ?>
</td>
											</tr>
											<?php 
        }
        ?>
											<tr>
												<td><?php 
        echo _("Description");
        ?>
:</td>
											<?php 
        if (!empty($module['description'])) {
            ?>
												<td><?php 
            echo nl2br(modgettext::_($module['description'], $module['loc_domain']));
            ?>
</td>
											<?php 
        } else {
            ?>
												<td><?php 
            echo _("No description is available.");
            ?>
</td>
											</tr>
											<?php 
        }
        ?>
											<tr>
												<td><?php 
Exemplo n.º 9
0
$prev_category = NULL;
foreach ($module_list as $key => $row) {
    if ($row['category'] != $prev_category) {
        if ($prev_category) {
            echo "</optgroup>\n";
        }
        $catname = _(ucwords($row['category']));
        $catname = $catname != ucwords($row['category']) ? $catname : modgettext::_(ucwords($row['category']), $row['rawname']);
        echo "<optgroup label=\"" . $catname . "\">\n";
        $prev_category = $row['category'];
    }
    echo "<option value=\"" . $key . "\"";
    if (in_array($key, $sections)) {
        echo " SELECTED";
    }
    $label = modgettext::_($row['name'], $row['rawname']);
    echo ">" . $label . "</option>\n";
}
echo "</optgroup>\n";
// Apply Changes Bar
echo "<option value=\"99\"";
if (in_array("99", $sections)) {
    echo " SELECTED";
}
echo ">" . _("Apply Changes Bar") . "</option>\n";
// Apply Changes Bar
echo "<option value=\"999\"";
if (in_array("999", $sections)) {
    echo " SELECTED";
}
echo ">" . ($amp_conf['AMPEXTENSIONS'] == 'deviceanduser' ? _("Add Device") : _("Add Extension")) . "</option>\n";
Exemplo n.º 10
0
                continue;
            }
            //remove administrators, makes no sense in these modes
            if ($mod['display'] == "ampusers" && in_array(FreePBX::Config()->get('AUTHTYPE'), array("none"))) {
                continue;
            }
            $classes = array();
            //build default module url
            $href = isset($mod['href']) ? $mod['href'] : "config.php?display=" . $mod['display'];
            $target = isset($mod['target']) ? ' target="' . $mod['target'] . '" ' : '';
            $active = !empty($mod['display']) && !empty($_REQUEST['display']) && $mod['display'] == $_REQUEST['display'] ? 'active' : '';
            // try the module's translation domain first
            if (isset($mod['disabled']) && $mod['disabled']) {
                $items[$mod['name']] = '<li><a' . ' class="disabled ' . implode(' ', $classes) . ' ' . $active . '">' . modgettext::_($mod['name'], $mod['module']['rawname']) . '</a></li>';
            } else {
                $items[$mod['name']] = '<li><a href="' . $href . '"' . $target . ' class="' . implode(' ', $classes) . ' ' . $active . '">' . modgettext::_($mod['name'], $mod['module']['rawname']) . '</a></li>';
            }
            $_item_sort[$mod['name']] = $mod['sort'];
        }
        uksort($items, '_item_sort');
        $mods[$t] .= implode($items) . '</ul>';
        unset($items);
        unset($_item_sort);
    }
    uksort($mods, '_menu_sort');
    $out .= implode($mods);
    echo $out;
}
// key sort but keep Favorites on the far left, Other on the far right
//
function _menu_sort($a, $b)
Exemplo n.º 11
0
            break;
        case CONF_TYPE_SELECT:
            echo '<select class="valueinput" id="' . $c['keyword'] . '" data-valueinput-orig="' . $amp_conf[$c['keyword']] . '">';
            $opt = explode(',', $c['options']);
            foreach ($opt as $o) {
                $selected = $amp_conf[$c['keyword']] == $o ? ' selected ' : '';
                echo '<option value="' . $o . '"' . $selected . '>' . $o . '</option>';
            }
            echo '</select>';
            break;
        case CONF_TYPE_FSELECT:
            echo '<select class="valueinput" id="' . $c['keyword'] . '" data-valueinput-orig="' . $amp_conf[$c['keyword']] . '">';
            $opt = $c['options'];
            foreach ($opt as $o => $l) {
                $selected = $amp_conf[$c['keyword']] == $o ? ' selected ' : '';
                echo '<option value="' . $o . '"' . $selected . '>' . modgettext::_($l, $c['module']) . '</option>';
            }
            echo '</select>';
            break;
        case CONF_TYPE_BOOL:
            ?>
			<span class="radioset"><input class="valueinput" data-valueinput-orig="<?php 
            echo $amp_conf[$c['keyword']] ? 1 : 0;
            ?>
" id="<?php 
            echo $c['keyword'];
            ?>
-true" type="radio" name="<?php 
            echo $c['keyword'];
            ?>
" value="1" <?php 
// get all CFU settings
$cfusetting = $astman->database_show("CFU");
// get all DND settings
$dndsetting = $astman->database_show("DND");
foreach ($full_list as $key => $value) {
    $vmxcolor = "BLACK;\"";
    $sub_heading_id = $txtdom = $active_modules[$key]['rawname'];
    if ($active_modules[$key]['rawname'] != 'core' || $quietmode && !isset($_REQUEST[$sub_heading_id])) {
        continue;
        // we just want core
    }
    if ($txtdom == 'core') {
        $active_modules[$key]['name'] = 'Extensions';
        $core_heading = $sub_heading = modgettext::_($active_modules[$key]['name'], $txtdom);
    } else {
        $sub_heading = modgettext::_($active_modules[$key]['name'], $txtdom);
    }
    $module_select[$sub_heading_id] = $sub_heading;
    $html_txt_arr[$sub_heading] = "<div class=\"{$sub_heading_id}\"><table id=\"set_table\" border=\"0\" width=\"85%\"><tr>";
    $html_txt_arr[$sub_heading] .= "<tr><td><strong>" . $extension . "</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td colspan=\"7\" align=\"center\"><strong>" . $vmxlocator . "</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td colspan=\"2\" align=\"center\"><strong>" . $followme . "</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td colspan=\"5\" align=\"center\"><strong>" . $callstatus . "</strong></td>";
    $html_txt_arr[$sub_heading] .= "</tr><td>&nbsp;</td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>" . $status . "</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Busy</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Unavail</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Operator</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Press 0</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Press 1</strong></td>";
    $html_txt_arr[$sub_heading] .= "<td align=\"center\"><strong>Press 2</strong></td>";