chore: reorganize files for easier Docker integration

This commit is contained in:
Emmanuel BENOîT 2025-01-02 14:02:30 +01:00
parent ab00e5ee08
commit 99511fe11f
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
1222 changed files with 0 additions and 0 deletions
game/admin

39
game/admin/cg_step4.php Normal file
View file

@ -0,0 +1,39 @@
<?php
session_start();
if (!is_array($_SESSION['lw_new_game']) || !$_SESSION['lw_new_game']['do_it_now'] || !$_SESSION['lw_new_game']['started']) {
echo "Sorry, can't do that.";
exit(0);
}
include("config.inc");
$cnx = __dbConnect();
$minId = 1;
$gameType = "b5" . ($_SESSION['lw_new_game']['game_type'] == 'r' ? 'r' : 'm');
do {
$minId ++;
$q = pg_query($cnx, "SELECT nspname FROM pg_namespace WHERE nspname='{$gameType}{$minId}'");
} while ($q && pg_num_rows($q) == 1);
pg_close($cnx);
if (!$q) {
$argh = "Error while accessing the database";
include('cg_argh.inc');
exit(1);
}
$_SESSION['lw_new_game']['found_id'] = $gameType . $minId;
$op = array(
"pc" => 25,
"text" => "Inserting data for ID $gameType$minId",
"delay" => 1,
"to" => "cg_step5.php"
);
include('cg_operation.inc');
?>