mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
D2SaveFile to D2Char rename
This commit is contained in:
@@ -62,7 +62,7 @@ $form = new Formr\Formr();
|
||||
$tabs .= <<<EOT
|
||||
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link btn btn-outline-danger" style="background: #ddd; border: 1px solid #888;" id="{$c->charData['CharacterName']}-tab" data-toggle="tab" href="#{$c->charData['CharacterName']}" role="tab" aria-controls="{$c->charData['CharacterName']}" aria-selected="true"><img height="64" width="" src="img/chars/{$c->charData['CharacterClass']}.gif">{$c->charData['CharacterName']}</a>
|
||||
<a class="nav-link btn btn-outline-danger" style="background: #ddd; border: 1px solid #888;" id="{$c->cData['CharacterName']}-tab" data-toggle="tab" href="#{$c->cData['CharacterName']}" role="tab" aria-controls="{$c->cData['CharacterName']}" aria-selected="true"><img height="64" width="" src="img/chars/{$c->cData['CharacterClass']}.gif">{$c->cData['CharacterName']}</a>
|
||||
</li>
|
||||
EOT;
|
||||
echo $tabs;
|
||||
@@ -81,7 +81,7 @@ EOT;
|
||||
foreach ($charData as $c) {
|
||||
|
||||
$quests = null;
|
||||
foreach ($c->charData['Quests'] as $quest) {
|
||||
foreach ($c->cData['Quests'] as $quest) {
|
||||
foreach ($quest as $difficulty => $q) {
|
||||
$quests .= "<h2>$difficulty</h2>";
|
||||
foreach ($q as $k => $v) {
|
||||
@@ -100,7 +100,7 @@ EOT;
|
||||
|
||||
$wps = null;
|
||||
$wps .= "<input type='radio' value='1' name='wp_all' id='wp_all'><label style='font-size: 1.3em;color:green;' for='wp_all'>Enable All Waypoints</label><br><input type='radio' value='0' name='wp_all' id='wp_all_off'><label style='font-size: 1.3em; color: red;' for='wp_all_off'>Disable All Waypoints</label><hr>";
|
||||
foreach ($c->charData['Waypoints'] as $diff => $waypoints) {
|
||||
foreach ($c->cData['Waypoints'] as $diff => $waypoints) {
|
||||
$wps .= "<h2>$diff</h2>";
|
||||
array_pop($waypoints);
|
||||
foreach ($waypoints as $k => $v) {
|
||||
@@ -122,64 +122,64 @@ EOT;
|
||||
|
||||
|
||||
$option = '';
|
||||
if ($c->charData['CharacterClass'] == 'Amazon'){
|
||||
if ($c->cData['CharacterClass'] == 'Amazon'){
|
||||
$option .= "<option value='Amazon' selected>Amazon</option>";
|
||||
} else {
|
||||
$option .= "<option value='Amazon'>Amazon</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Assassin'){
|
||||
if ($c->cData['CharacterClass'] == 'Assassin'){
|
||||
$option .= "<option value='Assassin' selected>Assassin</option>";
|
||||
} else {
|
||||
$option .= "<option value='Assassin'>Assassin</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Barbarian'){
|
||||
if ($c->cData['CharacterClass'] == 'Barbarian'){
|
||||
$option .= "<option value='Barbarian' selected>Barbarian</option>";
|
||||
} else {
|
||||
$option .= "<option value='Barbarian'>Barbarian</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Druid'){
|
||||
if ($c->cData['CharacterClass'] == 'Druid'){
|
||||
$option .= "<option value='Druid' selected>Druid</option>";
|
||||
} else {
|
||||
$option .= "<option value='Druid'>Druid</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Paladin'){
|
||||
if ($c->cData['CharacterClass'] == 'Paladin'){
|
||||
$option .= "<option value='Paladin' selected>Paladin</option>";
|
||||
} else {
|
||||
$option .= "<option value='Paladin'>Paladin</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Necromancer'){
|
||||
if ($c->cData['CharacterClass'] == 'Necromancer'){
|
||||
$option .= "<option value='Necromancer' selected>Necromancer</option>";
|
||||
} else {
|
||||
$option .= "<option value='Necromancer'>Necromancer</option>";
|
||||
}
|
||||
|
||||
if ($c->charData['CharacterClass'] == 'Sorceress'){
|
||||
if ($c->cData['CharacterClass'] == 'Sorceress'){
|
||||
$option .= "<option value='Sorceress' selected>Sorceress</option>";
|
||||
} else {
|
||||
$option .= "<option value='Sorceress'>Sorceress</option>";
|
||||
}
|
||||
|
||||
$radio = '';
|
||||
if ($c->charData['Difficulty']['Norm'] == 1){
|
||||
if ($c->cData['Difficulty']['Norm'] == 1){
|
||||
$radio .= '<input checked type="radio" id="DifficultyNormal" name="Difficulty" value="Normal">Normal<br>';
|
||||
} else {
|
||||
$radio .= '<input type="radio" id="DifficultyNormal" name="Difficulty" value="Normal">Normal<br>';
|
||||
}
|
||||
|
||||
|
||||
if ($c->charData['Difficulty']['NM'] == 1){
|
||||
if ($c->cData['Difficulty']['NM'] == 1){
|
||||
$radio .= '<input checked type="radio" id="DifficultyNM" name="Difficulty" value="NM">NM<br>';
|
||||
} else {
|
||||
$radio .= '<input type="radio" id="DifficultyNM" name="Difficulty" value="NM">NM<br>';
|
||||
}
|
||||
|
||||
|
||||
if ($c->charData['Difficulty']['Hell'] == 1){
|
||||
if ($c->cData['Difficulty']['Hell'] == 1){
|
||||
$radio .= '<input checked type="radio" id="DifficultyHell" name="Difficulty" value="Hell">Hell<br>';
|
||||
} else {
|
||||
$radio .= '<input type="radio" id="DifficultyHell" name="Difficulty" value="Hell">Hell<br>';
|
||||
@@ -187,12 +187,12 @@ EOT;
|
||||
|
||||
|
||||
|
||||
if ($c->charData['Quests'][0]['Norm']["DenOfEvil"]) $a1q1 = "checked";
|
||||
if ($c->charData['Quests'][0]['Norm']["SistersBurialGrounds"]) $a1q2 = "checked";
|
||||
if ($c->charData['Quests'][0]['Norm']["TheSearchForCain"]) $a1q3 = "checked";
|
||||
if ($c->charData['Quests'][0]['Norm']["TheForgottenTower"]) $a1q4 = "checked";
|
||||
if ($c->charData['Quests'][0]['Norm']["ToolsOfTheTrade"]) $a1q5 = "checked";
|
||||
if ($c->charData['Quests'][0]['Norm']["SistersToTheSlaughter"]) $a1q6 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["DenOfEvil"]) $a1q1 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["SistersBurialGrounds"]) $a1q2 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["TheSearchForCain"]) $a1q3 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["TheForgottenTower"]) $a1q4 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["ToolsOfTheTrade"]) $a1q5 = "checked";
|
||||
if ($c->cData['Quests'][0]['Norm']["SistersToTheSlaughter"]) $a1q6 = "checked";
|
||||
|
||||
|
||||
|
||||
@@ -202,20 +202,20 @@ EOT;
|
||||
|
||||
// dump($c['Waypoints']);
|
||||
$tabContent .= <<<EOT
|
||||
<div style="background: white;" class="tab-pane fade" id="{$c->charData['CharacterName']}" role="tabpanel" aria-labelledby="{$c->charData['CharacterName']}-tab">
|
||||
<div style="background: white;" class="tab-pane fade" id="{$c->cData['CharacterName']}" role="tabpanel" aria-labelledby="{$c->cData['CharacterName']}-tab">
|
||||
<form method="POST" action="/saveCharacter.php">
|
||||
<input type="hidden" name="filePath" id="filePath" value="{$c->charData['filePath']}">
|
||||
<input type="hidden" name="filePath" id="filePath" value="{$c->cData['filePath']}">
|
||||
<div class="container" style="font-size: 14px;">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h1 style="margin: 15px;">{$c->charData['CharacterName']}</h1>
|
||||
<h1 style="margin: 15px;">{$c->cData['CharacterName']}</h1>
|
||||
<input class="btn btn-danger" style="" type="submit" value="Save Character">
|
||||
<img src="/img/chars/{$c->charData['CharacterClass']}.gif"><br>
|
||||
<input type="text" id="ChracterName" name="ChracterName" maxlength="16" value="{$c->charData['CharacterName']}">
|
||||
<img src="/img/chars/{$c->cData['CharacterClass']}.gif"><br>
|
||||
<input type="text" id="ChracterName" name="ChracterName" maxlength="16" value="{$c->cData['CharacterName']}">
|
||||
<select id='CharacterClass'>
|
||||
$option
|
||||
</select>
|
||||
<input style="border: 1px solid black;width: 34px;" type="number" id="CharacterLevel" value="{$c->charData['CharacterLevel']}"><br>
|
||||
<input style="border: 1px solid black;width: 34px;" type="number" id="CharacterLevel" value="{$c->cData['CharacterLevel']}"><br>
|
||||
$radio
|
||||
</div>
|
||||
<div class="col"><h2>Quests</h2>
|
||||
|
Reference in New Issue
Block a user