예제 #1
0
}
if (in_array($record_type, $__FM_CONFIG['records']['require_zone_rights']) && !currentUserCan('manage_zones', $_SESSION['module'])) {
    unAuth();
}
if ($record_type == 'SOA') {
    if (getNameFromID($domain_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_', 'domain_id', 'domain_clone_domain_id')) {
        $record_type = $default_record_type;
    } elseif (getNameFromID($domain_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_', 'domain_id', 'domain_template_id')) {
        $record_type = $default_record_type;
    }
}
define('FM_INCLUDE_SEARCH', true);
printHeader();
@printMenu();
include ABSPATH . 'fm-modules/fmDNS/classes/class_records.php';
$search_query = createSearchSQL(array('name', 'value', 'ttl', 'class', 'text', 'comment'), 'record_');
$supported_record_types = enumMYSQLSelect('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'records', 'record_type');
sort($supported_record_types);
$supported_record_types[] = 'SOA';
$parent_domain_ids = getZoneParentID($domain_id);
$zone_access_allowed = zoneAccessIsAllowed($parent_domain_ids);
if (!in_array($record_type, $supported_record_types)) {
    $record_type = $default_record_type;
}
$avail_types = buildRecordTypes($record_type, $parent_domain_ids, $map, $supported_record_types, $search_query);
$response = $form_data = $action = null;
if (reloadZone($domain_id)) {
    if (reloadAllowed($domain_id) && currentUserCan('reload_zones', $_SESSION['module']) && $zone_access_allowed) {
        $response = '** You need to <a href="" class="zone_reload" id="' . $domain_id . '">reload</a> this zone **';
    }
}
예제 #2
0
                        readfile($tmp_file . '.gz');
                        unlink($tmp_file . '.gz');
                        unlink($tmp_file);
                        exit;
                    }
                }
            } else {
                header('Location: ' . $GLOBALS['basename']);
            }
            break;
    }
}
define('FM_INCLUDE_SEARCH', true);
printHeader();
@printMenu();
$search_query = createSearchSQL(array('name', 'mapping', 'type'), 'domain_');
/** Check if any servers need their configs built first */
$reload_allowed = reloadAllowed();
if (!$reload_allowed && !$response) {
    $response = '<p>' . sprintf(__('You currently have no name servers hosting zones. <a href="%s">Click here</a> to manage one or more servers.'), getMenuURL(__('Servers'))) . '</p>';
}
echo printPageHeader($response, null, currentUserCan('manage_zones', $_SESSION['module']), $map);
$sort_direction = null;
$sort_field = 'domain_name';
if (isset($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']])) {
    extract($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']], EXTR_OVERWRITE);
}
/** Get zones based on access */
$user_capabilities = getUserCapabilities($_SESSION['user']['id'], 'all');
$limited_domain_ids = array_key_exists('access_specific_zones', $user_capabilities[$_SESSION['module']]) && !array_key_exists('view_all', $user_capabilities[$_SESSION['module']]) && $user_capabilities[$_SESSION['module']]['access_specific_zones'][0] ? "AND domain_id IN (" . implode(',', $user_capabilities[$_SESSION['module']]['access_specific_zones']) . ")" : null;
/** Process domain_view filtering */