This commit is contained in:
Nilsu Derinder
2023-12-12 23:40:53 +03:00
committed by GitHub
parent 969d40b970
commit 4f94b831c2

View File

@@ -136,7 +136,15 @@ if (isset($_SESSION['steamid'])) {
?> ?>
</select> </select>
<br></br> <br></br>
<?php if ($selectedSkinInfo !== null): ?> <?php
$selectedSkinInfo = isset($selectedSkins[$defindex]) ? $selectedSkins[$defindex] : null;
$steamid = $_SESSION['steamid'];
$defindex = $defindex; // get defindex here, correct if not
$queryCheck = $db->select("SELECT 1 FROM `wp_player_skins` WHERE `steamid` = :steamid AND `weapon_defindex` = :defindex", ["steamid" => $steamid, "defindex" => $defindex]);
$hasSkinData = !empty($queryCheck);
if ($selectedSkinInfo && $hasSkinData):
?>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#weaponModal<?php echo $defindex ?>"> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#weaponModal<?php echo $defindex ?>">
Settings Settings
</button> </button>
@@ -150,7 +158,6 @@ if (isset($_SESSION['steamid'])) {
} }
</script> </script>
<?php endif; ?> <?php endif; ?>
</div>
<?php <?php
// wear value // wear value