Exemplo n.º 1
0
     Table_2Col("Initial commodities to sell", $initscommod . "%");
     Table_2Col("Initial commodities to buy", $initbcommod . "%");
     Table_Spacer();
     Table_2Col("Empty sectors", $empty);
     Table_2Col("Federation sectors", $fedsecs);
     Table_2Col("Loops", $loops);
     Table_2Col("Unowned planets", $nump);
     Table_Spacer();
     Table_1Col("<p align='center'><input type=submit value=Confirm></p>");
     Table_Spacer();
     Table_1Col("<font color=red>WARNING: ALL TABLES WILL BE DROPPED AND THE GAME WILL BE RESET WHEN YOU CLICK 'CONFIRM'!</font>");
     Table_Footer(" ");
     echo "</form>";
     break;
 case "3":
     create_schema();
     include "includes/ini_to_db.php";
     $result = ini_to_db($db, "languages/english.ini.php", "languages", "english");
     if ($result) {
         echo "English language imported into database successfully.\n<br>";
     } else {
         echo "English language NOT imported into database successfully.\n<br>";
     }
     echo "<form action=create_universe.php method=post>";
     echo "<input type=hidden name=step value=4>";
     echo "<input type=hidden name=spp value={$spp}>";
     echo "<input type=hidden name=oep value={$oep}>";
     echo "<input type=hidden name=ogp value={$ogp}>";
     echo "<input type=hidden name=gop value={$gop}>";
     echo "<input type=hidden name=enp value={$enp}>";
     echo "<input type=hidden name=initscommod value={$initscommod}>";
Exemplo n.º 2
0
function stopGame($message)
{
    global $bktables, $dbtables, $db;
    // Stop the current game and display the message to users
    $message = addslashes($message);
    echo "DEBUG: UPDATE {$dbtables['config']} SET server_closed='Y', closed_message='{$message}'<br>";
    $res = $db->Execute("UPDATE {$dbtables['config']} SET server_closed='Y', closed_message='{$message}'");
    // Create Back up databases
    create_schema($bktables);
}
Exemplo n.º 3
0
      echo "<INPUT TYPE=HIDDEN NAME=fedsecs VALUE=$fedsecs>";
      echo "<input type=hidden name=loops value=$loops>";
      echo "<input type=hidden name=sektors value=$sector_max>";
      echo "<input type=hidden name=engage value=2>";
      echo "<input type=hidden name=swordfish value=$swordfish>";
      echo "<input type=submit value=Confirm>";
      echo "</form>";
      echo "<BR><BR><FONT COLOR=RED>";
      echo "WARNING: ALL TABLES WILL BE DROPPED AND THE GAME WILL BE RESET WHEN YOU CLICK 'CONFIRM'!<br>";
	  echo "Action will be taken on $db_prefix</FONT>";
      break;

// Stage 3, Out with the old and in with the new
   case "3":
      $sector_max = round($sektors);
      create_schema($dbtables);
      echo "<form action=create_universe.php method=post>";
      echo "<input type=hidden name=step value=4>";
      echo "<input type=hidden name=spp value=$spp>";
      echo "<input type=hidden name=oep value=$oep>";
      echo "<input type=hidden name=ogp value=$ogp>";
      echo "<input type=hidden name=gop value=$gop>";
      echo "<input type=hidden name=enp value=$enp>";
      echo "<input type=hidden name=initscommod value=$initscommod>";
      echo "<input type=hidden name=initbcommod value=$initbcommod>";
      echo "<input type=hidden name=nump value=$nump>";
      echo "<INPUT TYPE=HIDDEN NAME=fedsecs VALUE=$fedsecs>";
      echo "<input type=hidden name=loops value=$loops>";
      echo "<input type=hidden name=sektors value=$sector_max>";
      echo "<input type=hidden name=engage value=2>";
      echo "<input type=hidden name=swordfish value=$swordfish>";
            // check if the field names sent in are
            // SQL keywords
            case "check_field_sql_name":
                $n_fields = $_POST['n_fields'];
                $xml_response = check_field_sql_keywords($n_fields, $_POST);
                echo $xml_response;
                break;
                // the caller wishes to create
                // a schema
            // the caller wishes to create
            // a schema
            case "create_schema":
                $schema_name = strtolower($_POST['schema_name']);
                $geom_type = $_POST['geom_type'];
                $n_fields = $_POST['n_fields'];
                $result = create_schema($schema_name, $geom_type, $n_fields, $_POST);
                if ($result) {
                    echo "true";
                } else {
                    echo "false";
                }
                //$html = generate_html($xml, $xslt_user);
                break;
        }
    }
}
///
/// check_schema_name()
/// check if schema name already
/// exists (return 1) or if the schema name is a
/// SQL keyword (return 2).