function update($serverid, $userid)
{
    include 'config.php';
    $auth = auth($serverid, $userid);
    $ips = getips($serverid);
    $ctype = typeCon($ips['type']);
    stop($serverid, $userid);
    if ($auth == 1 && $status == 0) {
        exec('screen -d -m -S ' . $ctype . 'update' . $serverid . 'x ' . $direction1 . '/' . $serverid . '/steamcmd.sh +runscript csgous.txt');
        $mes = "Updating";
    } elseif ($auth == 2 && $status == 0) {
        exec('screen -d -m -S ' . $ctype . 'update' . $serverid . 'x ' . $direction1 . '/' . $serverid . '/steamcmd.sh +runscript csgous.txt');
        $mes = "Updating";
    } else {
        $mes = "Perm Error";
    }
    return $mes;
}
			<a class="disabled" onclick="start(' . $own[$i]["serverid"] . ')"><img class="bigimg" src="pics/play" width="30" height="30"></a>
			<a class="disabled" onclick="stop(' . $own[$i]["serverid"] . ')"><img class="bigimg" src="pics/stop" width="30" height="30"></a>
			<a class="disabled" onclick="update(' . $own[$i]["serverid"] . ')"><img class="bigimg" src="pics/update" width="30" height="30"></a>
			<a class="disabled" href="options.php?serverid=' . $own[$i]["serverid"] . '"><img class="bigimg" src="pics/more" width="30" height="30"></a>
			<a class="normala" onclick="fix(' . $own[$i]["serverid"] . ')" id="fixstatus' . $own[$i]["serverid"] . '">fixmaps</a>
			<a class="normala" href="log.php?serverid=' . $own[$i]["serverid"] . '">log</a>
			<form action="action.php?serverid=' . $own[$i]["serverid"] . '&action=4" method="post" id="form' . $own[$i]["serverid"] . ' ">
				<input type="text" name="cmd" placeholder="command" size="28" id="cmd' . $own[$i]["serverid"] . '"/>
				<input class="disableditem" type="button" value="send" onclick="exCommand(' . $own[$i]["serverid"] . ')" id="submitter"/>
				<label for="submitter" class="la"><img class="otherimg" src="pics/exec" width="29" height="25"></label><br>
			</form>
	</div>';
}
$adm = getServers($userid, 2);
for ($o = 0; $o < count($adm); $o++) {
    $ctype = typeCon($adm[$o]['type']);
    $status = getStatus($own[$i]["serverid"]);
    echo '<div class="item" id="' . $o . '">
			<span id="log' . $own[$i]["serverid"] . '" class="log">waiting...</span>
			<img class="smallimg" src="pics/' . $adm[$o]["type"] . '.png" height="16" width="16">
			<img class="smallimg" src="pics/adm.png" height="16" width="16">
			<p2> ID:' . $adm[$o]["serverid"] . '</p2>
			<p2>' . $adm[$o]["name"] . '</p2><br>
			<p2>' . $adm[$o]["ip"] . ':' . $adm[$o]['port'] . '</p2>
		  <span class="' . $status["string"] . '">' . $status["string"] . '</span>
		  <a class="normala" href="' . $run . $adm[$o]["ip"] . '">Connect</a><br>
		 	<a class="disabled" onclick="start(' . $adm[$o]["serverid"] . ')"><img class="bigimg" src="pics/play" width="30" height="30"></a>
		 	<a class="disabled" onclick="stop(' . $adm[$o]["serverid"] . ')"><img class="bigimg" src="pics/stop" width="30" height="30"></a>
			<a class="disabled" onclick="update(' . $own[$i]["serverid"] . ')"><img class="bigimg" src="pics/update" width="30" height="30"></a>
			<a class="disabled" href="options.php?serverid=' . $adm[$o]["serverid"] . '&type=' . $adm[$o]["type"] . '"><img class="bigimg" src="pics/more" width="30" height="30"></a>
			<a class="normala" onclick="fix(' . $adm[$o]["serverid"] . ')" id="fixstatus' . $adm[$o]["serverid"] . '">fixmaps</a>
<?php

session_start();
if (!isset($_SESSION['userid'])) {
    die('Bitte zuerst <a href="login.php">einloggen</a>');
}
include 'functions.php';
//Type Converter
$ips = getips($GET_['serverid']);
$ctype = typeCon($ips['type']);
echo $_SESSION['userid'];
$auth = auth($GET_['serverid'], $_SESSION['userid']);
$tday = date('G-i-s--j-m-y');
//Security checks
if ($auth == 1) {
    echo "Server is going down...";
    $out = shell_exec('screen -S ' . $ctype . $serverid . 'x -X kill');
    exec('mv log/' . $serverid . '.n log/old/' . $tday . 'ID' . $serverid . '.n');
} elseif ($auth == 2) {
    echo "Server is going down...";
    $out = shell_exec('screen -S ' . $ctype . $serverid . 'x -X kill');
    exec('mv log/' . $serverid . '.n log/old/' . $tday . 'ID' . $serverid . '.n');
} else {
    //echo "You are not allowed to do this!";
}
?>
<head>
<meta http-equiv="refresh" content="0; url=dos.php" />
</head>