Added full source code
This commit is contained in:
commit
33f8586698
1377 changed files with 123808 additions and 0 deletions
admin
41
admin/cg_step4.php
Normal file
41
admin/cg_step4.php
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
set_magic_quotes_runtime(false);
|
||||
|
||||
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');
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue