mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-18 10:43:22 +00:00
fix
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user