function showCopyOptions()
{
    $includedTypes = array('single', 'multi', 'category');
    $skippedTables = array('accounts');
    foreach (getSortedSchemas() as $tableName => $schema) {
        if (preg_match("/^_/", $tableName)) {
            continue;
        }
        // skip private tables
        if (in_array($tableName, $skippedTables)) {
            continue;
        }
        // skip system tables
        if (!in_array(@$schema['menuType'], $includedTypes)) {
            continue;
        }
        // skip unknown menu types
        $encodedValue = htmlencode($tableName);
        $encodedLabel = htmlencode(coalesce(@$schema['menuName'], $tableName));
        print "<option value='{$encodedValue}'>{$encodedLabel}</option>\n";
    }
}
function cg2_option_selectSection($allowedMenuTypes = array())
{
    // 2.62 - added allowedMenuTypes
    // get options HTML
    $valuesToLabels = array();
    $skippedMenuTypes = array('', 'menugroup', 'link');
    foreach (getSortedSchemas() as $tableName => $schema) {
        if ($skippedMenuTypes && in_array(@$schema['menuType'], $skippedMenuTypes)) {
            continue;
        }
        if ($allowedMenuTypes && !in_array(@$schema['menuType'], $allowedMenuTypes)) {
            continue;
        }
        if (@$schema['menuHidden']) {
            continue;
        }
        $menuType = @$schema['menuType'];
        $valuesToLabels[$tableName] = @$schema['menuName'] . " ({$menuType})";
    }
    $optionsHTML = getSelectOptions(@$_REQUEST['tableName'], array_keys($valuesToLabels), array_values($valuesToLabels), true);
    if (!$optionsHTML) {
        $optionsHTML = "<option value=''>" . t("No matching sections were found") . "</option>\n";
    }
    ?>
  <div class="fieldOption">
    <div class="label" style="padding-top: 6px"><?php 
    et('Select Section');
    ?>
</div>
    <div style="float:left">
      <select name="tableName"><?php 
    echo $optionsHTML;
    ?>
</select>
    </div>
    <div class="clear"></div>
  </div>
<?php 
}