<?php

#################################################################################
##              -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =-                 ##
## --------------------------------------------------------------------------- ##
##  Filename       : maintenenceResetGold.tpl 		                           ##
##  Type           : Admin Panel Frontend                                      ##
## --------------------------------------------------------------------------- ##
##  Developed by   : Dzoki (Original)                                          ##
##  Refactored by  : Shadow                                                    ##
##  Redesign by    : Shadow                                                    ##
## --------------------------------------------------------------------------- ##
##  Contact        : cata7007@gmail.com                                        ##
##  Project        : TravianZ                                                  ##
##  GitHub         : https://github.com/Shadowss/TravianZ                      ##
## --------------------------------------------------------------------------- ##
##  License        : TravianZ Project                                          ##
##  Copyright      : TravianZ (c) 2010-2025. All rights reserved.              ##
## --------------------------------------------------------------------------- ##
#################################################################################

if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
?>
<style>
.resetgold-wrap{max-width:600px;margin:30px auto;font-family:Verdana}
.resetgold-head{display:flex;align-items:center;gap:8px;margin-bottom:16px}
.resetgold-head svg{width:26px;height:26px}
.resetgold-head h2{margin:0;font-size:18px}
.resetgold-card{background:#fff;border:1px solid #e74c3c;border-radius:10px;padding:22px;box-shadow:0 2px 8px rgba(231,76,60,.15);text-align:center}
.resetgold-card .warn-icon{width:60px;height:60px;margin:0 auto 12px;background:linear-gradient(135deg,#e74c3c,#c0392b);border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 6px rgba(0,0,0,.2)}
.resetgold-card .warn-icon svg{width:32px;height:32px;fill:#fff}
.resetgold-card h3{margin:8px 0 6px;font-size:17px;color:#c0392b}
.resetgold-card p{margin:0 0 18px;color:#555;font-size:13px;line-height:1.4}
.resetgold-card .danger-box{background:#ffeaea;border:1px dashed #e74c3c;padding:10px;border-radius:6px;font-size:12px;color:#a93226;margin-bottom:16px}
.resetgold-form button{background:#e74c3c;color:#fff;border:0;padding:12px 24px;border-radius:8px;font-weight:bold;cursor:pointer;font-size:14px;display:inline-flex;align-items:center;gap:8px;transition:.2s}
.resetgold-form button:hover{background:#c0392b;transform:translateY(-1px)}
.resetgold-success{margin-top:18px;padding:12px;background:#ffeaea;border:1px solid #e74c3c;color:#c0392b;border-radius:6px;font-weight:bold;text-align:center}
</style>

<div class="resetgold-wrap">
  <div class="resetgold-head">
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#e74c3c" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#c0392b"/></svg>
    <h2><?php echo ADM_RESET_GOLD_FOR_ALL_PLAYERS; ?></h2>
  </div>

  <div class="resetgold-card">
    <div class="warn-icon">
      <svg viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>
    </div>
    <h3><?php echo ADM_RESET_ALL_PLAYERS_GOLD; ?></h3>
    <p><?php echo ADM_THIS_ACTION_WILL_SET_THE_GOLD_TO; ?><b>0</b><?php echo ADM_FOR_ALL_PLAYERS_FROM_THE_SERVER; ?></p>
    
    <div class="danger-box"><?php echo ADM_WARNING_THE_ACTION_IS_IRREVERSIBLE_MAKE_SURE; ?></div>

    <form action="../GameEngine/Admin/Mods/mainteneceResetGold.php" method="POST" class="resetgold-form" onsubmit="return confirm('Are you SURE you want to reset gold to ALL players?');">
      <?php echo csrf_field(); ?>
      <input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
      <button type="submit">
        <svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg><?php echo ADM_RESET_GOLD_NOW; ?></button>
    </form>
  </div>

  <?php if(isset($_GET['g'])){ ?>
    <div class="resetgold-success"><?php echo ADM_ALL_PLAYERS_GOLD_HAS_BEEN_RESET; ?></div>
  <?php } ?>
</div>