Location: PHPKode > projects > PhpCsAdmin > phpcsadmin/admin.php
<?
require('config.inc.php');
?>

<html>


<head>
<meta http-equiv="Content-Language" content="fr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>PhpCsAdmin <? echo"$version"; ?> - Launching</title>
<style>
<!--
input        { font-family: Verdana; font-size: 8pt; color: #333333; font-weight: bold;
               border-style: solid; border-width: 1; background-color: #C0C0C0 }
-->
</style>
</head>

<body style="font-family: Verdana; font-size: 8pt; border: 1px solid #333333" text="#333333" bgcolor="#FFFFFF">

<p><img border="0" src="logo_phpcsadmin.gif" width="248" height="130"></p>

<p><b>Half Life Dedicated Server Admin Page</b></p>
<p>&nbsp;</p>

<p><a href="start.php">Start</a> | <a href="stop.php">Stop</a></p>
<p>Lauch with the following options :</p>
<p><font color="#000000"><b>If you don't know what to fill in the fields, let 
them to the default value</b></font></p>
<form method="POST" action="admin.php">
 <p>
  Mod :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input type="text" name="mod" size="20" value="cstrike"></p>
 <p>
  Map :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input type="text" name="map" size="20" style="border: 1px solid #333333; background-color: #CCCCCC" value="de_aztec"></p>
  <p>
  Max players :&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="maxplayers" size="20" value="12" size="20" value="de_aztec" style="border: 1px solid #333333; background-color: #CCCCCC"></p>
  <p>
  IP address to bind to :&nbsp;
  <input type="text" name="ip" size="20" style="border: 1px solid #333333; background-color: #CCCCCC"></p>
  <p>
  Secured (blank) or not (default) :
  <input type="text" name="insecure" size="20" value="-insecure" style="border: 1px solid #333333; background-color: #CCCCCC"></p>
  <p>
  &nbsp;<input type="submit" value="Launch !" name="B1" style="font-family: Verdana; font-size: 8pt; color: #333333; font-weight: bold; border: 1px solid #333333; background-color: #CCCCCC">
  <input type="reset" value="Erase" name="B2" style="font-family: Verdana; font-size: 8pt; color: #333333; font-weight: bold; border: 1px solid #333333; background-color: #CCCCCC"></p>
<?
if (($map=="")|($maxplayers=="")|($ip=="")|($insecure=="secure")) {
	if ($map=="") echo "The map must be a valid map installed on the server eg : de_dust";
	if ($maxplayers="") echo "Max players must be filled in";
	if ($ip=="") echo "Ip address must be filled in";
	if ($insecure=="secure") echo "To lauch a secured server leave it blank";
}
else {
echo "The server is running with the following options :<BR><BR>";
echo "Mod : <b>$mod</b><BR><BR>";
echo "Map : <b>$map</b><BR><BR>";
echo "Max players : <b>$maxplayers</b><BR><BR>";
echo "IP address : <b>$ip</b><BR><BR>";
echo "Security mod : <b>$insecure<BR><BR>";
echo "The server will be operationnal in few seconds according to your server's velocity";
if (is_file("hlds_options.sh")) {
	system("rm -rf hlds_options.sh");
}
else {
$fp = fopen("hlds_options.sh","a");
fputs($fp,"chown -R apache:apache $hldspath\n");
fputs($fp,"chmod -R 700 $hldspath\n");
fputs($fp,"chmod -R 777 $hldspath\n");
fputs($fp,"chmod -R 755 $hldspath\n");
fputs($fp,"cd $hldspath\n");
fputs($fp, "screen -A -m -d -S hlds ./hlds_run -game $mod +maxplayers $maxplayers +map $map +ip $ip $insecure");
fclose($fp);
system("chmod +x hlds_options.sh");
system("./hlds_options.sh");
system("chown -R $dirowner $hldspath");
system("chmod -R 700 $hldspath");
system("chmod -R 777 $hldspath");
system("chmod -R 755 $hldspath");
}
}
?>


</form>
</body>

</html>
Return current item: PhpCsAdmin