Skip to content

Commit

Permalink
Merge pull request #22 from daffyyyy/improvement-website-1
Browse files Browse the repository at this point in the history
Always show player skin as selected option
  • Loading branch information
Nereziel authored Nov 14, 2023
2 parents 2fa3483 + 741d602 commit c68069b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions website/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@
<option>Select skin</option>
<?php
$list = $db->select("SELECT * FROM wp_weapons_paints WHERE weapon_defindex = \"{$key["weapon_defindex"]}\"");
foreach($list as $list){
echo "<option value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>";
foreach ($list as $list) {
if ($list['paint_name'] == $query3[0]["paint_name"])
echo "<option selected value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>";
else
echo "<option value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>";
}
?>
</select>
Expand All @@ -92,4 +95,4 @@


</body>
</html>
</html>

0 comments on commit c68069b

Please sign in to comment.