Пример #1
0
if (isset($_REQUEST['logout']) && $_REQUEST['logout'] || isset($logout) && $logout) {
    $user->logout($idsession);
}
$link = "?language=" . $lang;
if (!empty($idsession)) {
    $link .= "&idsession=" . $idsession;
}
if ($user->error) {
    printf($html->string_error, $user->error);
}
if ($user->authenticated == 1) {
    if (isset($_REQUEST)) {
        $zonename = $_REQUEST['zonename'];
        $zonetype = $_REQUEST['zonetype'];
        $server = $_REQUEST['server'];
    }
    $zone = new Zone($zonename, $zonetype);
    if ($zone->error) {
        printf($html->string_error, $zone->error);
    } else {
        if ($zone->RetrieveUser() != $user->userid && ($config->usergroups && $zone->RetrieveUser() != $group->groupid)) {
            printf($html->string_error, $l['str_you_dont_own_this_zone']);
        } else {
            $title = sprintf($l['str_zone_content_for_x_on_server_x'], $zone->zonename, xssafe($server));
            $content = sprintf("\n<pre>%s</pre>", xssafe(zoneDig($server, $zonename)));
            print $html->box('digwindow', $title, $content);
        }
    }
}
// print close "window"
print $html->footerlight();
Пример #2
0
 /**
  * Fill in new zone with zonecontent from $server
  *
  *@access private
  *@param string $server server to be used to dig zone content
  *@return int 1 if success, 0 if error
  */
 function fillinWithImport($server)
 {
     $dig = zoneDig($server, $this->zonename);
     return $this->parseZoneInput($dig);
 }