Exemplo n.º 1
0
function save_service()
{
    $_POST["service"] = str_replace(" ", "", $_POST["service"]);
    $_POST["service"] = strtolower($_POST["service"]);
    $master = new master_cf(0, $_POST["hostname"]);
    if ($_POST["zmd5"] == null) {
        $_POST["zmd5"] = md5($_POST["service"] . $_POST["type"] . $_POST["hostname"]);
    }
    if ($_POST["service"] == null) {
        $_POST["service"] = $_POST["zmd5"];
    }
    if ($_POST["private"] == null) {
        $_POST["private"] = "-";
    }
    if ($_POST["chroot"] == null) {
        $_POST["chroot"] = "-";
    }
    if ($_POST["maxproc"] == null) {
        $_POST["maxproc"] = "-";
    }
    $master->edit_service($_POST["service"], $_POST["type"], $_POST["private"], $_POST["unipriv"], $_POST["chroot"], $_POST["wakeup"], $_POST["maxproc"], null, $_POST["zmd5"]);
}
Exemplo n.º 2
0
function save_service(){
	$master=new master_cf();
	
	if($_GET["service"]==null){
		$_GET["service"]=$_GET["service_key"];
	}
	
	$master->edit_service($_GET["service"],$_GET["TYPE"],
	$_GET["PRIVATE"],$_GET["UNIPRIV"],
	$_GET["CHROOT"],$_GET["WAKEUP"],
	$_GET["MAXPROC"],array($_GET["COMMAND"]));
	

	
}