?> onclick="disableStaticOptions(this.value);" /> <label for="dhcp">DHCP</label> </div> <div class="radio radio-primary"> <input type="radio" name="nettype" value="static" id="static" <?php echo $type == "static" ? " checked=\"checked\"" : ""; ?> onclick="disableStaticOptions(this.value);" /> <label for="static">Static</label> </div> <label class="control-label">IP Address</label> <input type="text" name="ip" id="ip" class="form-control input-sm" value="<?php echo getCurrentIP(); ?> " /> <label class="control-label">Netmask</label> <input type="text" name="netmask" id="netmask" class="form-control input-sm" value="<?php echo getCurrentNetmask(); ?> " /> </div> <div class="col-xs-6 col-sm-6 col-md-4 col-lg-3"> <label class="control-label">Gateway</label> <input type="text" name="gateway" id="gateway" class="form-control input-sm" value="<?php
<?php include "inc/config.php"; include "inc/auth.php"; include "inc/functions.php"; $currentIP = trim(getCurrentIP()); $title = "Dashboard"; include "inc/header.php"; if ($conf->needsToChangeAnyPasses()) { ?> <span class="noticeMessage">WARNING: Credentials have not been changed for the following accounts:<br> <ul style="list-style-type: disc; padding-left:20px;"> <?php if ($conf->needsToChangePass("webaccount")) { echo "<li>Web Application</li>\n"; } if ($conf->needsToChangePass("shellaccount")) { echo "<li>Shell</li>\n"; } if ($conf->needsToChangePass("afpaccount")) { echo "<li>AFP</li>\n"; } if ($conf->needsToChangePass("smbaccount")) { echo "<li>SMB</li>\n"; } ?> </ul> </span> <?php } ?>
<?php $netbootimgdir = "/srv/NetBoot/NetBootSP0/"; $currentIP = getCurrentIP(); if ($conf->getSetting("susbaseurl") == NULL || $conf->getSetting("susbaseurl") == "") { if ($_SERVER['HTTP_HOST'] != "") { $conf->setSetting("susbaseurl", "http://" . $_SERVER['HTTP_HOST'] . "/"); } elseif ($_SERVER['SERVER_NAME'] != "") { $conf->setSetting("susbaseurl", "http://" . $_SERVER['SERVER_NAME'] . "/"); } else { $conf->setSetting("susbaseurl", "http://" . getCurrentHostname() . "/"); } } if ($conf->getSetting("syncschedule") == NULL || $conf->getSetting("syncschedule") == "") { $conf->setSetting("syncschedule", "Off"); } $syncschedule = $conf->getSetting("syncschedule"); if (isset($_POST['NetBootImage'])) { $wasrunning = getNetBootStatus(); $nbi = $_POST['NetBootImage']; if ($nbi != "") { $nbconf = file_get_contents("/var/appliance/conf/dhcpd.conf"); $nbsubnets = ""; foreach ($conf->getSubnets() as $key => $value) { $nbsubnets .= "subnet " . $value['subnet'] . " netmask " . $value['netmask'] . " {\n\tallow unknown-clients;\n}\n\n"; } $nbconf = str_replace("##SUBNETS##", $nbsubnets, $nbconf); print suExec("touchconf \"/var/appliance/conf/dhcpd.conf.new\""); if (file_put_contents("/var/appliance/conf/dhcpd.conf.new", $nbconf) === FALSE) { echo "Unable to update dhcpd.conf"; }