Files
PQS/console.php
T
CydandClaude Opus 4.8 5aa01db123 Parameterize console.php; make Commit Mission atomic
- Config 'Update', 'Commit Mission', lock, and clearupdate now use db.php
  helpers with bound params (were injectable via ~20 raw $_GET values incl.
  nummercs and playerid). Pod toggles collapsed into a 16-iteration loop.
- Commit Mission runs under the shared queue lock and one transaction so a
  registration can't slip into the mission mid-commit.
- dev/migrations/002: pqs_currentmission + pqs_pastmissions -> InnoDB so the
  commit's snapshot/archive roll back with the queue delete (uses DELETE not
  TRUNCATE to stay in the transaction).

Verified: commit moves players to current/past, empties queue, marks completed
with nummercs; config update writes pods + settings; no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:59:27 -05:00

331 lines
20 KiB
PHP

<html>
<head>
<title>PQS - Game Console</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
var auto_refreshqueue = setInterval(function() {
$.ajaxSetup({ cache: false });
$('#queuediv').load('includes/getconsole.php');
}, 2000);
var auto_refreshpods = setInterval(function() {
$.ajaxSetup({ cache: false });
$('#mechpods').load('includes/mechpods.php');
}, 2000);
</script>
</head>
<body style='background: #000;'>
<?php
require_once("includes/config.php");
require_once("includes/db.php");
require_once("includes/queue.php");
date_default_timezone_set('America/Chicago');
$ttime = date('Hi');
$numberpods = 0;
//var_dump($_SESSION);
//var_dump($_GET);
//var_dump($_POST);
if (isset($_GET['clearcurrent'])) {
pqs_db()->query("TRUNCATE TABLE pqs_currentmission");
}
if (isset($_GET['submit'])) {$submit=$_GET['submit'];}else{$submit='';}
if ($submit=='Update'){
// Pod toggles: pod01..pod16, present in the query string => on.
$pods = array();
for ($p = 1; $p <= 16; $p++) {
$pods[$p] = isset($_GET[sprintf('pod%02d', $p)]) ? 1 : 0;
}
$numberpods = array_sum($pods);
// Numeric dropdowns.
$visibility = (int)($_GET['visibility'] ?? 0);
$weather = (int)($_GET['weather'] ?? 0);
$timelimit = (int)($_GET['timelimit'] ?? 0);
$timetoreset = (int)($_GET['timetoreset'] ?? 0);
$radar = (int)($_GET['radar'] ?? 0);
// Checkbox flags.
$heat = isset($_GET['heat']) ? 1 : 0;
$friendlyfire = isset($_GET['friendlyfire']) ? 1 : 0;
$splashdamage = isset($_GET['splashdamage']) ? 1 : 0;
$limitedammo = isset($_GET['limitedammo']) ? 1 : 0;
$noreturn = isset($_GET['noreturn']) ? 1 : 0;
$printdebriefing = isset($_GET['printdebriefing'])? 1 : 0;
$missionreview = isset($_GET['missionreview']) ? 1 : 0;
$weaponjam = isset($_GET['weaponjam']) ? 1 : 0;
$advancemode = isset($_GET['advancemode']) ? 1 : 0;
$armormode = isset($_GET['armormode']) ? 1 : 0;
$groupAvalible = isset($_GET['groupAvalible']) ? 1 : 0;
// Note: timepergame is intentionally set to timelimit, and timeofday /
// cameraship are not written here (preserves the original behavior).
pqs_exec(
"UPDATE pqs_gameconfig SET numpods=?, timepergame=?, timetoreset=?, timelimit=?,
visibility=?, weather=?, radar=?, heat=?, friendlyfire=?, splashdamage=?,
limitedammo=?, noreturn=?, printdebriefing=?, missionreview=?, weaponjam=?,
advancemode=?, armormode=?, GroupAvalible=? WHERE gamechoiceid=1",
str_repeat('i', 18),
array($numberpods, $timelimit, $timetoreset, $timelimit, $visibility, $weather,
$radar, $heat, $friendlyfire, $splashdamage, $limitedammo, $noreturn,
$printdebriefing, $missionreview, $weaponjam, $advancemode, $armormode, $groupAvalible)
);
pqs_exec(
"UPDATE pqs_pods SET pod01=?, pod02=?, pod03=?, pod04=?, pod05=?, pod06=?, pod07=?,
pod08=?, pod09=?, pod10=?, pod11=?, pod12=?, pod13=?, pod14=?, pod15=?, pod16=?",
str_repeat('i', 16),
array_values($pods)
);
pqs_exec("UPDATE pqs_mission SET MissionSize=? WHERE Completed=0", 'i', array($numberpods));
}
if ($submit=='Commit Mission') {
// Commit the next mission: snapshot to the current board, archive to history,
// clear it from the queue and mark it completed. Runs under the shared queue
// lock (so a registration can't slip in mid-commit) and as one transaction.
$nummercs = (int)($_GET['nummercs'] ?? 0);
$mtime = (int) date('Hi');
pqs_with_queue_lock(function () use ($nummercs, $mtime) {
$db = pqs_db();
$db->begin_transaction();
try {
$missionid = (int) pqs_val("SELECT MIN(MissionID) FROM pqs_queue");
$db->query("DELETE FROM pqs_currentmission");
if ($missionid > 0) {
$players = pqs_rows("SELECT callsign, mech FROM pqs_queue WHERE MissionID = ?", 'i', array($missionid));
foreach ($players as $p) {
pqs_exec("INSERT INTO pqs_currentmission (callsign, missionid) VALUES (?, ?)",
'si', array($p['callsign'], $missionid));
pqs_exec("INSERT INTO pqs_pastmissions (callsign, mech, missionid) VALUES (?, ?, ?)",
'ssi', array($p['callsign'], $p['mech'], $missionid));
}
pqs_exec("DELETE FROM pqs_queue WHERE MissionID = ?", 'i', array($missionid));
pqs_exec("UPDATE pqs_mission SET Completed = 1, nummercs = ?, missiontime = ? WHERE MissionID = ?",
'iii', array($nummercs, $mtime, $missionid));
}
$db->commit();
} catch (Throwable $e) {
$db->rollback();
throw $e;
}
});
}
if (isset($_GET['lock'])) {
$missionid = (int) pqs_val("SELECT MIN(MissionID) FROM pqs_queue");
if ($missionid > 0) {
pqs_exec("UPDATE pqs_mission SET locked = 1 WHERE MissionID = ?", 'i', array($missionid));
}
}
if (isset($_GET['action']) && $_GET['action'] == 'clearupdate') {
$playerid = (int)($_GET['playerid'] ?? 0);
pqs_exec("UPDATE pqs_queue SET Updated = 0 WHERE ID = ?", 'i', array($playerid));
}
$missionid = (int) pqs_val("SELECT MIN(MissionID) FROM pqs_queue");
$locked = 0;
if ($missionid != 0) {
$locked = (int) pqs_val("SELECT locked FROM pqs_mission WHERE MissionId = ?", 'i', array($missionid));
}
echo "<table width='450' border='0'>";
echo "<tr><td align='center'><a class='queuedisplayhead' href='console.php?clearcurrent=1'><font size='3'>Clear Current Queue</font></a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;";
echo "<a class='queuedisplayhead' href='history.php?launch=console' target='_blank'><font size='3'>Open History Window</font></a></td></tr>";
echo "<tr><td align='center' valign='top'><table width='100%'><tr><td align='center' colspan='2'>";
echo "<div id='queuediv' class='consolediv'>&nbsp;</div>";
echo "</td></tr>";
echo "<tr><td align='center'>Total Pods: <span id='mechpods' class='mechpods'></span>";
echo "<form name='submit-group' action=''># Mercs in Pods: <input type='text' name='nummercs' value='0' size=2></td>";
echo "<td align='center'><input type='submit' name='submit' class='button' id='submit_btn' value='Commit Mission' /></form><br></td></tr>";
if ($locked == 1) {
echo "<tr><td align='center' colspan='2'><br><font size='4' color='990000'>This mission is LOCKED!</font><br></td></tr>";
} else { ?>
<form onsubmit="return confirm('Are you sure you want to lock this mission?\n\n\t\tIf YES, click OK\n\t\tIf NO, click Cancel.')"><?php
echo "<tr><td align='center' colspan='2'><br><input type='hidden' name='lock' value='lock'><input type='submit' name='submit' class='button' id='submit_btnlock' value='Lock Mission' /></form></td></tr>";
}
echo "</table></td>";
echo "<tr><td align='center' valign='top'>";
echo "<table width='100%'><tr><td align='center'>";
echo "<div class='consolediv'><div id='configform'>";
echo "<font size='6'>Configuration</font><br><br>";
echo "<form name='submit-config' action='console.php'>";
$link = mysqli_connect('localhost', 'pqs', 'pqs') or die('Could not connect: ' . mysqli_connect_error());
mysqli_select_db($link, 'pqs') or die('Could not select database');
$query = 'SELECT * FROM pqs_gameconfig';
$result = mysqli_query($link, $query) or die('Query failed: ' . mysqli_error($link));
while ($line = mysqli_fetch_array($result)) {
$numpods = $line[1];
$timepergame = $line[2];
$timetoreset = $line[3];
$visibility = $line[7];
$weather = $line[8];
$timeofday = $line[9];
$timelimit = $line[10];
$radar = $line[11];
$heat = $line[12];
$friendlyfire = $line[13];
$splashdamage = $line[14];
$limitedammo = $line[15];
$noreturn = $line[16];
$printdebriefing = $line[17];
$missionreview = $line[18];
$weaponjam = $line[19];
$advancemode = $line[20];
$armormode = $line[21];
$cameraship = $line[22];
$groupAvalible = $line[23];
}
$query = 'SELECT * FROM pqs_pods';
$result = mysqli_query($link, $query) or die('Query failed: ' . mysqli_error($link));
while ($line = mysqli_fetch_array($result)) {
$pod01 = $line[0];
$pod02 = $line[1];
$pod03 = $line[2];
$pod04 = $line[3];
$pod05 = $line[4];
$pod06 = $line[5];
$pod07 = $line[6];
$pod08 = $line[7];
$pod09 = $line[8];
$pod10 = $line[9];
$pod11 = $line[10];
$pod12 = $line[11];
$pod13 = $line[12];
$pod14 = $line[13];
$pod15 = $line[14];
$pod16 = $line[15];
}
?>
&nbsp;Time Limit : <select name='timelimit' >
<option value=1<?php if($timelimit==1)echo ' selected ';?>>1</option>
<option value=2<?php if($timelimit==2)echo ' selected ';?>>2</option>
<option value=3<?php if($timelimit==3)echo ' selected ';?>>3</option>
<option value=4<?php if($timelimit==4)echo ' selected ';?>>4</option>
<option value=5<?php if($timelimit==5)echo ' selected ';?>>5</option>
<option value=6<?php if($timelimit==6)echo ' selected ';?>>6</option>
<option value=7<?php if($timelimit==7)echo ' selected ';?>>7</option>
<option value=8<?php if($timelimit==8)echo ' selected ';?>>8</option>
<option value=9<?php if($timelimit==9)echo ' selected ';?>>9</option>
<option value=10<?php if($timelimit==10)echo ' selected ';?>>10</option>
<option value=11<?php if($timelimit==11)echo ' selected ';?>>11</option>
<option value=12<?php if($timelimit==12)echo ' selected ';?>>12</option>
<option value=13<?php if($timelimit==13)echo ' selected ';?>>13</option>
<option value=14<?php if($timelimit==14)echo ' selected ';?>>14</option>
<option value=15<?php if($timelimit==15)echo ' selected ';?>>15</option>
<option value=20<?php if($timelimit==20)echo ' selected ';?>>20</option>
<option value=25<?php if($timelimit==25)echo ' selected ';?>>25</option>
<option value=30<?php if($timelimit==30)echo ' selected ';?>>30</option>
</select>
<br>
&nbsp;Reset Time : <select name='timetoreset' >
<option value=1<?php if($timetoreset==1)echo ' selected ';?>>1</option>
<option value=2<?php if($timetoreset==2)echo ' selected ';?>>2</option>
<option value=3<?php if($timetoreset==3)echo ' selected ';?>>3</option>
<option value=4<?php if($timetoreset==4)echo ' selected ';?>>4</option>
<option value=5<?php if($timetoreset==5)echo ' selected ';?>>5</option>
<option value=6<?php if($timetoreset==6)echo ' selected ';?>>6</option>
<option value=7<?php if($timetoreset==7)echo ' selected ';?>>7</option>
<option value=8<?php if($timetoreset==8)echo ' selected ';?>>8</option>
<option value=9<?php if($timetoreset==9)echo ' selected ';?>>9</option>
<option value=10<?php if($timetoreset==10)echo ' selected ';?>>10</option>
</select>
<br>
<?php
if ("$pod01" == 0) {echo "<font color=red>Pod01 : </font>";} else {echo "Pod01 : ";} if ("$pod01" == 1) { echo "<input type='checkbox' id='pod01' name='pod01' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod01' name='pod01' /><br>"; }
if ("$pod02" == 0) {echo "<font color=red>Pod02 : </font>";} else {echo "Pod02 : ";} if ("$pod02" == 1) { echo "<input type='checkbox' id='pod02' name='pod02' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod02' name='pod02' /><br>"; }
if ("$pod03" == 0) {echo "<font color=red>Pod03 : </font>";} else {echo "Pod03 : ";} if ("$pod03" == 1) { echo "<input type='checkbox' id='pod03' name='pod03' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod03' name='pod03' /><br>"; }
if ("$pod04" == 0) {echo "<font color=red>Pod04 : </font>";} else {echo "Pod04 : ";} if ("$pod04" == 1) { echo "<input type='checkbox' id='pod04' name='pod04' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod04' name='pod04' /><br>"; }
if ("$pod05" == 0) {echo "<font color=red>Pod05 : </font>";} else {echo "Pod05 : ";} if ("$pod05" == 1) { echo "<input type='checkbox' id='pod05' name='pod05' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod05' name='pod05' /><br>"; }
if ("$pod06" == 0) {echo "<font color=red>Pod06 : </font>";} else {echo "Pod06 : ";} if ("$pod06" == 1) { echo "<input type='checkbox' id='pod06' name='pod06' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod06' name='pod06' /><br>"; }
if ("$pod07" == 0) {echo "<font color=red>Pod07 : </font>";} else {echo "Pod07 : ";} if ("$pod07" == 1) { echo "<input type='checkbox' id='pod07' name='pod07' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod07' name='pod07' /><br>"; }
if ("$pod08" == 0) {echo "<font color=red>Pod08 : </font>";} else {echo "Pod08 : ";} if ("$pod08" == 1) { echo "<input type='checkbox' id='pod08' name='pod08' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod08' name='pod08' /><br>"; }
if ("$pod09" == 0) {echo "<font color=red>Pod09 : </font>";} else {echo "Pod09 : ";} if ("$pod09" == 1) { echo "<input type='checkbox' id='pod09' name='pod09' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod09' name='pod09' /><br>"; }
if ("$pod10" == 0) {echo "<font color=red>Pod10 : </font>";} else {echo "Pod10 : ";} if ("$pod10" == 1) { echo "<input type='checkbox' id='pod10' name='pod10' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod10' name='pod10' /><br>"; }
if ("$pod11" == 0) {echo "<font color=red>Pod11 : </font>";} else {echo "Pod11 : ";} if ("$pod11" == 1) { echo "<input type='checkbox' id='pod11' name='pod11' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod11' name='pod11' /><br>"; }
if ("$pod12" == 0) {echo "<font color=red>Pod12 : </font>";} else {echo "Pod12 : ";} if ("$pod12" == 1) { echo "<input type='checkbox' id='pod12' name='pod12' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod12' name='pod12' /><br>"; }
if ("$pod13" == 0) {echo "<font color=red>Pod13 : </font>";} else {echo "Pod13 : ";} if ("$pod13" == 1) { echo "<input type='checkbox' id='pod13' name='pod13' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod13' name='pod13' /><br>"; }
if ("$pod14" == 0) {echo "<font color=red>Pod14 : </font>";} else {echo "Pod14 : ";} if ("$pod14" == 1) { echo "<input type='checkbox' id='pod14' name='pod14' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod14' name='pod14' /><br>"; }
if ("$pod15" == 0) {echo "<font color=red>Pod15 : </font>";} else {echo "Pod15 : ";} if ("$pod15" == 1) { echo "<input type='checkbox' id='pod15' name='pod15' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod15' name='pod15' /><br>"; }
if ("$pod16" == 0) {echo "<font color=red>Pod16 : </font>";} else {echo "Pod16 : ";} if ("$pod16" == 1) { echo "<input type='checkbox' id='pod16' name='pod16' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='pod16' name='pod16' /><br>"; }
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visability &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <select name='visibility' >
<option value=0<?php if($visibility==0)echo ' selected ';?>>Random</option>
<option value=1<?php if($visibility==1)echo ' selected ';?>>Deflt</option>
<option value=2<?php if($visibility==2)echo ' selected ';?>>Clear</option>
<option value=3<?php if($visibility==3)echo ' selected ';?>>L Fog</option>
<option value=4<?php if($visibility==4)echo ' selected ';?>>H Fog</option>
<option value=5<?php if($visibility==5)echo ' selected ';?>>PS Fog</option>
</select>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Weather &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <select name='weather' >
<option value=0<?php if($visibility==0)echo ' selected ';?>>Random</option>
<option value=1<?php if($visibility==1)echo ' selected ';?>>Off</option>
<option value=2<?php if($visibility==2)echo ' selected ';?>>On</option>
</select>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Time of Day : <select name='timeofday' >
<option value=0<?php if($visibility==0)echo ' selected ';?>>Random</option>
<option value=1<?php if($visibility==1)echo ' selected ';?>>Day</option>
<option value=2<?php if($visibility==2)echo ' selected ';?>>Night</option>
</select>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Radar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <select name='radar' >
<option value=0<?php if($radar==0)echo ' selected ';?>>Random</option>
<option value=1<?php if($radar==1)echo ' selected ';?>>Novice</option>
<option value=2<?php if($radar==2)echo ' selected ';?>>Normal</option>
<option value=3<?php if($radar==3)echo ' selected ';?>>T Only</option>
<option value=4<?php if($radar==4)echo ' selected ';?>>No Rad</option>
</select>
<br>
<?php
echo "&nbsp;&nbsp;&nbsp;Heat : "; if ("$heat" == 1) { echo "<input type='checkbox' id='heat' name='heat' class='checkbox' checked /><br>"; } else { echo "<input type='checkbox' class='checkbox' id='heat' name='heat' /><br>"; }
echo "Friendly Fire : "; if ("$friendlyfire" == 1) { echo "<input type='checkbox' id='friendlyfire' name='friendlyfire' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='friendlyfire' name='friendlyfire' />"; } echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Splash Damage : "; if ("$splashdamage" == 1) { echo "<input type='checkbox' id='splashdamage' name='splashdamage' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='splashdamage' name='splashdamage' />"; } echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Limited Ammo : "; if ("$limitedammo" == 1) { echo "<input type='checkbox' id='limitedammo' name='limitedammo' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='limitedammo' name='limitedammo' />"; } echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "No Return : "; if ("$noreturn" == 1) { echo "<input type='checkbox' id='noreturn' name='noreturn' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='noreturn' name='noreturn' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Print Debriefing : "; if ("$printdebriefing" == 1) { echo "<input type='checkbox' id='printdebriefing' name='printdebriefing' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='printdebriefing' name='printdebriefing' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Mission Review : "; if ("$missionreview" == 1) { echo "<input type='checkbox' id='missionreview' name='missionreview' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='missionreview' name='missionreview' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Weapon Jam : "; if ("$weaponjam" == 1) { echo "<input type='checkbox' id='weaponjam' name='weaponjam' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='weaponjam' name='weaponjam' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Advance Mode : "; if ("$advancemode" == 1) { echo "<input type='checkbox' id='advancemode' name='advancemode' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='advancemode' name='advancemode' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "Armor Mode : "; if ("$armormode" == 1) { echo "<input type='checkbox' id='armormode' name='armormode' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='armormode' name='armormode' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cameraship &nbsp;: <select name='cameraship' >
<option value=0<?php if($cameraship==0)echo ' selected ';?>>None</option>
<option value=1<?php if($cameraship==1)echo ' selected ';?>>Camship</option>
<option value=2<?php if($cameraship==2)echo ' selected ';?>>LiveCam</option>
</select>
<br>
<?php
echo "Group Avalible : "; if ("$groupAvalible" == 1) { echo "<input type='checkbox' id='groupAvalible' name='groupAvalible' class='checkbox' checked />"; } else { echo "<input type='checkbox' class='checkbox' id='groupAvalible' name='groupAvalible' />"; }echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>";
echo "<br><input type='submit' name='submit' class='button' id='submit_btn' value='Update' />";
echo "</form>";
echo "</div></div>";
echo "</td></tr></table></td></tr>";
echo "</td></tr></table></body></html>";
?>