<?php
session_start();
require_once(__DIR__ . '/../config/db.php');
require_once(__DIR__ . '/../session.php');
include(__DIR__.'/layouts/stylesheet.php');
?>

    <link href="/Content/jquery.daterangepicker" rel="stylesheet"/>
    <link href="/Content/zelma-v2-beta-desktop-css" rel="stylesheet"/>
    <link href="/Content/Profile/zelma-v2-beta-desktop-css" rel="stylesheet"/>
    <link href="/Content/Theme/zelma-v2-beta-desktop-<?= $config['theme']; ?>-css" rel="stylesheet"/>

</head>
<body data-online-id="vrEHfS6XA3SAinkSVD50y2P4InPcpojC7pCBD4j5bM6zk0HLMty+9A=="
      style="--expand-icon-src: url(//d33egg70nrp50s.cloudfront.net/Images/icons/expand.gif?v=20241125);
      --collapse-icon-src: url(//d33egg70nrp50s.cloudfront.net/Images/icons/collapse.gif?v=20241125);
      --play-icon-src: url(//d33egg70nrp50s.cloudfront.net/Images/icons/play.png?v=20241125);
      --jquery-ui-444444-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_444444_256x240.png?v=20241125);
      --jquery-ui-555555-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_555555_256x240.png?v=20241125);
      --jquery-ui-ffffff-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_ffffff_256x240.png?v=20241125);
      --jquery-ui-777620-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_777620_256x240.png?v=20241125);
      --jquery-ui-cc0000-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_cc0000_256x240.png?v=20241125);
      --jquery-ui-777777-src: url(//d33egg70nrp50s.cloudfront.net/Images/jquery-ui/ui-icons_777777_256x240.png?v=20241125);">


    <?php include(__DIR__.'/layouts/header.php'); ?>
    <?php include(__DIR__.'/layouts/game-menu.php'); ?>
    
    </div>


    <div class="site-content-container" data-container-background="general">
      <div class="container">
        <div class="row">
          <div class="col-sm-12 profile-container">
            <div class="standard-container-with-sidebar" data-style="light">
              <div class="standard-side-menu">
                <h4>
                  Akun Saya
                </h4>
                <a href="/desktop/deposit" data-active="false">
                  Deposit
                </a>
                <a href="/desktop/withdrawal" data-active="false">
                  Penarikan
                </a>
                <a href="/desktop/statement/consolidate" data-active="false">
                  Riwayat Taruhan
                </a>
                <a href="/desktop/history/bonus" data-active="false">
                  Riwayat Klaim
                </a>
                <a href="/desktop/bonus" data-active="false">
                  Klaim Bonus
                </a>
                <h4>
                  Personal Center
                </h4>
                <a href="/desktop/account-summary" data-active="false">
                  Akun Saya
                </a>
                <a href="/desktop/profile" data-active="true">
                  Ubah Profil
                </a>
                <a href="/desktop/password" data-active="false">
                  Ubah Kata Sandi
                </a>
                <a href="/desktop/loyalty/rewards" data-active="false">
                  Hadiah Loyalitas
                </a>
                <a href="/desktop/mobile-app" data-active="false">
                  Unduh Aplikasi Permainan
                </a>
                <a href="/desktop/bank-account" data-active="false">
                  Detail Perbankan
                </a>
                <a href="/desktop/message/inbox" data-active="false">
                  Pesan
                </a>
              </div>
    
                <div class="standard-form-content">
                  <div class="standard-form-title">
                    PROFIL SAYA
                  </div>
                  <form action="/Profile/MyProfile" method="post">
                    <input type="hidden" name="csrf_token" value="<?= $csrf_token; ?>">
                    <div class="standard-sub-section">
                      <div class="standard-form-title">
                        Informasi Pribadi
                      </div>
                      <div class="standard-form-content form_subcategory">
                        <div class="standard-inline-form-group">
                          <label for="FullName">Nama Lengkap</label>
                          <div data-section="asterisk">*</div>
                          <div data-section="input">
                            <input class="form-control" data-val="true" data-val-regex="The field FullName must match the regular expression &#39;^[0-9a-zA-Z ]*$&#39;." data-val-regex-pattern="^[0-9a-zA-Z ]*$" data-val-required="The FullName field is required." id="FullName" name="FullName" placeholder="Nama Lengkap" readonly="readonly" type="text" value="<?= $user['fullname']; ?>" />
                            <span class="standard-required-message">Nama lengkap hanya boleh berisi karakter alfanumerik.</span>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Gender">Jenis Kelamin</label>
                          <div data-section="input">
                            <select class="form-control" id="Gender" name="Gender">
                              <option value="">-- Pilih Jenis Kelamin --</option>
                                <option value="M" <?= $user['gender'] === 'M' ? 'selected' : ''; ?>>Laki-Laki</option>
                                <option value="F" <?= $user['gender'] === 'F' ? 'selected' : ''; ?>>Perempuan</option>
                            </select>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Address">Alamat</label>
                          <div data-section="input">
                            <textarea class="form-control" cols="20" id="Address" name="Address" placeholder="" rows="5"><?= $user['address']; ?></textarea>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="PostCode">Kode Pos</label>
                          <div data-section="input">
                            <input class="form-control" id="Postcode" name="Postcode" placeholder="Kode Pos Anda" type="text" value="<?= $user['postcode']; ?>" />
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="State">Propinsi</label>
                          <div data-section="input">
                            <input class="form-control" id="State" name="State" placeholder="Kota Anda" type="text" value="<?= $user['state']; ?>" />
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Country">Negara</label>
                          <div data-section="asterisk">*</div>
                          <div data-section="input">
                            <select class="form-control" data-val="true" data-val-required="The Country field is required." id="Country" name="Country" required />
                              <option value="">-- Pilih Negara --</option>
                              <option value="BN" <?= $user['country'] === 'BN' ? 'selected' : ''; ?>>Brunei</option>
                              <option value="KH" <?= $user['country'] === 'KH' ? 'selected' : ''; ?>>Cambodia</option>
                              <option value="ID" <?= $user['country'] === 'ID' ? 'selected' : ''; ?>>Indonesia</option>
                              <option value="LA" <?= $user['country'] === 'LA' ? 'selected' : ''; ?>>Laos</option>
                              <option value="MY" <?= $user['country'] === 'MY' ? 'selected' : ''; ?>>Malaysia</option>
                              <option value="MM" <?= $user['country'] === 'MM' ? 'selected' : ''; ?>>Myanmar</option>
                              <option value="PH" <?= $user['country'] === 'PH' ? 'selected' : ''; ?>>Philippines</option>
                              <option value="SG" <?= $user['country'] === 'SG' ? 'selected' : ''; ?>>Singapore</option>
                              <option value="TH" <?= $user['country'] === 'TH' ? 'selected' : ''; ?>>Thailand</option>
                              <option value="TL" <?= $user['country'] === 'TL' ? 'selected' : ''; ?>>Timor-Leste</option>
                              <option value="VN" <?= $user['country'] === 'VN' ? 'selected' : ''; ?>>Vietnam</option>
                            </select>
                            <span class="standard-required-message">Silahkan pilih negara!</span>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="standard-sub-section">
                      <div class="standard-form-title">
                        Informasi Kontak
                      </div>
                      <div class="standard-form-content form_subcategory">
                        <div class="standard-inline-form-group">
                          <label for="ContactNo">Nomor Kontak.</label>
                          <div data-section="asterisk">*</div>
                          <div data-section="input" class="copy-input-button-field">
                            <input MaxLength="16" autocomplete="off" class="form-control format_phone" data-val="true" data-val-length="The field ContactNo must be a string with a minimum length of 12 and a maximum length of 16." data-val-length-max="16" data-val-length-min="12" data-val-regex="The field ContactNo must match the regular expression &#39;^(?=.*[0-9])[0-9\-]+$&#39;." data-val-regex-pattern="^(?=.*[0-9])[0-9\-]+$" data-val-required="The ContactNo field is required." id="ContactNo" inputmode="decimal" name="ContactNo" type="text" value="<?= $user['phone']; ?>" required />
                            <span class="standard-required-message">Harap masukkan nomor kontak yang valid!</span>
                            <button class="copy-input-button" id="copy_contact_button" type="button">
                              <i class="glyphicon glyphicon-file"></i>
                            </button>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Email">Email</label>
                          <div data-section="input">
                            <input autocomplete="off" class="form-control" data-val="true" data-val-email="The Email field is not a valid e-mail address." id="Email" name="Email" placeholder="Email" type="text" value="<?= $user['email']; ?>" />
                            <span class="standard-required-message">Harap masukkan email yang valid!</span>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Telegram">Telegram</label>
                          <div data-section="input">
                            <input class="form-control format_phone" data-val="true" data-val-regex="The field Telegram must match the regular expression &#39;^(?=.*[0-9])[0-9\-]+$&#39;." data-val-regex-pattern="^(?=.*[0-9])[0-9\-]+$" id="Telegram" inputmode="decimal" name="Telegram" placeholder="Telegram" type="text" value="<?= $user['telegram']; ?>" />
                            <span class="standard-required-message">Harap masukkan numerik saja</span>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="WhatsApp">
                            <a class="not-verified-status" href="/download-apk" target="_blank">
                              Click here to verify your WhatsApp
                              <i class="glyphicon glyphicon-new-window"></i>
                            </a>
                          </label>
                          <div data-section="input">
                            <input class="form-control format_phone" data-val="true" data-val-regex="The field WhatsApp must match the regular expression &#39;^(?=.*[0-9])[0-9\-]+$&#39;." data-val-regex-pattern="^(?=.*[0-9])[0-9\-]+$" id="WhatsApp" inputmode="decimal" name="WhatsApp" placeholder="Nomor WhatsApp" type="text" value="<?= $user['whatsapp']; ?>" />
                            <span class="standard-required-message">Harap masukkan numerik saja</span>
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="WeChat">WeChat</label>
                          <div data-section="input">
                            <input class="form-control" id="WeChat" name="WeChat" placeholder="WeChat" type="text" value="" />
                          </div>
                        </div>
                        <div class="standard-inline-form-group">
                          <label for="Line">Line</label>
                          <div data-section="input">
                            <input class="form-control" id="Line" name="Line" placeholder="Line" type="text" value="" />
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="standard-button-group">
                      <input type="submit" class="btn btn-primary" value="Simpan Data Profil Saya" />
                    </div>
                  </form>
                </div>
            </div>
          </div>
        </div>
      </div>
    </div>

<?php include(__DIR__.'/layouts/footer.php'); ?>

<div id="popup_modal" class="modal popup-modal" role="dialog" data-title="" aria-label="Popup Modal">
  <div class="modal-dialog">
    <div class="modal-content" style="--desktop-popup-alert-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/popup/alert.png?v=20241125);;--desktop-popup-notification-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/desktop/layout/popup/notification.png?v=20241125);;--mobile-popup-alert-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/popup/alert.png?v=20241125);;--mobile-popup-notification-src: url(//d33egg70nrp50s.cloudfront.net/Images/v-zelma-v2-beta/<?= $config['theme']; ?>/mobile/layout/popup/notification.png?v=20241125);;--event-giveaway-popper-src: url(//d33egg70nrp50s.cloudfront.net/Images/giveaway/popper.png?v=20241125);">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">×</span>
        </button>
        <h4 class="modal-title" id="popup_modal_title">
        </h4>
      </div>
      <div class="modal-body" id="popup_modal_body">
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal" id="popup_modal_dismiss_button">
          OK
        </button>
        <button type="button" class="btn btn-secondary" data-dismiss="modal" id="popup_modal_cancel_button" style="display: none">
          Tidak
        </button>
        <button type="button" class="btn btn-primary" id="popup_modal_confirm_button" style="display: none">
          Ya
        </button>
      </div>
    </div>
  </div>
</div>

<script data-cfasync="false" src="/bundles/email-decode.min.js"></script>
<script src='/bundles/zelma-v2-beta-desktop-js' defer></script>

<script type="text/javascript">
  navigator.serviceWorker.getRegistrations().then(registrations => {
    for (const registration of registrations) {
      registration.unregister();
    }
  });
</script>

<div class="search-popup-container" id="search_popup_container"></div>
<script src='/bundles/reserve-js' defer></script>

</body>
</html>