Initial commit of PQS
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
// vars
|
||||
$missionid=0;
|
||||
$numplayers = 0;
|
||||
|
||||
// db setup
|
||||
$link = mysqli_connect('localhost', 'pqs', 'pqs') or die('Could not connect: ' . mysqli_error($link));
|
||||
mysqli_select_db($link, 'pqs') or die('Could not select database');
|
||||
|
||||
// get current pods
|
||||
$query = 'SELECT * FROM pqs_gameconfig';
|
||||
$result = mysqli_query($link, $query) or die('Query failed 12: ' . mysql_error());
|
||||
$line = mysqli_fetch_array($result);
|
||||
|
||||
$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];
|
||||
|
||||
// locate next mission in queue
|
||||
$sql = "SELECT MIN(MissionID) FROM pqs_queue";
|
||||
$getid = mysqli_query($link, $sql) or die('Query failed getqueue line 49: ' . mysqli_error($link));
|
||||
$rs = mysqli_fetch_array($getid);
|
||||
$missionid = $rs[0];
|
||||
|
||||
// lookup gametype map, other conditions. make changeable defaults on the console page and override-able by the mission by the reservations page?
|
||||
|
||||
$query = "SELECT * FROM pqs_mission WHERE MissionID = $missionid";
|
||||
$result = mysqli_query($link, $query) or die('Query failed: 77' . mysqli_error($link));
|
||||
$line = mysqli_fetch_array($result);
|
||||
$gametype = $line[8];
|
||||
$map = $line[9];
|
||||
|
||||
echo"$gametype\r\n";
|
||||
echo"$map\r\n";
|
||||
echo"$visibility\r\n";
|
||||
echo"$weather\r\n";
|
||||
echo"$timeofday\r\n";
|
||||
echo"$timelimit\r\n";
|
||||
echo"$radar\r\n";
|
||||
echo"$heat\r\n";
|
||||
echo"$friendlyfire\r\n";
|
||||
echo"$splashdamage\r\n";
|
||||
echo"$limitedammo\r\n";
|
||||
echo"$noreturn\r\n";
|
||||
echo"$printdebriefing\r\n";
|
||||
echo"$missionreview\r\n";
|
||||
echo"$weaponjam\r\n";
|
||||
echo"$advancemode\r\n";
|
||||
echo"$armormode\r\n";
|
||||
echo"$cameraship\r\n";
|
||||
|
||||
mysqli_close($link);
|
||||
?>
|
||||
Reference in New Issue
Block a user