mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-24 05:37:46 +00:00
Added login site.
This commit is contained in:
parent
0876b293e8
commit
94db8336df
20 changed files with 2362 additions and 0 deletions
13
www/config.php
Normal file
13
www/config.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$db_server = "localhost";
|
||||||
|
$db_username = "root";
|
||||||
|
$db_password = "";
|
||||||
|
$db_database = "ffxiv_server";
|
||||||
|
|
||||||
|
$recaptcha_publickey = "";
|
||||||
|
$recaptcha_privatekey = "";
|
||||||
|
|
||||||
|
if(!defined('FFXIV_SESSION_LENGTH')) define('FFXIV_SESSION_LENGTH', 24); //Session length in hours
|
||||||
|
|
||||||
|
?>
|
50
www/control_panel.php
Normal file
50
www/control_panel.php
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
include("database.php");
|
||||||
|
include("control_panel_common.php");
|
||||||
|
|
||||||
|
$g_userCharacters = GetUserCharacters($g_databaseConnection, $g_userId);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Seventh Umbral Server</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include("control_panel_header.php"); ?>
|
||||||
|
<p>
|
||||||
|
<div class="edit">
|
||||||
|
<h2>Characters</h2>
|
||||||
|
<br />
|
||||||
|
<table class="editForm">
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
foreach($g_userCharacters as $character)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $character["name"]; ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="control_panel_edit_character.php?id=<?php echo $character["id"]; ?>">
|
||||||
|
Edit
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
20
www/control_panel_common.php
Normal file
20
www/control_panel_common.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(!isset($_COOKIE["sessionId"]))
|
||||||
|
{
|
||||||
|
header("Location: control_panel_login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$g_sessionId = $_COOKIE["sessionId"];
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$g_userId = GetUserIdFromSession($g_databaseConnection, $g_sessionId);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
header("Location: control_panel_login.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
551
www/control_panel_edit_character.php
Normal file
551
www/control_panel_edit_character.php
Normal file
|
@ -0,0 +1,551 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
include("database.php");
|
||||||
|
include("control_panel_common.php");
|
||||||
|
|
||||||
|
if(!isset($_GET["id"]))
|
||||||
|
{
|
||||||
|
header("Location: control_panel.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$g_characterId = $_GET["id"];
|
||||||
|
|
||||||
|
$g_tribes = array(
|
||||||
|
1 => "Hyur Midlander Male",
|
||||||
|
2 => "Hyur Midlander Female",
|
||||||
|
3 => "Hyur Highlander Male",
|
||||||
|
4 => "Elezen Wildwood Male",
|
||||||
|
5 => "Elezen Wildwood Female",
|
||||||
|
6 => "Elezen Duskwight Male",
|
||||||
|
7 => "Elezen Duskwight Female",
|
||||||
|
8 => "Lalafell Plainsfolk Male",
|
||||||
|
9 => "Lalafell Plainsfolk Female",
|
||||||
|
10 => "Lalafell Dunesfolk Male",
|
||||||
|
11 => "Lalafell Dunesfolk Female",
|
||||||
|
12 => "Miqo'te Seeker of the Sun Female",
|
||||||
|
13 => "Miqo'te Keeper of the Moon Female",
|
||||||
|
14 => "Roegadyn Sea Wolf Male",
|
||||||
|
15 => "Roegadyn Hellsguard Male"
|
||||||
|
);
|
||||||
|
|
||||||
|
$g_guardians = array(
|
||||||
|
1 => "Halone, the Fury",
|
||||||
|
2 => "Menphina, the Lover",
|
||||||
|
3 => "Thaliak, the Scholar",
|
||||||
|
4 => "Nymeia, the Spinner",
|
||||||
|
5 => "Llymlaen, the Navigator",
|
||||||
|
6 => "Oschon, the Wanderer",
|
||||||
|
7 => "Byregot, the Builder",
|
||||||
|
8 => "Rhalgr, the Destroyer",
|
||||||
|
9 => "Azeyma, the Warden",
|
||||||
|
10 => "Nald'thal, the Traders",
|
||||||
|
11 => "Nophica, the Matron",
|
||||||
|
12 => "Althyk, the Keeper"
|
||||||
|
);
|
||||||
|
|
||||||
|
$g_allegiances = array(
|
||||||
|
1 => "Limsa Lominsa",
|
||||||
|
2 => "Gridania",
|
||||||
|
3 => "Ul'dah",
|
||||||
|
);
|
||||||
|
|
||||||
|
$g_htmlToDbFieldMapping = array(
|
||||||
|
"characterName" => "name",
|
||||||
|
"characterTribe" => "tribe",
|
||||||
|
"characterSize" => "size",
|
||||||
|
"characterVoice" => "voice",
|
||||||
|
"characterSkinColor" => "skinColor",
|
||||||
|
"characterHairStyle" => "hairStyle",
|
||||||
|
"characterHairColor" => "hairColor",
|
||||||
|
"characterHairOption" => "hairOption",
|
||||||
|
"characterEyeColor" => "eyeColor",
|
||||||
|
"characterFaceType" => "faceType",
|
||||||
|
"characterFaceBrow" => "faceBrow",
|
||||||
|
"characterFaceEye" => "faceEye",
|
||||||
|
"characterFaceIris" => "faceIris",
|
||||||
|
"characterFaceNose" => "faceNose",
|
||||||
|
"characterFaceMouth" => "faceMouth",
|
||||||
|
"characterFaceJaw" => "faceJaw",
|
||||||
|
"characterFaceCheek" => "faceCheek",
|
||||||
|
"characterFaceOption1" => "faceOption1",
|
||||||
|
"characterFaceOption2" => "faceOption2",
|
||||||
|
"characterGuardian" => "guardian",
|
||||||
|
"characterBirthMonth" => "birthMonth",
|
||||||
|
"characterBirthDay" => "birthDay",
|
||||||
|
"characterAllegiance" => "allegiance",
|
||||||
|
"characterWeapon1" => "weapon1",
|
||||||
|
"characterWeapon2" => "weapon2",
|
||||||
|
"characterHeadGear" => "headGear",
|
||||||
|
"characterBodyGear" => "bodyGear",
|
||||||
|
"characterLegsGear" => "legsGear",
|
||||||
|
"characterHandsGear" => "handsGear",
|
||||||
|
"characterFeetGear" => "feetGear",
|
||||||
|
"characterWaistGear" => "waistGear",
|
||||||
|
"characterRightEarGear" => "rightEarGear",
|
||||||
|
"characterLeftEarGear" => "leftEarGear",
|
||||||
|
"characterRightFingerGear" => "rightFingerGear",
|
||||||
|
"characterLeftFingerGear" => "leftFingerGear"
|
||||||
|
);
|
||||||
|
|
||||||
|
function SaveCharacter($databaseConnection, $htmlFieldMapping, $characterId)
|
||||||
|
{
|
||||||
|
$characterInfo = array();
|
||||||
|
foreach($htmlFieldMapping as $htmlFieldName => $dbFieldName)
|
||||||
|
{
|
||||||
|
$characterInfo[$dbFieldName] = $_POST[$htmlFieldName];
|
||||||
|
}
|
||||||
|
UpdateCharacterInfo($databaseConnection, $characterId, $characterInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GenerateTextField($characterInfo, $htmlFieldMapping, $htmlFieldName, $fieldMaxLength = null)
|
||||||
|
{
|
||||||
|
$inputMaxLength = ($fieldMaxLength === null) ? "" : sprintf("maxlength=\"%d\"", $fieldMaxLength);
|
||||||
|
return sprintf("<input id=\"%s\" name=\"%s\" type=\"text\" value=\"%s\" %s />",
|
||||||
|
$htmlFieldName, $htmlFieldName, $characterInfo[$htmlFieldMapping[$htmlFieldName]], $inputMaxLength);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GenerateSelectField($characterInfo, $htmlFieldMapping, $htmlFieldOptions, $htmlFieldName)
|
||||||
|
{
|
||||||
|
$dbFieldName = $htmlFieldMapping[$htmlFieldName];
|
||||||
|
$htmlText = sprintf("<select id=\"%s\" name=\"%s\">\n",
|
||||||
|
$htmlFieldName, $htmlFieldName);
|
||||||
|
foreach($htmlFieldOptions as $optionId => $optionName)
|
||||||
|
{
|
||||||
|
$htmlText .= sprintf("<option value=\"%d\" %s>%s</option>\n",
|
||||||
|
$optionId,
|
||||||
|
($optionId === (int)$characterInfo[$dbFieldName]) ? "selected" : "",
|
||||||
|
$optionName);
|
||||||
|
}
|
||||||
|
$htmlText .= "</select>\n";
|
||||||
|
return $htmlText;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_POST["cancel"]))
|
||||||
|
{
|
||||||
|
header("Location: control_panel.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($_POST["save"]))
|
||||||
|
{
|
||||||
|
SaveCharacter($g_databaseConnection, $g_htmlToDbFieldMapping, $g_characterId);
|
||||||
|
header("Location: control_panel.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$g_characterInfo = GetCharacterInfo($g_databaseConnection, $g_userId, $g_characterId);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
header("Location: control_panel.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Seventh Umbral Server</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
<script type="application/ecmascript">
|
||||||
|
|
||||||
|
var weaponPresets = <?php echo require_once("presets_weapon.json"); ?>;
|
||||||
|
var armorPresets = <?php echo require_once("presets_armor.json"); ?>;
|
||||||
|
|
||||||
|
function loadPresetsInSelect(presets, selectName)
|
||||||
|
{
|
||||||
|
var select = document.getElementById(selectName);
|
||||||
|
for(var presetId in presets)
|
||||||
|
{
|
||||||
|
var el = document.createElement("option");
|
||||||
|
var preset = presets[presetId];
|
||||||
|
el.textContent = preset.name;
|
||||||
|
el.value = presetId;
|
||||||
|
select.appendChild(el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function()
|
||||||
|
{
|
||||||
|
loadPresetsInSelect(weaponPresets, "weaponPresets");
|
||||||
|
loadPresetsInSelect(armorPresets, "armorPresets");
|
||||||
|
}
|
||||||
|
|
||||||
|
function byteArrayToString(byteArray)
|
||||||
|
{
|
||||||
|
var i, str = '';
|
||||||
|
for(i = 0; i < byteArray.length; i++)
|
||||||
|
{
|
||||||
|
str += String.fromCharCode(byteArray[i]);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function decodeCharacterFile(inputArrayBuffer)
|
||||||
|
{
|
||||||
|
var outputArrayBuffer = new ArrayBuffer(inputArrayBuffer.byteLength);
|
||||||
|
var inputDataView = new DataView(inputArrayBuffer);
|
||||||
|
var outputDataView = new DataView(outputArrayBuffer);
|
||||||
|
for(var i = 0; i < inputDataView.byteLength; i++)
|
||||||
|
{
|
||||||
|
outputDataView.setUint8(i, inputDataView.getUint8(i) ^ 0x73);
|
||||||
|
}
|
||||||
|
return outputArrayBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCharacterAttributesFromString(characterFileString)
|
||||||
|
{
|
||||||
|
var lineArray = characterFileString.split('\n');
|
||||||
|
lineArray = lineArray.filter(function(str) { return str != ''; });
|
||||||
|
var characterAttributes = [];
|
||||||
|
for(var i = 0; i < lineArray.length; i++)
|
||||||
|
{
|
||||||
|
var attributeLine = lineArray[i];
|
||||||
|
attributeItems = attributeLine.split(',');
|
||||||
|
characterAttributes.push(
|
||||||
|
{
|
||||||
|
"name" : attributeItems[0].trim(),
|
||||||
|
"value" : attributeItems[3].trim()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return characterAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCharacterAttributeValue(attributes, attributeName)
|
||||||
|
{
|
||||||
|
for(var i = 0; i < attributes.length; i++)
|
||||||
|
{
|
||||||
|
var attribute = attributes[i];
|
||||||
|
if(attribute.name === attributeName)
|
||||||
|
{
|
||||||
|
return attribute.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onImportAppearanceFileReaderLoad(evt)
|
||||||
|
{
|
||||||
|
var decodedCharacterFileArray = decodeCharacterFile(evt.target.result);
|
||||||
|
var decodedCharacterFileString = byteArrayToString(new Uint8Array(decodedCharacterFileArray));
|
||||||
|
var characterAttributes = getCharacterAttributesFromString(decodedCharacterFileString);
|
||||||
|
var fieldAssociations =
|
||||||
|
[
|
||||||
|
[ 'characterSize', 'appearancetype_size' ],
|
||||||
|
[ 'characterVoice', 'appearancetype_voice' ],
|
||||||
|
[ 'characterSkinColor', 'appearancetype_skin' ],
|
||||||
|
[ 'characterHairStyle', 'appearancetype_hairstyle' ],
|
||||||
|
|
||||||
|
[ 'characterHairColor', 'appearancetype_haircolor' ],
|
||||||
|
[ 'characterHairOption', 'appearancetype_hairoption2' ],
|
||||||
|
[ 'characterEyeColor', 'appearancetype_eyecolor' ],
|
||||||
|
[ 'characterFaceType', 'appearancetype_facetype' ],
|
||||||
|
|
||||||
|
[ 'characterFaceBrow', 'appearancetype_facebrow' ],
|
||||||
|
[ 'characterFaceEye', 'appearancetype_faceeye' ],
|
||||||
|
[ 'characterFaceIris', 'appearancetype_faceiris' ],
|
||||||
|
[ 'characterFaceNose', 'appearancetype_facenose' ],
|
||||||
|
|
||||||
|
[ 'characterFaceMouth', 'appearancetype_facemouth' ],
|
||||||
|
[ 'characterFaceJaw', 'appearancetype_facejaw_special' ],
|
||||||
|
[ 'characterFaceCheek', 'appearancetype_facecheek' ],
|
||||||
|
[ 'characterFaceOption1', 'appearancetype_faceoption1' ],
|
||||||
|
|
||||||
|
[ 'characterFaceOption2', 'appearancetype_faceoption2' ],
|
||||||
|
];
|
||||||
|
var characterTribe = getCharacterAttributeValue(characterAttributes, "rsc_tribe");
|
||||||
|
var characterTribeSelect = document.getElementById('characterTribe');
|
||||||
|
for(var i = 0; i < characterTribeSelect.length; i++)
|
||||||
|
{
|
||||||
|
var characterTribeSelectItem = characterTribeSelect[i];
|
||||||
|
characterTribeSelectItem.selected = characterTribeSelectItem.value === characterTribe;
|
||||||
|
}
|
||||||
|
for(var i = 0; i < fieldAssociations.length; i++)
|
||||||
|
{
|
||||||
|
var fieldAssociation = fieldAssociations[i];
|
||||||
|
var attributeValue = getCharacterAttributeValue(characterAttributes, fieldAssociation[1]);
|
||||||
|
document.getElementById(fieldAssociation[0]).value = attributeValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function importAppearanceFromFile(evt)
|
||||||
|
{
|
||||||
|
var file = evt.target.files[0];
|
||||||
|
var fileReader = new FileReader();
|
||||||
|
fileReader.readAsArrayBuffer(file);
|
||||||
|
fileReader.onload = onImportAppearanceFileReaderLoad;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onEquipWeaponPreset()
|
||||||
|
{
|
||||||
|
var select = document.getElementById("weaponPresets");
|
||||||
|
|
||||||
|
var weapon1Field = document.getElementById("characterWeapon1");
|
||||||
|
var weapon2Field = document.getElementById("characterWeapon2");
|
||||||
|
|
||||||
|
var preset = weaponPresets[select.value];
|
||||||
|
weapon1Field.value = preset.weapon1;
|
||||||
|
weapon2Field.value = preset.weapon2;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onEquipArmorPreset()
|
||||||
|
{
|
||||||
|
var select = document.getElementById("armorPresets");
|
||||||
|
|
||||||
|
var headGearField = document.getElementById("characterHeadGear");
|
||||||
|
var bodyGearField = document.getElementById("characterBodyGear");
|
||||||
|
var legsGearField = document.getElementById("characterLegsGear");
|
||||||
|
var handsGearField = document.getElementById("characterHandsGear");
|
||||||
|
var feetGearField = document.getElementById("characterFeetGear");
|
||||||
|
var waistGearField = document.getElementById("characterWaistGear");
|
||||||
|
|
||||||
|
var preset = armorPresets[select.value];
|
||||||
|
headGearField.value = preset.headGear;
|
||||||
|
bodyGearField.value = preset.bodyGear;
|
||||||
|
legsGearField.value = preset.legsGear;
|
||||||
|
handsGearField.value = preset.handsGear;
|
||||||
|
feetGearField.value = preset.feetGear;
|
||||||
|
waistGearField.value = preset.waistGear;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleDisplay(elementName)
|
||||||
|
{
|
||||||
|
var element = document.getElementById(elementName);
|
||||||
|
if(element.style.display === 'none')
|
||||||
|
{
|
||||||
|
element.style.display = '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php include("header.php"); ?>
|
||||||
|
<?php include("control_panel_header.php"); ?>
|
||||||
|
<div class="edit">
|
||||||
|
<h2>Edit Character (<a href="#" onclick="toggleDisplay('guideDiv');">Help</a>)</h2>
|
||||||
|
<div id="guideDiv" style="background-color: white; display: none;">
|
||||||
|
<h3>General Notes</h3>
|
||||||
|
<p style="text-align: left">
|
||||||
|
All values here are editable, so change them at your own risk. Just keep in mind that
|
||||||
|
you can always import an appearance from a character creation data file and equip presetted
|
||||||
|
equipment to reset your character.
|
||||||
|
</p>
|
||||||
|
<h3>Import Appearance</h3>
|
||||||
|
<p style="text-align: left">
|
||||||
|
Use this to import a character creation data file. Those files
|
||||||
|
are created by the client when saving character creation data in the character creation
|
||||||
|
mode, just before selecting the server on which the character will be created. They are usually
|
||||||
|
located in the "C:\Users\{Username}\Documents\My Games\FINAL FANTASY XIV\user\00000000" folder
|
||||||
|
and have a '.CMB' extension.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<form method="post" autocomplete="off">
|
||||||
|
<table class="editForm">
|
||||||
|
<tr>
|
||||||
|
<th colspan="4">General Information</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">Name:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterName", 20); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guardian:</td>
|
||||||
|
<td>Birth Month:</td>
|
||||||
|
<td>Birth Day:</td>
|
||||||
|
<td>Allegiance:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateSelectField($g_characterInfo, $g_htmlToDbFieldMapping, $g_guardians, "characterGuardian"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterBirthMonth"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterBirthDay"); ?></td>
|
||||||
|
<td><?php echo GenerateSelectField($g_characterInfo, $g_htmlToDbFieldMapping, $g_allegiances, "characterAllegiance"); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
<hr />
|
||||||
|
<table class="editForm">
|
||||||
|
<tr>
|
||||||
|
<th colspan="4">Appearance</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">Tribe:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><?php echo GenerateSelectField($g_characterInfo, $g_htmlToDbFieldMapping, $g_tribes, "characterTribe"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Size:</td>
|
||||||
|
<td>Voice:</td>
|
||||||
|
<td>Skin Color:</td>
|
||||||
|
<td>Hair Style:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterSize"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterVoice"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterSkinColor"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterHairStyle"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Hair Color:</td>
|
||||||
|
<td>Hair Option:</td>
|
||||||
|
<td>Eye Color:</td>
|
||||||
|
<td>Face Type:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterHairColor"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterHairOption"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterEyeColor"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceType"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Face Brow:</td>
|
||||||
|
<td>Face Eye:</td>
|
||||||
|
<td>Face Iris:</td>
|
||||||
|
<td>Face Nose:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceBrow"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceEye"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceIris"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceNose"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Face Mouth:</td>
|
||||||
|
<td>Face Jaw:</td>
|
||||||
|
<td>Face Cheek:</td>
|
||||||
|
<td>Face Option 1:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceMouth"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceJaw"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceCheek"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceOption1"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Face Option 2:</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFaceOption2"); ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<script>
|
||||||
|
function onImportAppearanceButtonClick()
|
||||||
|
{
|
||||||
|
document.getElementById('importAppearance').click();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<input type="file" id="importAppearance" style="display: none;">
|
||||||
|
<button onclick="onImportAppearanceButtonClick(); return false;">Import Appearance</button>
|
||||||
|
<script>
|
||||||
|
document.getElementById('importAppearance').addEventListener('change', importAppearanceFromFile, false);
|
||||||
|
</script>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
<hr />
|
||||||
|
<table class="editForm">
|
||||||
|
<tr>
|
||||||
|
<th colspan="4">Gear</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Weapon 1:</td>
|
||||||
|
<td>Weapon 2:</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterWeapon1"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterWeapon2"); ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Head Gear:</td>
|
||||||
|
<td>Body Gear:</td>
|
||||||
|
<td>Legs Gear:</td>
|
||||||
|
<td>Hands Gear:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterHeadGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterBodyGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterLegsGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterHandsGear"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Feet Gear:</td>
|
||||||
|
<td>Waist Gear:</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterFeetGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterWaistGear"); ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Right Ear Gear:</td>
|
||||||
|
<td>Left Ear Gear:</td>
|
||||||
|
<td>Right Finger Gear:</td>
|
||||||
|
<td>Left Finger Gear:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterRightEarGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterLeftEarGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterRightFingerGear"); ?></td>
|
||||||
|
<td><?php echo GenerateTextField($g_characterInfo, $g_htmlToDbFieldMapping, "characterLeftFingerGear"); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">Weapon Presets:</td>
|
||||||
|
<td colspan="2">Armor Presets:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<select id="weaponPresets"></select>
|
||||||
|
<button onclick="onEquipWeaponPreset(); return false;">Equip</button>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">
|
||||||
|
<select id="armorPresets"></select>
|
||||||
|
<button onclick="onEquipArmorPreset(); return false;">Equip</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
<hr />
|
||||||
|
<table class="infoForm">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="submit" name="save" value="Save" />
|
||||||
|
<input type="submit" name="cancel" value="Cancel" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
8
www/control_panel_header.php
Normal file
8
www/control_panel_header.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$g_userInfo = GetUserInfo($g_databaseConnection, $g_userId);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
Welcome, <?php echo($g_userInfo["name"]); ?>. <a href="control_panel_logout.php">(Logout)</a>
|
||||||
|
</p>
|
81
www/control_panel_login.php
Normal file
81
www/control_panel_login.php
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
include("database.php");
|
||||||
|
|
||||||
|
function LoginPage_Login($dataConnection)
|
||||||
|
{
|
||||||
|
$username = trim($_POST["username"]);
|
||||||
|
$password = trim($_POST["password"]);
|
||||||
|
|
||||||
|
if(empty($username))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter an username.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($password))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter a password.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$userId = VerifyUser($dataConnection, $username, $password);
|
||||||
|
return RefreshOrCreateSession($dataConnection, $userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$loginError = "";
|
||||||
|
$sessionId = "";
|
||||||
|
|
||||||
|
if(isset($_POST["login"]))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$sessionId = LoginPage_Login($g_databaseConnection);
|
||||||
|
setcookie("sessionId", $sessionId);
|
||||||
|
header("Location: control_panel.php");
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
$loginError = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Seventh Umbral Server</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php include("header.php"); ?>
|
||||||
|
<div class="info">
|
||||||
|
<h2>Login</h2>
|
||||||
|
<br />
|
||||||
|
<form method="post" autocomplete="off">
|
||||||
|
<table class="infoForm">
|
||||||
|
<tr>
|
||||||
|
<td>Username:</td>
|
||||||
|
<td><input type="text" name="username" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Password:</td>
|
||||||
|
<td><input type="password" name="password" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<input type="submit" name="login" value="Login" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<p class="errorMessage"><?php echo($loginError); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="infoFooter">
|
||||||
|
<a href="create_user.php">Create User</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
6
www/control_panel_logout.php
Normal file
6
www/control_panel_logout.php
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
setcookie("sessionId", "");
|
||||||
|
header("Location: control_panel_login.php");
|
||||||
|
|
||||||
|
?>
|
109
www/create_user.php
Normal file
109
www/create_user.php
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
include("database.php");
|
||||||
|
//require_once("recaptchalib.php");
|
||||||
|
|
||||||
|
function IsUsingSSL()
|
||||||
|
{
|
||||||
|
return ($_SERVER['SERVER_PORT'] == 443);
|
||||||
|
}
|
||||||
|
|
||||||
|
function CreateUserPage_CreateUser($databaseConnection)
|
||||||
|
{
|
||||||
|
$username = trim($_POST["username"]);
|
||||||
|
$password = trim($_POST["password"]);
|
||||||
|
$repeatPassword = trim($_POST["repeatPassword"]);
|
||||||
|
$email = trim($_POST["email"]);
|
||||||
|
|
||||||
|
if(empty($username))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter an username.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($password))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter a password.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if($password !== $repeatPassword)
|
||||||
|
{
|
||||||
|
throw new Exception("Repeated password doesn't match with entered password.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter a valid e-mail address.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$salt = GenerateRandomSha224();
|
||||||
|
$saltedPassword = $password . $salt;
|
||||||
|
$hashedPassword = hash("sha224", $saltedPassword);
|
||||||
|
|
||||||
|
InsertUser($databaseConnection, $username, $hashedPassword, $salt, $email);
|
||||||
|
}
|
||||||
|
|
||||||
|
$createUserError = "";
|
||||||
|
$enteredUserName = "";
|
||||||
|
$enteredEmail = "";
|
||||||
|
|
||||||
|
if(isset($_POST["createUser"]))
|
||||||
|
{
|
||||||
|
$enteredUserName = $_POST["username"];
|
||||||
|
$enteredEmail = $_POST["email"];
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
CreateUserPage_CreateUser($g_databaseConnection);
|
||||||
|
header("Location: create_user_success.php");
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
$createUserError = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>Seventh Umbral Server</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php include("header.php"); ?>
|
||||||
|
<div class="info">
|
||||||
|
<h2>Create New User</h2>
|
||||||
|
<br />
|
||||||
|
<form method="post" autocomplete="off">
|
||||||
|
<table class="infoForm">
|
||||||
|
<tr>
|
||||||
|
<td>Username:</td>
|
||||||
|
<td><input type="text" name="username" value="<?php echo $enteredUserName; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Password:</td>
|
||||||
|
<td><input type="password" name="password" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Repeat Password:</td>
|
||||||
|
<td><input type="password" name="repeatPassword" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>E-mail Address:</td>
|
||||||
|
<td><input type="text" name="email" value="<?php echo $enteredEmail; ?>" /></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<input type="submit" name="createUser" value="Create User" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<p class="errorMessage"><?php echo($createUserError); ?></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
25
www/create_user_success.php
Normal file
25
www/create_user_success.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
include("config.php");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>Seventh Umbral Server</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php include("header.php"); ?>
|
||||||
|
<div class="info">
|
||||||
|
<p>
|
||||||
|
User created successfully.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
You may now use the Seventh Umbral Launcher to login and connect to this server.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="control_panel_login.php">Login to the User Control Panel</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
158
www/css/global.css
Normal file
158
www/css/global.css
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Verdana;
|
||||||
|
font-size: 10pt;
|
||||||
|
line-height: 14pt;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.contentContainer {
|
||||||
|
width: 50%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.info
|
||||||
|
{
|
||||||
|
width: 320px;
|
||||||
|
height: 100%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: lightgrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.infoFooter
|
||||||
|
{
|
||||||
|
width: 400px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
text-align: right;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.edit
|
||||||
|
{
|
||||||
|
width: 50%;
|
||||||
|
min-width: 600px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: lightgrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.inner
|
||||||
|
{
|
||||||
|
position: relative;
|
||||||
|
max-width: 1250px;
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
line-height: 23px;
|
||||||
|
font-size: 23px;
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2
|
||||||
|
{
|
||||||
|
line-height: 17px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3
|
||||||
|
{
|
||||||
|
line-height: 14px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header.top
|
||||||
|
{
|
||||||
|
padding: 20px 0px;
|
||||||
|
background: none repeat scroll 0% 0% lavender;
|
||||||
|
position: relative;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.center
|
||||||
|
{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.infoForm
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.editForm
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.editForm input
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.editForm select
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
td
|
||||||
|
{
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th
|
||||||
|
{
|
||||||
|
padding: 3px;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.errorMessage
|
||||||
|
{
|
||||||
|
color: darkred;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.pageTitle
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.pageTitle a
|
||||||
|
{
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.pageSubTitle
|
||||||
|
{
|
||||||
|
font-size: 10px;
|
||||||
|
line-height: 18px;
|
||||||
|
padding: 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#recaptcha_area
|
||||||
|
{
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
48
www/css/reset.css
Normal file
48
www/css/reset.css
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/* http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
v2.0 | 20110126
|
||||||
|
License: none (public domain)
|
||||||
|
*/
|
||||||
|
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
388
www/database.php
Normal file
388
www/database.php
Normal file
|
@ -0,0 +1,388 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_STRICT);
|
||||||
|
|
||||||
|
function CreateDatabaseConnection($server, $username, $password, $database)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$dataConnection = new mysqli($server, $username, $password);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
die("Error while connecting to the database");
|
||||||
|
}
|
||||||
|
|
||||||
|
$dataConnection->select_db($database);
|
||||||
|
$dataConnection->query("SET NAMES 'utf8'");
|
||||||
|
|
||||||
|
return $dataConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
$g_databaseConnection = CreateDatabaseConnection($db_server, $db_username, $db_password, $db_database);
|
||||||
|
|
||||||
|
function GenerateRandomSha224()
|
||||||
|
{
|
||||||
|
mt_srand(microtime(true) * 100000 + memory_get_usage(true));
|
||||||
|
return hash("sha224", uniqid(mt_rand(), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
function VerifyUser($dataConnection, $username, $password)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("SELECT id, passhash, salt FROM users WHERE name = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('s', $username);
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$statement->bind_result($id, $storedPasshash, $salt);
|
||||||
|
if(!$statement->fetch())
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$saltedPassword = $password . $salt;
|
||||||
|
$hashedPassword = hash("sha224", $saltedPassword);
|
||||||
|
|
||||||
|
if($hashedPassword !== $storedPasshash)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $id;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function InsertUser($dataConnection, $username, $passhash, $salt, $email)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("INSERT INTO users (name, passhash, salt, email) VALUES (?, ?, ?, ?)");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('ssss', $username, $passhash, $salt, $email);
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function RefreshOrCreateSession($dataConnection, $userId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$sessionId = GetSessionFromUserId($dataConnection, $userId);
|
||||||
|
RefreshSession($dataConnection, $sessionId);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
$sessionId = CreateSession($dataConnection, $userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
function CreateSession($dataConnection, $userId)
|
||||||
|
{
|
||||||
|
//Delete any session that might be active
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("DELETE FROM sessions WHERE userId = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to create session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('i', $userId);
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to create session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Create new session
|
||||||
|
{
|
||||||
|
$sessionId = GenerateRandomSha224();
|
||||||
|
|
||||||
|
$statement = $dataConnection->prepare("INSERT INTO sessions (id, userid, expiration) VALUES (?, ?, NOW() + INTERVAL " . FFXIV_SESSION_LENGTH . " HOUR)");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to create session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('si', $sessionId, $userId);
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to create session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sessionId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetSessionFromUserId($dataConnection, $userId)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("SELECT id FROM sessions WHERE userId = ? AND expiration > NOW()");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get session id: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('i', $userId);
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get session id: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$statement->bind_result($sessionId);
|
||||||
|
if(!$statement->fetch())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get session id: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sessionId;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function RefreshSession($dataConnection, $sessionId)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("UPDATE sessions SET expiration = NOW() + INTERVAL " . FFXIV_SESSION_LENGTH . " HOUR WHERE id = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to refresh session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('s', $sessionId);
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to refresh session: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetUserIdFromSession($dataConnection, $sessionId)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("SELECT userId FROM sessions WHERE id = ? AND expiration > NOW()");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Could not get user id.");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('s', $sessionId);
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Could not get user id.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$statement->bind_result($userId);
|
||||||
|
if(!$statement->fetch())
|
||||||
|
{
|
||||||
|
throw new Exception("Could not get user id.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $userId;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetUserInfo($dataConnection, $userId)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("SELECT name FROM users WHERE id = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get user information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('i', $userId);
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get user information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $statement->get_result();
|
||||||
|
if(!$result)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get user information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
if(!$row)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to get user information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetUserCharacters($dataConnection, $userId)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("SELECT id, name FROM characters WHERE userId = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$statement->bind_param('i', $userId);
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $statement->get_result();
|
||||||
|
if(!$result)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$characters = array();
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
if(!$row)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
array_push($characters, $row);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $characters;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetCharacterInfo($dataConnection, $userId, $characterId)
|
||||||
|
{
|
||||||
|
$query = sprintf("SELECT * FROM characters WHERE userId = '%d' AND id = '%d'",
|
||||||
|
$userId, $characterId);
|
||||||
|
$result = $dataConnection->query($query);
|
||||||
|
if(!$result)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
if(!$row)
|
||||||
|
{
|
||||||
|
throw new Exception(__FUNCTION__ . " failed: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
function UpdateCharacterInfo($dataConnection, $characterId, $characterInfo)
|
||||||
|
{
|
||||||
|
$statement = $dataConnection->prepare("UPDATE ffxiv_characters SET
|
||||||
|
name = ?, tribe = ?, size = ?, voice = ?, skinColor = ?, hairStyle = ?, hairColor = ?, hairOption = ?,
|
||||||
|
eyeColor = ?, faceType = ?, faceBrow = ?, faceEye = ?, faceIris = ?, faceNose = ?, faceMouth = ?, faceJaw = ?,
|
||||||
|
faceCheek = ?, faceOption1 = ?, faceOption2 = ?, guardian = ?, birthMonth = ?, birthDay = ?, allegiance = ?,
|
||||||
|
weapon1 = ?, weapon2 = ?, headGear = ?, bodyGear = ?, legsGear = ?, handsGear = ?, feetGear = ?,
|
||||||
|
waistGear = ?, rightEarGear = ?, leftEarGear = ?, rightFingerGear = ?, leftFingerGear = ?
|
||||||
|
WHERE id = ?");
|
||||||
|
if(!$statement)
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to update character information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if(!$statement->bind_param("siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii",
|
||||||
|
$characterInfo["name"], $characterInfo["tribe"], $characterInfo["size"], $characterInfo["voice"],
|
||||||
|
$characterInfo["skinColor"], $characterInfo["hairStyle"], $characterInfo["hairColor"],
|
||||||
|
$characterInfo["hairOption"], $characterInfo["eyeColor"], $characterInfo["faceType"],
|
||||||
|
$characterInfo["faceBrow"], $characterInfo["faceEye"], $characterInfo["faceIris"],
|
||||||
|
$characterInfo["faceNose"], $characterInfo["faceMouth"], $characterInfo["faceJaw"],
|
||||||
|
$characterInfo["faceCheek"], $characterInfo["faceOption1"], $characterInfo["faceOption2"],
|
||||||
|
$characterInfo["guardian"], $characterInfo["birthMonth"], $characterInfo["birthDay"], $characterInfo["allegiance"],
|
||||||
|
$characterInfo["weapon1"], $characterInfo["weapon2"], $characterInfo["headGear"], $characterInfo["bodyGear"],
|
||||||
|
$characterInfo["legsGear"], $characterInfo["handsGear"], $characterInfo["feetGear"],
|
||||||
|
$characterInfo["waistGear"], $characterInfo["rightEarGear"], $characterInfo["leftEarGear"],
|
||||||
|
$characterInfo["rightFingerGear"], $characterInfo["leftFingerGear"],
|
||||||
|
$characterId))
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to update character information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$statement->execute())
|
||||||
|
{
|
||||||
|
throw new Exception("Failed to update character information: " . $dataConnection->error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
$statement->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
BIN
www/favicon.ico
Normal file
BIN
www/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 KiB |
3
www/header.php
Normal file
3
www/header.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<header class="top">
|
||||||
|
|
||||||
|
</header>
|
BIN
www/img/logo.png
Normal file
BIN
www/img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
553
www/index.php
Normal file
553
www/index.php
Normal file
|
@ -0,0 +1,553 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Page créé par Shepard [Fabian Pijcke] <Shepard8@laposte.net>
|
||||||
|
// Arno Esterhuizen <arno.esterhuizen@gmail.com>
|
||||||
|
// et Romain Bourdon <rromain@romainbourdon.com>
|
||||||
|
// et Hervé Leclerc <herve.leclerc@alterway.fr>
|
||||||
|
//
|
||||||
|
// Mise à jour par Herve Leclerc herve.leclerc@alterway.fr
|
||||||
|
// Icônes par Mark James <http://www.famfamfam.com/lab/icons/silk/>
|
||||||
|
//------
|
||||||
|
//[modif oto] Modifications Dominique Ottello (Otomatic)
|
||||||
|
//Suppression des vhosts, le dossier n'étant plus créé à l'installation
|
||||||
|
//Affichage des Outils, Projets et Alias sur trois colonnes
|
||||||
|
// - Recodage en utf-8
|
||||||
|
// - Modification des styles : ajout .third .left et .right
|
||||||
|
// - Ajouts d'index dans $langues['en'] et ['fr'] :
|
||||||
|
// 'locale' pour set_locale
|
||||||
|
// 'docp' url des documentations PHP
|
||||||
|
// 'docm' url des documentations MySQL
|
||||||
|
// 'doca2.2' url de la documentation Apache 2.2
|
||||||
|
// 'doca2.4' url de la documentation Apache 2.4
|
||||||
|
// 'server' Server Software
|
||||||
|
// - Classement alphabétique des extensions PHP en fonction de la localisation
|
||||||
|
// - Liens sur les documentations Apache, PHP et MySQL
|
||||||
|
// - Ajout variable $suppress_localhost = true;
|
||||||
|
// - Conformité W3C par ajout de <li>...</li> sur les variables
|
||||||
|
// $aliasContents et $projectContents si vides
|
||||||
|
|
||||||
|
//[modif oto] - Pour supprimer niveau localhost dans les url
|
||||||
|
$suppress_localhost = true;
|
||||||
|
// avec modification de la ligne
|
||||||
|
//$projectContents .= '<li><a href="'.$file.'">'.$file.'</a></li>';
|
||||||
|
//Par :
|
||||||
|
//$projectContents .= '<li><a href="'.($suppress_localhost ? 'http://' : '').$file.'">'.$file.'</a></li>';
|
||||||
|
//-----
|
||||||
|
//[modif oto] Ajout $server_dir pour un seul remplacement
|
||||||
|
// si déplacement www hors de Wamp et pas d'utilisation des jonctions
|
||||||
|
//Par défaut la valeur est "../"
|
||||||
|
//$server_dir = "WAMPROOT/";
|
||||||
|
$server_dir = "../";
|
||||||
|
//Fonctionne à condition d'avoir ServerSignature On et ServerTokens Full dans httpd.conf
|
||||||
|
$server_software = $_SERVER['SERVER_SOFTWARE'];
|
||||||
|
|
||||||
|
$wampConfFile = $server_dir.'wampmanager.conf';
|
||||||
|
//chemin jusqu'aux fichiers alias
|
||||||
|
$aliasDir = $server_dir.'alias/';
|
||||||
|
|
||||||
|
// on charge le fichier de conf locale
|
||||||
|
if (!is_file($wampConfFile))
|
||||||
|
die ('Unable to open WampServer\'s config file, please change path in index.php file');
|
||||||
|
$fp = fopen($wampConfFile,'r');
|
||||||
|
$wampConfFileContents = fread ($fp, filesize ($wampConfFile));
|
||||||
|
fclose ($fp);
|
||||||
|
|
||||||
|
|
||||||
|
// on récupère les versions des applis
|
||||||
|
preg_match('|phpVersion = (.*)\n|',$wampConfFileContents,$result);
|
||||||
|
$phpVersion = str_replace('"','',$result[1]);
|
||||||
|
preg_match('|apacheVersion = (.*)\n|',$wampConfFileContents,$result);
|
||||||
|
$apacheVersion = str_replace('"','',$result[1]);
|
||||||
|
$doca_version = 'doca'.substr($apacheVersion,0,3);
|
||||||
|
preg_match('|mysqlVersion = (.*)\n|',$wampConfFileContents,$result);
|
||||||
|
$mysqlVersion = str_replace('"','',$result[1]);
|
||||||
|
preg_match('|wampserverVersion = (.*)\n|',$wampConfFileContents,$result);
|
||||||
|
$wampserverVersion = str_replace('"','',$result[1]);
|
||||||
|
|
||||||
|
// répertoires à ignorer dans les projets
|
||||||
|
$projectsListIgnore = array ('.','..');
|
||||||
|
|
||||||
|
// textes
|
||||||
|
$langues = array(
|
||||||
|
'en' => array(
|
||||||
|
'langue' => 'English',
|
||||||
|
'locale' => 'english',
|
||||||
|
'autreLangue' => 'Version Française',
|
||||||
|
'autreLangueLien' => 'fr',
|
||||||
|
'titreHtml' => 'WAMPSERVER Homepage',
|
||||||
|
'titreConf' => 'Server Configuration',
|
||||||
|
'versa' => 'Apache Version :',
|
||||||
|
'doca2.2' => 'httpd.apache.org/docs/2.2/en/',
|
||||||
|
'doca2.4' => 'httpd.apache.org/docs/2.4/en/',
|
||||||
|
'versp' => 'PHP Version :',
|
||||||
|
'server' => 'Server Software:',
|
||||||
|
'docp' => 'www.php.net/manual/en/',
|
||||||
|
'versm' => 'MySQL Version :',
|
||||||
|
'docm' => 'dev.mysql.com/doc/index.html',
|
||||||
|
'phpExt' => 'Loaded Extensions : ',
|
||||||
|
'titrePage' => 'Tools',
|
||||||
|
'txtProjet' => 'Your Projects',
|
||||||
|
'txtNoProjet' => 'No projects yet.<br />To create a new one, just create a directory in \'www\'.',
|
||||||
|
'txtAlias' => 'Your Aliases',
|
||||||
|
'txtNoAlias' => 'No Alias yet.<br />To create a new one, use the WAMPSERVER menu.',
|
||||||
|
'faq' => 'http://www.en.wampserver.com/faq.php'
|
||||||
|
),
|
||||||
|
'fr' => array(
|
||||||
|
'langue' => 'Français',
|
||||||
|
'locale' => 'french',
|
||||||
|
'autreLangue' => 'English Version',
|
||||||
|
'autreLangueLien' => 'en',
|
||||||
|
'titreHtml' => 'Accueil WAMPSERVER',
|
||||||
|
'titreConf' => 'Configuration Serveur',
|
||||||
|
'versa' => 'Version Apache:',
|
||||||
|
'doca2.2' => 'httpd.apache.org/docs/2.2/fr/',
|
||||||
|
'doca2.4' => 'httpd.apache.org/docs/2.4/fr/',
|
||||||
|
'versp' => 'Version de PHP:',
|
||||||
|
'server' => 'Server Software:',
|
||||||
|
'docp' => 'www.php.net/manual/fr/',
|
||||||
|
'versm' => 'Version de MySQL:',
|
||||||
|
'docm' => 'dev.mysql.com/doc/index.html',
|
||||||
|
'phpExt' => 'Extensions Chargées: ',
|
||||||
|
'titrePage' => 'Outils',
|
||||||
|
'txtProjet' => 'Vos Projets',
|
||||||
|
'txtNoProjet' => 'Aucun projet.<br /> Pour en ajouter un nouveau, créez simplement un répertoire dans \'www\'.',
|
||||||
|
'txtAlias' => 'Vos Alias',
|
||||||
|
'txtNoAlias' => 'Aucun alias.<br /> Pour en ajouter un nouveau, utilisez le menu de WAMPSERVER.',
|
||||||
|
'faq' => 'http://www.wampserver.com/faq.php'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// images
|
||||||
|
$pngFolder = <<< EOFILE
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAABhlBMVEX//v7//v3///7//fr//fj+/v3//fb+/fT+/Pf//PX+/Pb+/PP+/PL+/PH+/PD+++/+++7++u/9+vL9+vH79+r79+n79uj89tj89Nf889D88sj78sz78sr58N3u7u7u7ev777j67bL67Kv46sHt6uP26cns6d356aP56aD56Jv45pT45pP45ZD45I324av344r344T14J734oT34YD13pD24Hv03af13pP233X025303JL23nX23nHz2pX23Gvn2a7122fz2I3122T12mLz14Xv1JPy1YD12Vz02Fvy1H7v04T011Py03j011b01k7v0n/x0nHz1Ejv0Hnuz3Xx0Gvz00buzofz00Pxz2juz3Hy0TrmznzmzoHy0Djqy2vtymnxzS3xzi/kyG3jyG7wyyXkwJjpwHLiw2Liw2HhwmDdvlXevVPduVThsX7btDrbsj/gq3DbsDzbrT7brDvaqzjapjrbpTraojnboTrbmzrbmjrbl0Tbljrakz3ajzzZjTfZijLZiTJdVmhqAAAAgnRSTlP///////////////////////////////////////8A////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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AAQQmQuKa/8ekdYMxyLCgmEYMHJXc9t87FNMAgACCGgBxIkgzyDaQU5FxQGQN2AUBUXX/vULKwdgjsOQ/SC9AAKEEYlB03f+oFJABdSjYP6L6P0guIqkVjt0DisEGAAQQigEgG0AhHxBVi4L9wqvBBiEHtqs/xACAAAIbEBBd/x+Eg2ObwH4FORmGfYCaQRikCUS7B5YBNReBMUgvQABBDADaAtIIwsEx9f/Dk9pQsH9kHTh8XANKMAIRIIDAhF9ELTiQQH4FaQAZCAsskPNhyRpkK7oBAAEEMSC8GsVGkEaYIlBghcU3gbGzL6YBAAEEJnzCgP6EYs/gcjCGKQI5G4Z9QiswDAAIIAZKszNAgAEAHgFgGSNMTwgAAAAASUVORK5CYII=
|
||||||
|
EOFILE;
|
||||||
|
$pngWrench = <<< EOFILE
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAA3NCSVQICAjb4U/gAAABO1BMVEXu7u7n5+fk5OTi4uLg4ODd3d3X19fV1dXU1NTS0tLPz8+7z+/MzMy6zu65ze65zu7Kysq3zO62zO3IyMjHx8e1yOiyyO2yyOzFxcXExMSyxue0xuexxefDw8OtxeuwxOXCwsLBwcGuxOWsw+q/v7+qweqqwuqrwuq+vr6nv+qmv+m7u7ukvumkvemivOi5ubm4uLicuOebuOeat+e0tLSYtuabtuaatuaXteaZteaatN6Xs+aVs+WTsuaTsuWRsOSrq6uLreKoqKinp6elpaWLqNijo6OFpt2CpNyAo92BotyAo9+dnZ18oNqbm5t4nt57nth7ntp4nt15ndp3nd6ZmZmYmJhym956mtJzm96WlpaVlZVwmNyTk5Nvl9lultuSkpKNjY2Li4uKioqIiIiHh4eGhoZQgtVKfNFdha6iAAAAaXRSTlMA//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////914ivwAAAACXBIWXMAAAsSAAALEgHS3X78AAAAH3RFWHRTb2Z0d2FyZQBNYWNyb21lZGlhIEZpcmV3b3JrcyA4tWjSeAAAAKF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bI0IKrvv8mxarhXSsXtrY8m5OfjB+F5SN
|
||||||
|
BkhKrpi8635uaxAvkO9HpgZSB/v57f2cFpEQzz+UeZ28Yvq+bMXpkb5rSgwLc+Z5Fylwb+y68x4p
|
||||||
|
MlNW2CLnPUmnrE/d7F1dOGXJ+Qb0neQqre9ptZiAscTI38ng7YTQ8g6Budlg75pktkxPV9idctss
|
||||||
|
1mGYOKciupsxatQB8pJkmkUTpgCvHZ0jDtg+t4/60vAf3tVGBf8WYAC3Rq8Ub3mHyQAAAABJRU5E
|
||||||
|
rkJggg==
|
||||||
|
EOFILE;
|
||||||
|
|
||||||
|
|
||||||
|
//affichage du phpinfo
|
||||||
|
if (isset($_GET['phpinfo']))
|
||||||
|
{
|
||||||
|
phpinfo();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//affichage des images
|
||||||
|
if (isset($_GET['img']))
|
||||||
|
{
|
||||||
|
switch ($_GET['img'])
|
||||||
|
{
|
||||||
|
case 'pngFolder' :
|
||||||
|
header("Content-type: image/png");
|
||||||
|
echo base64_decode($pngFolder);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
case 'pngFolderGo' :
|
||||||
|
header("Content-type: image/png");
|
||||||
|
echo base64_decode($pngFolderGo);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
case 'gifLogo' :
|
||||||
|
header("Content-type: image/gif");
|
||||||
|
echo base64_decode($gifLogo);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
case 'pngPlugin' :
|
||||||
|
header("Content-type: image/png");
|
||||||
|
echo base64_decode($pngPlugin);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
case 'pngWrench' :
|
||||||
|
header("Content-type: image/png");
|
||||||
|
echo base64_decode($pngWrench);
|
||||||
|
exit();
|
||||||
|
|
||||||
|
case 'favicon' :
|
||||||
|
header("Content-type: image/x-icon");
|
||||||
|
echo base64_decode($favicon);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Définition de la langue et des textes
|
||||||
|
|
||||||
|
if (isset ($_GET['lang']))
|
||||||
|
{
|
||||||
|
$langue = htmlspecialchars($_GET['lang'],ENT_QUOTES);
|
||||||
|
if ($langue != 'en' && $langue != 'fr' ) {
|
||||||
|
$langue = 'fr';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset ($_SERVER['HTTP_ACCEPT_LANGUAGE']) AND preg_match("/^fr/", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
|
||||||
|
{
|
||||||
|
$langue = 'fr';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$langue = 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
//initialisation
|
||||||
|
$aliasContents = '';
|
||||||
|
|
||||||
|
// récupération des alias
|
||||||
|
if (is_dir($aliasDir))
|
||||||
|
{
|
||||||
|
$handle=opendir($aliasDir);
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (is_file($aliasDir.$file) && strstr($file, '.conf'))
|
||||||
|
{
|
||||||
|
$msg = '';
|
||||||
|
$aliasContents .= '<li><a href="'.str_replace('.conf','',$file).'/">'.str_replace('.conf','',$file).'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
if (empty($aliasContents))
|
||||||
|
$aliasContents = "<li>".$langues[$langue]['txtNoAlias']."</li>\n";
|
||||||
|
|
||||||
|
// récupération des projets
|
||||||
|
$handle=opendir(".");
|
||||||
|
$projectContents = '';
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (is_dir($file) && !in_array($file,$projectsListIgnore))
|
||||||
|
{
|
||||||
|
//[modif oto] Ajout éventuel de http:// pour éviter le niveau localhost dans les url
|
||||||
|
$projectContents .= '<li><a href="'.($suppress_localhost ? 'http://' : '').$file.'">'.$file.'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
if (empty($projectContents))
|
||||||
|
$projectContents = "<li>".$langues[$langue]['txtNoProjet']."</li>\n";;
|
||||||
|
|
||||||
|
|
||||||
|
//initialisation
|
||||||
|
$phpExtContents = '';
|
||||||
|
|
||||||
|
// récupération des extensions PHP
|
||||||
|
$loaded_extensions = get_loaded_extensions();
|
||||||
|
// [modif oto] classement alphabétique des extensions
|
||||||
|
setlocale(LC_ALL,"{$langues[$langue]['locale']}");
|
||||||
|
sort($loaded_extensions,SORT_LOCALE_STRING);
|
||||||
|
foreach ($loaded_extensions as $extension)
|
||||||
|
$phpExtContents .= "<li>${extension}</li>";
|
||||||
|
|
||||||
|
|
||||||
|
//header('Status: 301 Moved Permanently', false, 301);
|
||||||
|
//header('Location: /aviatechno/index.php');
|
||||||
|
//exit();
|
||||||
|
|
||||||
|
$pageContents = <<< EOPAGE
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
|
||||||
|
<html lang="en" xml:lang="en">
|
||||||
|
<head>
|
||||||
|
<title>{$langues[$langue]['titreHtml']}</title>
|
||||||
|
<meta http-equiv="Content-Type" content="txt/html; charset=utf-8" />
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
background: #ddd;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 1em 10%;
|
||||||
|
padding: 1em 3em;
|
||||||
|
font: 80%/1.4 tahoma, arial, helvetica, lucida sans, sans-serif;
|
||||||
|
border: 1px solid #999;
|
||||||
|
background: #eee;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#head {
|
||||||
|
margin-bottom: 1.8em;
|
||||||
|
margin-top: 1.8em;
|
||||||
|
padding-bottom: 0em;
|
||||||
|
border-bottom: 1px solid #999;
|
||||||
|
letter-spacing: -500em;
|
||||||
|
text-indent: -500em;
|
||||||
|
height: 125px;
|
||||||
|
background: url(index.php?img=gifLogo) 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
.utility {
|
||||||
|
position: absolute;
|
||||||
|
right: 4em;
|
||||||
|
top: 145px;
|
||||||
|
font-size: 0.85em;
|
||||||
|
}
|
||||||
|
.utility li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 0.8em 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#head ul li, dl ul li, #foot li {
|
||||||
|
list-style: none;
|
||||||
|
display: inline;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0.4em;
|
||||||
|
}
|
||||||
|
ul.aliases, ul.projects, ul.tools {
|
||||||
|
list-style: none;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
ul.aliases a, ul.projects a, ul.tools a {
|
||||||
|
padding-left: 22px;
|
||||||
|
background: url(index.php?img=pngFolder) 0 100% no-repeat;
|
||||||
|
}
|
||||||
|
ul.tools a {
|
||||||
|
background: url(index.php?img=pngWrench) 0 100% no-repeat;
|
||||||
|
}
|
||||||
|
ul.aliases a {
|
||||||
|
background: url(index.php?img=pngFolderGo) 0 100% no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
dt {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: right;
|
||||||
|
width: 11em;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
dd {
|
||||||
|
margin: -1.35em 0 0 12em;
|
||||||
|
padding-bottom: 0.4em;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
dd ul li {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
width: 16.5%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 20px;
|
||||||
|
background: url(index.php?img=pngPlugin) 2px 50% no-repeat;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #024378;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #04569A;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
#foot {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 1.8em;
|
||||||
|
border-top: 1px solid #999;
|
||||||
|
padding-top: 1em;
|
||||||
|
font-size: 0.85em;
|
||||||
|
}
|
||||||
|
.third {
|
||||||
|
width:32%;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.left {float:left;}
|
||||||
|
.right {float:right;}
|
||||||
|
</style>
|
||||||
|
<link rel="shortcut icon" href="index.php?img=favicon" type="image/ico" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="head">
|
||||||
|
<h1><abbr title="Windows">W</abbr><abbr title="Apache">A</abbr><abbr title="MySQL">M</abbr><abbr title="PHP">P</abbr></h1>
|
||||||
|
<ul>
|
||||||
|
<li>PHP 5</li>
|
||||||
|
<li>Apache 2</li>
|
||||||
|
<li>MySQL 5</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="utility">
|
||||||
|
<li>Version ${wampserverVersion}</li>
|
||||||
|
<li><a href="?lang={$langues[$langue]['autreLangueLien']}">{$langues[$langue]['autreLangue']}</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2> {$langues[$langue]['titreConf']} </h2>
|
||||||
|
|
||||||
|
<dl class="content">
|
||||||
|
<dt>{$langues[$langue]['versa']}</dt>
|
||||||
|
<dd>${apacheVersion} - <a href='http://{$langues[$langue][$doca_version]}'>Documentation</a></dd>
|
||||||
|
<dt>{$langues[$langue]['versp']}</dt>
|
||||||
|
<dd>${phpVersion} - <a href='http://{$langues[$langue]['docp']}'>Documentation</a></dd>
|
||||||
|
<dt>{$langues[$langue]['server']}</dt>
|
||||||
|
<dd>${server_software}</dd>
|
||||||
|
<dt>{$langues[$langue]['phpExt']}</dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
${phpExtContents}
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt>{$langues[$langue]['versm']}</dt>
|
||||||
|
<dd>${mysqlVersion} - <a href='http://{$langues[$langue]['docm']}'>Documentation</a></dd>
|
||||||
|
</dl>
|
||||||
|
<div style="margin-top:5px;border-top:1px solid #999;"></div>
|
||||||
|
<div class="third left">
|
||||||
|
<h2>{$langues[$langue]['titrePage']}</h2>
|
||||||
|
<ul class="tools">
|
||||||
|
<li><a href="?phpinfo=1">phpinfo()</a></li>
|
||||||
|
<li><a href="phpmyadmin/">phpmyadmin</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="third left">
|
||||||
|
<h2>{$langues[$langue]['txtProjet']}</h2>
|
||||||
|
<ul class="projects">
|
||||||
|
$projectContents
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="third right">
|
||||||
|
<h2>{$langues[$langue]['txtAlias']}</h2>
|
||||||
|
<ul class="aliases">
|
||||||
|
${aliasContents}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div style="clear:both;"></div>
|
||||||
|
<ul id="foot">
|
||||||
|
<li><a href="http://www.wampserver.com">WampServer</a></li>
|
||||||
|
<li><a href="http://www.wampserver.com/en/donations.php">Donate</a></li>
|
||||||
|
<li><a href="http://www.alterway.fr">Alter Way</a></li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOPAGE;
|
||||||
|
|
||||||
|
echo $pageContents;
|
||||||
|
?>
|
89
www/login.php
Normal file
89
www/login.php
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
include("database.php");
|
||||||
|
|
||||||
|
function LoginPage_Login($dataConnection)
|
||||||
|
{
|
||||||
|
$username = trim($_POST["username"]);
|
||||||
|
$password = trim($_POST["password"]);
|
||||||
|
|
||||||
|
if(empty($username))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter an username.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($password))
|
||||||
|
{
|
||||||
|
throw new Exception("You must enter a password.");
|
||||||
|
}
|
||||||
|
|
||||||
|
$userId = VerifyUser($dataConnection, $username, $password);
|
||||||
|
return RefreshOrCreateSession($dataConnection, $userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$loginError = "";
|
||||||
|
$sessionId = "";
|
||||||
|
|
||||||
|
if(isset($_POST["login"]))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$sessionId = LoginPage_Login($g_databaseConnection);
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
$loginError = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>FFXIV 1.0 Login</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/reset.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/global.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
if(!empty($sessionId))
|
||||||
|
{
|
||||||
|
echo "<script>window.location=\"ffxiv://login_success?sessionId=" . $sessionId . "\";</script>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div style="width: 80%; height: 300px; margin-left: auto; margin-right: auto; margin-top: 20%">
|
||||||
|
<div class="contentContainer" >
|
||||||
|
<img style="width: 100%;" src="./img/logo.png" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contentContainer">
|
||||||
|
<div class="info">
|
||||||
|
<br />
|
||||||
|
<form method="post" autocomplete="off">
|
||||||
|
<table class="infoForm">
|
||||||
|
<tr>
|
||||||
|
<td>Username:</td>
|
||||||
|
<td><input type="text" name="username" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Password:</td>
|
||||||
|
<td><input type="password" name="password" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<input type="submit" name="login" value="Login" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<p class="errorMessage"><?php echo($loginError); ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
146
www/presets_armor.json
Normal file
146
www/presets_armor.json
Normal file
|
@ -0,0 +1,146 @@
|
||||||
|
{
|
||||||
|
0: {
|
||||||
|
"name": "Bard Artifact Equipment",
|
||||||
|
"headGear": 41984,
|
||||||
|
"bodyGear": 41984,
|
||||||
|
"legsGear": 41984,
|
||||||
|
"handsGear": 41984,
|
||||||
|
"feetGear": 41984,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
1: {
|
||||||
|
"name": "Black Mage Artifact Equipment",
|
||||||
|
"headGear": 40960,
|
||||||
|
"bodyGear": 40960,
|
||||||
|
"legsGear": 40960,
|
||||||
|
"handsGear": 40960,
|
||||||
|
"feetGear": 40960,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
2: {
|
||||||
|
"name": "Dragoon Artifact Equipment",
|
||||||
|
"headGear": 36864,
|
||||||
|
"bodyGear": 36864,
|
||||||
|
"legsGear": 36864,
|
||||||
|
"handsGear": 36864,
|
||||||
|
"feetGear": 36864,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
3: {
|
||||||
|
"name": "Monk Artifact Equipment",
|
||||||
|
"headGear": 45056,
|
||||||
|
"bodyGear": 45056,
|
||||||
|
"legsGear": 45056,
|
||||||
|
"handsGear": 45056,
|
||||||
|
"feetGear": 45056,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
4: {
|
||||||
|
"name": "Paladin Artifact Equipment",
|
||||||
|
"headGear": 43008,
|
||||||
|
"bodyGear": 43008,
|
||||||
|
"legsGear": 43008,
|
||||||
|
"handsGear": 43008,
|
||||||
|
"feetGear": 43008,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
5: {
|
||||||
|
"name": "Warrior Artifact Equipment",
|
||||||
|
"headGear": 37888,
|
||||||
|
"bodyGear": 37888,
|
||||||
|
"legsGear": 37888,
|
||||||
|
"handsGear": 37888,
|
||||||
|
"feetGear": 37888,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
6: {
|
||||||
|
"name": "White Mage Artifact Equipment",
|
||||||
|
"headGear": 39936,
|
||||||
|
"bodyGear": 39936,
|
||||||
|
"legsGear": 39936,
|
||||||
|
"handsGear": 39936,
|
||||||
|
"feetGear": 39936,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
7: {
|
||||||
|
"name": "The Maelstrom Uniform",
|
||||||
|
"headGear": 46080,
|
||||||
|
"bodyGear": 46080,
|
||||||
|
"legsGear": 1024,
|
||||||
|
"handsGear": 46080,
|
||||||
|
"feetGear": 46080,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
8: {
|
||||||
|
"name": "The Order of the Twin Adder Uniform",
|
||||||
|
"headGear": 46112,
|
||||||
|
"bodyGear": 46081,
|
||||||
|
"legsGear": 1024,
|
||||||
|
"handsGear": 46081,
|
||||||
|
"feetGear": 46081,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
9: {
|
||||||
|
"name": "The Immortal Flames Uniform",
|
||||||
|
"headGear": 46144,
|
||||||
|
"bodyGear": 46082,
|
||||||
|
"legsGear": 1024,
|
||||||
|
"handsGear": 46082,
|
||||||
|
"feetGear": 46082,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
10: {
|
||||||
|
"name": "Alberic",
|
||||||
|
"headGear": 0,
|
||||||
|
"bodyGear": 15744,
|
||||||
|
"legsGear": 7238,
|
||||||
|
"handsGear": 11584,
|
||||||
|
"feetGear": 15744,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
11: {
|
||||||
|
"name": "Jehantel",
|
||||||
|
"headGear": 9604,
|
||||||
|
"bodyGear": 28742,
|
||||||
|
"legsGear": 28928,
|
||||||
|
"handsGear": 1024,
|
||||||
|
"feetGear": 9412,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
12: {
|
||||||
|
"name": "Miraudont",
|
||||||
|
"headGear": 19503,
|
||||||
|
"bodyGear": 14598,
|
||||||
|
"legsGear": 3268,
|
||||||
|
"handsGear": 14560,
|
||||||
|
"feetGear": 13475,
|
||||||
|
"waistGear": 248832
|
||||||
|
},
|
||||||
|
13: {
|
||||||
|
"name": "Nael van Darnus (Elezen Male Only)",
|
||||||
|
"headGear": 0,
|
||||||
|
"bodyGear": 933888,
|
||||||
|
"legsGear": 1024,
|
||||||
|
"handsGear": 1024,
|
||||||
|
"feetGear": 1024,
|
||||||
|
"waistGear": 0
|
||||||
|
},
|
||||||
|
14: {
|
||||||
|
"name": "Papalymo",
|
||||||
|
"headGear": 20507,
|
||||||
|
"bodyGear": 7589,
|
||||||
|
"legsGear": 16641,
|
||||||
|
"handsGear": 3265,
|
||||||
|
"feetGear": 9504,
|
||||||
|
"waistGear": 168960
|
||||||
|
},
|
||||||
|
15: {
|
||||||
|
"name": "Rubh Epocan",
|
||||||
|
"headGear": 20576,
|
||||||
|
"bodyGear": 7232,
|
||||||
|
"legsGear": 5198,
|
||||||
|
"handsGear": 6209,
|
||||||
|
"feetGear": 6209,
|
||||||
|
"waistGear": 248832
|
||||||
|
},
|
||||||
|
};
|
107
www/presets_weapon.json
Normal file
107
www/presets_weapon.json
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
{
|
||||||
|
0: {
|
||||||
|
"name": "Axe",
|
||||||
|
"weapon1": 147850240,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
1: {
|
||||||
|
"name": "Bow & Arrow",
|
||||||
|
"weapon1": 210766878,
|
||||||
|
"weapon2": 236979210,
|
||||||
|
},
|
||||||
|
2: {
|
||||||
|
"name": "Fists",
|
||||||
|
"weapon1": 58723358,
|
||||||
|
"weapon2": 59771934,
|
||||||
|
},
|
||||||
|
3: {
|
||||||
|
"name": "Lance",
|
||||||
|
"weapon1": 168826880,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
4: {
|
||||||
|
"name": "Sword & Shield",
|
||||||
|
"weapon1": 79692880,
|
||||||
|
"weapon2": 32513024,
|
||||||
|
},
|
||||||
|
5: {
|
||||||
|
"name": "Wand (Conjurer)",
|
||||||
|
"weapon1": 331351052,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
6: {
|
||||||
|
"name": "Wand (Thaumaturge)",
|
||||||
|
"weapon1": 294652958,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
7: {
|
||||||
|
"name": "Ifrit's Battleaxe",
|
||||||
|
"weapon1": 147857408,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
8: {
|
||||||
|
"name": "Ifrit's Bow",
|
||||||
|
"weapon1": 210768896,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
9: {
|
||||||
|
"name": "Ifrit's Claws",
|
||||||
|
"weapon1": 62915584,
|
||||||
|
"weapon2": 63964160,
|
||||||
|
},
|
||||||
|
10: {
|
||||||
|
"name": "Ifrit's Harpoon",
|
||||||
|
"weapon1": 175113216,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
11: {
|
||||||
|
"name": "Ifrit's Blade",
|
||||||
|
"weapon1": 81789952,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
12: {
|
||||||
|
"name": "Ifrit's Cane",
|
||||||
|
"weapon1": 347086848,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
13: {
|
||||||
|
"name": "Ifrit's Cudgel",
|
||||||
|
"weapon1": 294653952,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
14: {
|
||||||
|
"name": "Bravura",
|
||||||
|
"weapon1": 147856384,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
15: {
|
||||||
|
"name": "Artemis Bow",
|
||||||
|
"weapon1": 212861952,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
16: {
|
||||||
|
"name": "Sphairai",
|
||||||
|
"weapon1": 65012736,
|
||||||
|
"weapon2": 66061312,
|
||||||
|
},
|
||||||
|
17: {
|
||||||
|
"name": "Gae Bolg",
|
||||||
|
"weapon1": 173016064,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
18: {
|
||||||
|
"name": "Curtana & Holy Shield",
|
||||||
|
"weapon1": 79702016,
|
||||||
|
"weapon2": 32517120,
|
||||||
|
},
|
||||||
|
19: {
|
||||||
|
"name": "Thyrus",
|
||||||
|
"weapon1": 347084800,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
20: {
|
||||||
|
"name": "Stardust Rod",
|
||||||
|
"weapon1": 310380544,
|
||||||
|
"weapon2": 0,
|
||||||
|
},
|
||||||
|
};
|
7
www/testmysql.php
Normal file
7
www/testmysql.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
$link = mysql_connect('hostname','dbuser','dbpassword');
|
||||||
|
if (!$link) {
|
||||||
|
die('Could not connect to MySQL: ' . mysql_error());
|
||||||
|
}
|
||||||
|
echo 'Connection OK'; mysql_close($link);
|
||||||
|
?>
|
Loading…
Add table
Reference in a new issue