Upload files to "website"
This commit is contained in:
parent
e3246d93ed
commit
7480285825
35
website/chargen.php
Normal file
35
website/chargen.php
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>Frontier II - Character Creation</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
<BODY BGCOLOR="#000000" TEXT="#f0f0f0">
|
||||||
|
|
||||||
|
<H2 ALIGN="CENTER">Frontier II</H2>
|
||||||
|
<H3 ALIGN="CENTER">Character Creation</H3>
|
||||||
|
|
||||||
|
<P><B>NOTE:</B> While the game is in early development, all characters
|
||||||
|
and events are OOC. When the starmap is done, basic system management,
|
||||||
|
and basic combat are done, all existing characters will be deleted and
|
||||||
|
the game will open for playing IC.
|
||||||
|
|
||||||
|
<P>Certain character features (race, skills, starting empire) are not
|
||||||
|
fully implemented yet, so they will be set with default values for now.
|
||||||
|
Once the game goes IC, these features will be selectable during the
|
||||||
|
character creation process.
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
require($_SERVER['DOCUMENT_ROOT'].'/include.php');
|
||||||
|
|
||||||
|
echo "<FORM ACTION=\"chargen2.php\" METHOD=\"POST\">
|
||||||
|
<P>Character Name: <INPUT TYPE=\"TEXTBOX\" NAME=\"name\"><BR>
|
||||||
|
<P><INPUT TYPE=\"SUBMIT\" VALUE=\"Create Character\"></FORM>";
|
||||||
|
|
||||||
|
echo $footer;
|
||||||
|
|
||||||
|
mysqli_close($mysqli);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</BODY></HTML>
|
||||||
70
website/chargen2.php
Normal file
70
website/chargen2.php
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
require($_SERVER['DOCUMENT_ROOT'].'/include.php');
|
||||||
|
|
||||||
|
$player_id = $_SESSION['id'];
|
||||||
|
$name = $_POST['name'];
|
||||||
|
|
||||||
|
$date = date('Y-m-d H:i');
|
||||||
|
|
||||||
|
if ($name != '')
|
||||||
|
{ // Form filled out completely
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM `character` WHERE `name` = '$name'";
|
||||||
|
|
||||||
|
$result = mysqli_query($mysqli, $sql) or die($gameerror . "NC-Q01");
|
||||||
|
|
||||||
|
$num = mysqli_num_rows($result);
|
||||||
|
|
||||||
|
if ($num == 0)
|
||||||
|
{ // Character name is unique
|
||||||
|
|
||||||
|
$sql = "INSERT INTO `character` SET
|
||||||
|
`player_id` = '$player_id',
|
||||||
|
`name` = '$name',
|
||||||
|
`active` = '1',
|
||||||
|
`chargen_step` = '0',
|
||||||
|
`heritage` = '2',
|
||||||
|
`faction` = '2',
|
||||||
|
`location` = '1',
|
||||||
|
`last_date` = '$date',
|
||||||
|
`credits` = '100',
|
||||||
|
`time` = '8',
|
||||||
|
`skill_leadership` = '50',
|
||||||
|
`skill_bureaucracy` = '50',
|
||||||
|
`skill_tactics` = '50',
|
||||||
|
`skill_negotiation` = '50',
|
||||||
|
`status` = '0'";
|
||||||
|
|
||||||
|
mysqli_query($mysqli, $sql) or die($gameerror . "NC-Q02");
|
||||||
|
|
||||||
|
header("Location: $gameroot/playuser.php");
|
||||||
|
|
||||||
|
} else { // Username is not unique
|
||||||
|
|
||||||
|
echo "<HTML><BODY BGCOLOR=\"#000000\" TEXT=\"#f0f0f0\">
|
||||||
|
<H2 ALIGN=\"CENTER\">Frontier II</H2>
|
||||||
|
<H3 ALIGN=\"CENTER\">Character Creation</H3>
|
||||||
|
<P><FONT COLOR=\"RED\">Error!</FONT> That name
|
||||||
|
seems to be taken already. Please
|
||||||
|
<A HREF=\"$gameroot/chargen.php\">try again</A>.
|
||||||
|
</BODY></HTML>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { // Form not filled out completely
|
||||||
|
|
||||||
|
echo "<HTML><BODY BGCOLOR=\"#000000\" TEXT=\"#f0f0f0\">
|
||||||
|
<H2 ALIGN=\"CENTER\">Frontier II</H2>
|
||||||
|
<H3 ALIGN=\"CENTER\">Character Creation</H3>
|
||||||
|
<P><FONT COLOR=\"RED\">Error!</FONT> Either you didn't
|
||||||
|
fill something in right, or you left something blank. Please
|
||||||
|
<A HREF=\"$gameroot/chargen.php\">try again</A>.
|
||||||
|
</BODY></HTML>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
mysqli_close($mysqli);
|
||||||
|
|
||||||
|
?>
|
||||||
59
website/edituser.php
Normal file
59
website/edituser.php
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
<HTML><HEAD>
|
||||||
|
<TITLE>Frontier II - Edit Settings</TITLE>
|
||||||
|
</HEAD><BODY BGCOLOR="#000000" TEXT="#f0f0f0">
|
||||||
|
<H2 ALIGN="CENTER">Frontier II</H2>
|
||||||
|
<H3 ALIGN="CENTER">Edit Player Settings</H3>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
require($_SERVER['DOCUMENT_ROOT'].'/include.php');
|
||||||
|
|
||||||
|
if ($_SESSION['id'] != '')
|
||||||
|
{ // Logged in
|
||||||
|
|
||||||
|
$player_id = $_SESSION['id'];
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM player WHERE id = '$player_id'";
|
||||||
|
$result = mysqli_query($mysqli, $sql) or die($gameerror . "EU-Q01");
|
||||||
|
$row = mysqli_fetch_assoc($result);
|
||||||
|
|
||||||
|
$player_name = $row['name'];
|
||||||
|
$player_nick = $row['nick'];
|
||||||
|
$player_create_date = $row['create_date'];
|
||||||
|
$player_safe_email = $row['safe_email'];
|
||||||
|
$player_pub_email = $row['pub_email'];
|
||||||
|
$player_country_id = $row['country_id'];
|
||||||
|
$player_tz_id = $row['tz_id'];
|
||||||
|
$player_note = $row['note'];
|
||||||
|
|
||||||
|
echo "<P>Real Name: $player_name<BR>
|
||||||
|
Username: $player_nick<BR>
|
||||||
|
Created: $player_create_date
|
||||||
|
|
||||||
|
<P><FORM ACTION=\"password.php\" METHOD=\"POST\">
|
||||||
|
To change your password, enter your current password, and then
|
||||||
|
your new password twice.<BR>
|
||||||
|
Old Password: <INPUT TYPE=\"PASSWORD\" NAME=\"oldpass\"><BR>
|
||||||
|
New Password: <INPUT TYPE=\"PASSWORD\" NAME=\"newpass1\"><BR>
|
||||||
|
Confirm New: <INPUT TYPE=\"PASSWORD\" NAME=\"newpass2\"><BR>
|
||||||
|
<INPUT TYPE=\"SUBMIT\" VALUE=\"Change Password\"></FORM>
|
||||||
|
|
||||||
|
<P><FORM ACTION=\"saveuser.php\" METHOD=\"POST\">
|
||||||
|
Registered Email: <INPUT TYPE=\"TEXTBOX\" NAME=\"safe_email\" VALUE=\"$player_safe_email\"><BR>
|
||||||
|
Public Email: <INPUT TYPE=\"TEXTBOX\" NAME=\"pub_email\" VALUE=\"$player_pub_email\"> (optional)<BR>
|
||||||
|
Country: $player_country_id (not available)<BR>
|
||||||
|
Timezone: $player_tz_id (not available)<BR>
|
||||||
|
Comments: <INPUT TYPE=\"TEXTAREA\" NAME=\"note\" VALUE=\"$player_note\"><BR>
|
||||||
|
<INPUT TYPE=\"SUBMIT\" VALUE=\"Save Changes\"></FORM>
|
||||||
|
";
|
||||||
|
|
||||||
|
} else { echo $gameseserr; } // Not logged in
|
||||||
|
|
||||||
|
mysqli_close($mysqli);
|
||||||
|
|
||||||
|
echo $footer;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</BODY></HTML>
|
||||||
BIN
website/favicon.ico
Normal file
BIN
website/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
website/frontier.jpg
Normal file
BIN
website/frontier.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
Loading…
Reference in a new issue