예제 #1
0
파일: a.php 프로젝트: sebastiendu/mmc
 function createUiContainers($editMode = false)
 {
     if (!$editMode && getReverseZone($this->zone)) {
         $this->values["ip"] = getZoneFreeIp($this->zone);
     }
     $t = new Table();
     $t->add($this->_createNameElement(_T("Host name")), array("value" => $this->hostname, "required" => True));
     $t->add(new TrFormElement(_T("IP address", "network"), new IPInputTpl($this->pn("ip"))), array("value" => $this->values["ip"]));
     return array($this->stackedUi($t));
 }
예제 #2
0
<?php

/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2008 Mandriva, http://www.mandriva.com/
 *
 * $Id: edit.php 61 2007-05-29 15:55:22Z cedric $
 *
 * This file is part of Management Console.
 *
 * MMC is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
$zone = $_GET["zone"];
$current = $_GET["current"];
print getZoneFreeIp($zone, $current);
예제 #3
0
} else {
    $formElt = new HiddenTpl("hostname");
}
$f->add(new TrFormElement(_T("Host name"), $formElt), $a);
/* Prepare IP address input field content */
if ($_GET["action"] == "addhost" && count($zoneaddress) > 0) {
    if (isset($_GET["ipaddress"])) {
        $network = $_GET["ipaddress"];
    } else {
        if (isset($error) && isset($keepaddress)) {
            $network = $ipaddress;
        } else {
            if (!count($zoneaddress)) {
                $network = "";
            } else {
                $network = getZoneFreeIp($zone);
            }
        }
    }
    $a = array("value" => $network, "required" => True);
    $a["zone"] = $zone;
    $a["ajaxurl"] = "ajaxDnsGetZoneFreeIp";
    $formElt = new GetFreeIPInputTpl();
} else {
    if ($_GET["action"] == "addhost") {
        $a = array("value" => "", "required" => True);
        $formElt = new IPInputTpl("ipaddress");
    } else {
        $a = array("value" => $ipaddress);
        $formElt = new HiddenTpl("ipaddress");
    }