first in this branch

This commit is contained in:
Hash Borgir
2023-06-12 01:07:57 -06:00
parent e68dde2f23
commit 46a7bbd378
3 changed files with 147 additions and 13 deletions

View File

@@ -294,8 +294,9 @@ HTML;
foreach ($sortedArray as $index => $container) {
$containerId = "container_" . $index;
if (empty($index)) $index = "Socketed";
if (empty($index))
$index = "Socketed";
// Create accordion card for the container
$items .= "<div class='card'>";
$items .= "<div class='card-header' id='{$containerId}-heading'>";
@@ -341,6 +342,34 @@ HTML;
$items .= "</div>";
$qarray = ($c->cData['Quests'][0]);
$qallOnes = 1;
foreach ($qarray as $acts) {
$values = array_values($acts);
$result = array_reduce($values, function ($carry, $value) {
return $carry && ($value === '1');
}, 1);
if (!$result) {
$qallOnes = 0;
break;
}
}
$qchecked = $qallOnes ? "checked" : "";
$wparray = ($c->cData['Waypoints']);
$wpallOnes = 1;
foreach ($wparray as $acts) {
$values = array_values($acts);
$result = array_reduce($values, function ($carry, $value) {
return $carry && ($value === '1');
}, 1);
if (!$result) {
$wpallOnes = 0;
break;
}
}
$wpchecked = $wpallOnes ? "checked" : "";
$tabContent .= <<<EOT
<div style="background: white; margin-top: 10px;" class="tab-pane fade" id="{$c->cData['CharacterName']}" role="tabpanel" aria-labelledby="{$c->cData['CharacterName']}-tab">
<form id='{$c->cData['CharacterName']}' class="charform {$c->cData['CharacterName']}" method="POST" action="/saveCharacter.php">
@@ -426,6 +455,11 @@ $checkboxes
$stats
<div style="background:;">
<h3 style="text-align: center">Skills</h3>
<div class="form-group">
<label for="setallskills">Set all skills:</label>
<input type="number" id="setallskills" class="form-control setallskills" max="99">
</div>
<div class="accordion" id="accordionExample">
$skillDivs
</div>
@@ -433,10 +467,23 @@ $checkboxes
</div>
<div class="col">
<h3 style="text-align: center">Quests</h3>
<div class="form-group">
<div class="form-check">
<label for="q_all" class="form-check-label">Enable/Disable All Quests</label>
<input $qchecked type="checkbox" id="q_all" name="q_all" value="$qallOnes" class="form-check-input q_all">
</div>
</div>
$quests
</div>
<div class="col">
<h3 style="text-align: center">Waypoints</h3>
<div class="form-group">
<div class="form-check">
<label for="wp_all" class="form-check-label">Enable/Disable All Waypoints</label>
<input $wpchecked type="checkbox" id="wp_all" name="wp_all" value="$wpallOnes" class="form-check-input wp_all">
</div>
</div>
$wps
</div>
</div>