本文整理汇总了PHP中suExec函数的典型用法代码示例。如果您正苦于以下问题:PHP suExec函数的具体用法?PHP suExec怎么用?PHP suExec使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了suExec函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getSyncStatus
function getSyncStatus()
{
if (trim(suExec("getsyncstatus")) == "true") {
return true;
} else {
return false;
}
}
开发者ID:mattlavine,项目名称:NetSUS,代码行数:8,代码来源:functions.php
示例2: getNetBootStatus
$desc .= "{$line}\n";
}
}
}
}
}
}
}
if (isset($_POST['NetBootImage']) && ($_GET['service'] = "NetBoot")) {
$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);
suExec("touchconf \"/var/appliance/conf/dhcpd.conf.new\"");
if (file_put_contents("/var/appliance/conf/dhcpd.conf.new", $nbconf) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update dhcpd.conf</div>";
}
suExec("disablenetboot");
suExec("installdhcpdconf");
if ($wasrunning || isset($_POST['enablenetboot'])) {
suExec("setnbimages " . $nbi);
}
$conf->setSetting("netbootimage", $nbi);
}
}
}
开发者ID:mattlavine,项目名称:NetSUS,代码行数:31,代码来源:ajax.php
示例3: getFirewallstatus
function getFirewallstatus()
{
if (trim(suExec("getFirewallstatus")) == "true") {
return true;
} else {
return false;
}
}
开发者ID:krauseed11,项目名称:NetSUS,代码行数:8,代码来源:functions.php
示例4: suExec
<li>
<span>Number of Active AFP Connections:</span>
<br>
<br>
<span><?php
echo suExec("afpconns");
?>
</span>
</li>
<li>
<span>Shadow File Usage:</span>
<br>
<br>
<span><?php
echo suExec("shadowusage");
?>
</span>
</li>
</ul>
</div>
</div>
<div id="netboot-server">
<h3>LDAP Proxy Server</h3>
<div class="container">
开发者ID:krauseed11,项目名称:NetSUS,代码行数:30,代码来源:dashboard.php
示例5: suExec
?>
>
<br>
<br>
</form> <!-- end form Restart -->
<hr>
<br>
<input type="button" id="back-button" name="action" class="btn btn-sm btn-default" value="Back" onclick="document.location.href='<?php
echo $_SERVER['HTTP_REFERER'];
?>
'" <?php
if (isset($_POST['confirm'])) {
echo "disabled";
}
?>
>
</div>
</div>
<?php
include "inc/footer.php";
?>
<?php
if (isset($_POST['confirm'])) {
suExec("restart");
}
开发者ID:goldsmcb,项目名称:NetSUS,代码行数:31,代码来源:restart.php
示例6: trim
<?php
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
$currentIP = trim(getCurrentIP());
if ($_GET['restart']) {
$sURL = "SMB.php";
echo suExec("restartsmb");
}
if ($_GET['start']) {
echo suExec("startsmb");
$sURL = "smb://" . $currentIP . "/NetBoot";
}
header('Location: ' . $sURL);
include "inc/footer.php";
?>
开发者ID:goldsmcb,项目名称:NetSUS,代码行数:17,代码来源:smbCtl.php
示例7: suExec
}
if (isset($_POST['SSH'])) {
if (getSSHstatus()) {
suExec("disableSSH");
echo "<div class=\"alert alert-warning\">SSH Disabled.</div>";
} else {
suExec("enableSSH");
echo "<div class=\"alert alert-success\">SSH Enabled.</div>";
}
}
if (isset($_POST['Firewall'])) {
if (getFirewallstatus()) {
suExec("disableFirewall");
echo "<div class=\"alert alert-warning\">Firewall Disabled.</div>";
} else {
suExec("enableFirewall");
echo "<div class=\"alert alert-success\">Firewall Enabled.</div>";
}
}
$type = getNetType();
$dns = getCurrentNameServers();
?>
<script>
window.onload = function()
{
document.getElementById('ip').disabled = document.getElementById('dhcp').checked;
document.getElementById('netmask').disabled = document.getElementById('dhcp').checked;
document.getElementById('gateway').disabled = document.getElementById('dhcp').checked;
document.getElementById('dns1').disabled = document.getElementById('dhcp').checked;
document.getElementById('dns2').disabled = document.getElementById('dhcp').checked;
开发者ID:goldsmcb,项目名称:NetSUS,代码行数:31,代码来源:networkSettings.php
示例8: suExec
?>
>3 p.m.</option>
<option value="18"<?php
echo $syncschedule == "18" ? " selected=\"selected\"" : "";
?>
>6 p.m.</option>
<option value="21"<?php
echo $syncschedule == "21" ? " selected=\"selected\"" : "";
?>
>9 p.m.</option>
</select>
<br>
<div class="labelDescriptionWrapper">
<span style="font-weight:bold;">Last Sync: </span><span><?php
if (trim(suExec("lastsussync")) != "") {
print suExec("lastsussync");
} else {
echo "Never";
}
?>
</span>
</div>
</div> <!-- end #form-inside -->
</form> <!-- end form SUS -->
</div> <!-- end #form-wrapper -->
<?php
include "inc/footer.php";
开发者ID:krauseed11,项目名称:NetSUS,代码行数:31,代码来源:SUS.php
示例9: suExec
$accounterror = "Incorrect current password.";
}
}
$shelluser = "";
// Change the shell account
if (isset($_POST['saveShellAccount'])) {
if (isset($_POST['shellUsername']) && isset($_POST['shellPassword']) && isset($_POST['shellConfirm']) && $_POST['shellUsername'] != "" && $_POST['shellPassword'] != "" && $_POST['shellConfirm'] != "") {
if ($_POST['shellPassword'] == $_POST['shellConfirm']) {
$shelluser = $_POST['shellUsername'];
if ($shelluser != $conf->getSetting("shelluser")) {
print suExec("changeshelluser {$shelluser} " . $conf->getSetting("shelluser"));
$conf->setSetting("shelluser", $shelluser);
}
$shelluser = $conf->getSetting("shelluser");
// TODO: Find more secure method
print suExec("changeshellpass {$shelluser} " . $_POST['shellPassword']);
// Have to pass the password in clear text, unfortunately
$accountsuccess = "Shell account changed.";
$conf->changedPass("shellaccount");
} else {
$accounterror = "Passwords do not match.";
}
} else {
$accounterror = "All fields are required.";
}
} else {
// Load current account name
$shelluser = $conf->getSetting("shelluser");
if ($shelluser == NULL || $shelluser == "") {
$shelluser = "shelluser";
$conf->setSetting("shelluser", $shelluser);
开发者ID:nblom,项目名称:NetSUS,代码行数:31,代码来源:accounts.php
示例10: suExec
} else {
if (isValidIPAddress($_POST['ip']) && !isLoopbackAddress($_POST['ip']) && getNetAddress($_POST['ip'], $_POST['netmask']) != $_POST['ip'] && getBcastAddress($_POST['ip'], $_POST['netmask']) != $_POST['ip'] && isValidNetmask($_POST['netmask']) && isValidIPAddress($_POST['gateway']) && !isLoopbackAddress($_POST['gateway']) && getNetAddress($_POST['gateway'], $_POST['netmask']) != $_POST['gateway'] && getBcastAddress($_POST['gateway'], $_POST['netmask']) != $_POST['gateway'] && $_POST['gateway'] != $_POST['ip'] && isValidIPAddress($_POST['dns1']) && (isValidIPAddress($_POST['dns2']) || $_POST['dns2'] == "")) {
//address netmask gateway
suExec("setip " . $_POST['ip'] . " " . $_POST['netmask'] . " " . $_POST['gateway']);
suExec("setdns " . $_POST['dns1'] . " " . $_POST['dns2']);
}
}
echo "<div class=\"successMessage\">Configuration saved.</div>";
}
}
if (isset($_POST['SSH'])) {
if (getSSHstatus()) {
suExec("disableSSH");
echo "<div class=\"successMessage\">SSH Disabled.</div>";
} else {
suExec("enableSSH");
echo "<div class=\"successMessage\">SSH Enabled.</div>";
}
}
$type = getNetType();
$dns = getCurrentNameServers();
?>
<script>
window.onload = function()
{
document.getElementById('ip').disabled = document.getElementById('dhcp').checked;
document.getElementById('netmask').disabled = document.getElementById('dhcp').checked;
document.getElementById('gateway').disabled = document.getElementById('dhcp').checked;
document.getElementById('dns1').disabled = document.getElementById('dhcp').checked;
document.getElementById('dns2').disabled = document.getElementById('dhcp').checked;
开发者ID:nblom,项目名称:NetSUS,代码行数:31,代码来源:networkSettings.php
示例11: suExec
<?php
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
$title = "AFP";
include "inc/header.php";
$accounterror = "";
$accountsuccess = "";
if (isset($_POST['afppass'])) {
$afppw1 = $_POST['afppass1'];
$afppw2 = $_POST['afppass2'];
if ($afppw1 != "") {
if ($afppw1 == $afppw2) {
$result = suExec("resetafppw " . $afppw1);
if (strpos($result, 'BAD PASSWORD') !== false) {
$accounterror = $result;
} else {
$accountsuccess = "AFP password changed.";
$conf->changedPass("afpaccount");
}
} else {
$accounterror = "Passwords do not match.";
}
} else {
$accounterror = "All fields required.";
}
}
?>
<script>
// function validateafpPW()
开发者ID:mattlavine,项目名称:NetSUS,代码行数:31,代码来源:AFP.php
示例12: suExec
<?php
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
if ($_GET['sync']) {
echo suExec("reposync");
}
if ($_GET['purge']) {
echo suExec("repopurge");
}
$sURL = "SUS.php";
header('Location: ' . $sURL);
include "inc/footer.php";
?>
开发者ID:goldsmcb,项目名称:NetSUS,代码行数:15,代码来源:susCtl.php
示例13: foreach
$ldapproxies = "";
foreach ($conf->getProxies() as $key => $value) {
$ldapproxies .= "database\tldap\nsuffix\t\"" . $value['outLDAP'] . "\"\noverlay\trwm\nrwm-suffixmassage\t\"" . $value['outLDAP'] . "\" \"" . $value['inLDAP'] . "\"\nuri\t\"" . $value['inURL'] . "\"\nrebind-as-user\nreadonly\tyes\n\n";
}
$lpconf = str_replace("##PROXIES##", $ldapproxies, $lpconf);
suExec("touchconf \"/var/appliance/conf/slapd.conf.new\"");
if (file_put_contents("/var/appliance/conf/slapd.conf.new", $lpconf) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update slapd.conf</div>";
}
$wasrunning = getLDAPProxyStatus();
if ($wasrunning) {
suExec("disableproxy");
}
suExec("installslapdconf");
if ($wasrunning) {
suExec("enableproxy");
}
}
// ####################################################################
// End of GET/POST parsing
// ####################################################################
?>
<style>
<!--
@media (max-width: 600px) {
tr:first-child { display: none; }
td:nth-of-type(1):before { content: "Exposed Distinguished Name";}
开发者ID:krauseed11,项目名称:NetSUS,代码行数:31,代码来源:LDAPProxy.php
示例14: suExec
</td>
<td></td>
<td>
Num of Branches: <?echo suExec(numofbranches);
?>
</td>
<td></td>
<td>
</td>
</tr>
<tr>
<td>
Shadow File Usage: <?echo suExec(shadowusage);
?>
</td>
<td></td>
<td>
</td>
<td></td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td></td>
开发者ID:rickgmac,项目名称:NetSUS,代码行数:30,代码来源:dashboard.php
示例15: suExec
<?php
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
if ($_GET['sync']) {
echo suExec("reposync");
}
$sURL = "SUS.php";
header('Location: ' . $sURL);
include "inc/footer.php";
?>
开发者ID:mattlavine,项目名称:NetSUS,代码行数:12,代码来源:susCtl.php
示例16: suExec
echo $syncschedule == "15" ? " selected=\"selected\"" : "";
?>
>3 p.m.</option>
<option value="18"<?php
echo $syncschedule == "18" ? " selected=\"selected\"" : "";
?>
>6 p.m.</option>
<option value="21"<?php
echo $syncschedule == "21" ? " selected=\"selected\"" : "";
?>
>9 p.m.</option>
</select>
<br>
<div class="labelDescriptionWrapper">
<span style="font-weight:bold;">Last Sync: </span><span><?php
echo suExec("lastsussync");
?>
</span>
</div>
</div> <!-- end #form-inside -->
</form> <!-- end form SUS -->
</div> <!-- end #form-wrapper -->
<?php
include "inc/footer.php";
?>
开发者ID:mattlavine,项目名称:NetSUS,代码行数:29,代码来源:SUS.php
示例17: suExec
suExec("touchconf \"/var/appliance/conf/appliance.private.key\"");
if (file_put_contents("/var/appliance/conf/appliance.private.key", $_POST['privatekey']) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update appliance.private.key</div>";
return;
}
suExec("touchconf \"/var/appliance/conf/appliance.certificate.pem\"");
if (file_put_contents("/var/appliance/conf/appliance.certificate.pem", $_POST['certificate']) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update appliance.certificate.pem</div>";
return;
}
suExec("touchconf \"/var/appliance/conf/appliance.chain.pem\"");
if (file_put_contents("/var/appliance/conf/appliance.chain.pem", $_POST['chain']) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update appliance.chain.pem</div>";
return;
}
suExec("updateCert");
echo "<div class=\"successMessage\">Configuration saved. Restart required.</div>";
}
?>
<h2>Certificates</h2>
<div id="form-wrapper">
<form action="certificates.php" method="post" name="certificates" id="certificates">
<div id="form-inside">
<span class="label">Private Key</span>
<textarea class="wide" name="privatekey" cols="40" rows="40"></textarea>
<br>
开发者ID:krauseed11,项目名称:NetSUS,代码行数:31,代码来源:certificates.php
示例18: suExec
<?php
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
$title = "SMB";
include "inc/header.php";
$accounterror = "";
$accountsuccess = "";
if (isset($_POST['smbpass'])) {
$smbpw1 = $_POST['smbpass1'];
$smbpw2 = $_POST['smbpass2'];
if ($smbpw1 != "") {
if ($smbpw1 == $smbpw2) {
suExec("resetsmbpw " . $smbpw1);
$accountsuccess = "SMB password changed.";
$conf->changedPass("smbaccount");
} else {
$accounterror = "Passwords do not match.";
}
} else {
$accounterror = "All fields required.";
}
}
?>
<div id="restarting" class="alert alert-warning" style="display:none">
<span><img src="images/progress.gif" width="25"> Restarting...</span>
</div>
<?php
开发者ID:goldsmcb,项目名称:NetSUS,代码行数:31,代码来源:SMB.php
示例19: foreach
$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);
suExec("touchconf \"/var/appliance/conf/dhcpd.conf.new\"");
if (file_put_contents("/var/appliance/conf/dhcpd.conf.new", $nbconf) === FALSE) {
echo "<div class=\"errorMessage\">ERROR: Unable to update dhcpd.conf</div>";
}
$wasrunning = getNetBootStatus();
if ($wasrunning) {
suExec("disablenetboot");
}
suExec("installdhcpdconf");
if ($wasrunning) {
suExec("setnbimages " . $conf->getSetting("netbootimage"));
}
}
// ####################################################################
// End of GET/POST parsing
// ####################################################################
?>
<script>
function validateSubnet()
{
if (document.getElementById("subnet").value != "" && document.getElementById("netmask").value != "")
document.getElementById("addsubnet").disabled = false;
else
document.getElementById("addsubnet").disabled = true;
}
开发者ID:krauseed11,项目名称:NetSUS,代码行数:31,代码来源:netBoot.php
示例20: setHostName
include "inc/config.php";
include "inc/auth.php";
include "inc/functions.php";
if (isset($_POST['hostname'])) {
setHostName($_POST['hostname']);
}
$status = "";
if (isset($_POST['nettype'])) {
$type = $_POST['nettype'];
if ($type == "dhcp") {
suExec("setdhcp");
} else {
//address netmask gateway
suExec("setip " . $_POST['ip'] . " " . $_POST['netmask'] . " " . $_POST['gateway']);
suExec("setdns " . $_POST['dns1'] . " " . $_POST['dns2']);
}
$status = "<p><b>Configuration saved!</b></p>";
}
$type = getNetType();
$dns = getCurrentNameServers();
$jsscriptfiles = "<script type=\"text/javascript\" src=\"scripts/networkingSet.js\"></script>";
$onloadjs = "onLoadStaticOptionsToggle('{$type}');";
$title = "Network Configuration";
include "inc/header.php";
?>
<center><?php
echo $status;
?>
<form action="networkingSet.php" method="post" name="networkingSet"><br />
<br />
开发者ID:rickgmac,项目名称:NetSUS,代码行数:30,代码来源:networkingSet.php
注:本文中的suExec函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论