@ 2013-06-26T20:47:44Z <?php
// Multi instance support was written by Krunch
if (!isset($_SESSION['user_id']) || isset($_GET["instance"]))
{
if (isset($_POST["instance"])) {
$serverinstance = intval($_POST["instance"]);
} else if (isset($_GET["instance"])) {
if ($_GET["instance"] > 0) {
$serverinstance = intval($_GET["instance"]);
} else {
$serverinstance = 1;
}
} else {
$serverinstance = 1;
}
$_SESSION["serverinstance"] = $serverinstance;
$_SESSION["patharma"] = $patharma = realpath(dirname(__FILE__) . "/../../..");
$settings = simplexml_load_file($patharma."\\C:\xampp\htdocs\@dayzcc_config\\$serverinstance\\settings.xml", true);
$hive = parse_ini_file($patharma."\\@dayzcc_config\\$serverinstance\\HiveExt.ini", true);
$_SESSION["servermodlist"] = $servermodlist = (string)$settings->section[1]->setting[1];
$_SESSION["serverip"] = $serverip = (string)$settings->section[2]->setting[2];
$_SESSION["serverport"] = $serverport = (string)$settings->section[3]->setting[3];
$_SESSION["rconpassword"] = $rconpassword = (string)$settings->section[4]->setting[4];
$_SESSION["dbhost"] = $dbhost = $hive["Database"]["Host"];
$_SESSION["dbport"] = $dbport = $hive["Database"]["Port"];
$_SESSION["dbuser"] = $dbuser = $hive["Database"]["Username"];
$_SESSION["dbpass"] = $dbpass = $hive["Database"]["Password"];
$_SESSION["dbname"] = $dbname = $hive["Database"]["Database"];
$dbh = new mysqli($dbhost.':'.$dbport, $dbuser, $dbpass, $dbname);
if ($dbh->connect_errno) {
echo $dbh->connect_error;
exit;
}
$sth = $dbh->prepare("select world.name from instance inner join world on instance.world_id = world.id where instance.id = ?");
$sth->bind_param("i", $serverinstance);
$sth->execute() or die($sth->error);
$sth->bind_result($serverworld);
$sth->fetch() or die($sth->error);
$sth->close();
$_SESSION["serverworld"] = $serverworld;
}
else
{
$serverinstance = $_SESSION["serverinstance"];
$patharma = $_SESSION["patharma"];
$servermodlist = $_SESSION["servermodlist"];
$serverip = $_SESSION["serverip"];
$serverport = $_SESSION["serverport"];
$rconpassword = $_SESSION["rconpassword"];
$dbhost = $_SESSION["dbhost"];
$dbport = $_SESSION["dbport"];
$dbuser = $_SESSION["dbuser"];
$dbpass = $_SESSION["dbpass"];
$dbname = $_SESSION["dbname"];
$serverworld = $_SESSION["serverworld"];
}
$sitename = "DayZ Controlcenter (Instance ".$serverinstance.")";
$exeserver = "arma2oaserver_".$serverinstance.".exe";
$pathserver = $patharma."\\@dayzcc_config\\".$serverinstance."\\".$exeserver;
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for git.master , git.master_jit , rfc.property-hooks Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ne50i on line 20
Fatal error: Uncaught TypeError: simplexml_load_file(): Argument #2 ($class_name) must be a class name derived from SimpleXMLElement or null, 1 given in /in/ne50i:22
Stack trace:
#0 /in/ne50i(22): simplexml_load_file('\\C:\nmpp\\htdocs\\...', '1')
#1 {main}
thrown in /in/ne50i on line 22
Process exited with code 255 . This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches Archived branches Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:dark mode live preview
28.96 ms | 406 KiB | 5 Q