{% include 'header.twig' %}

  <div class="col-md-12">
      <div class="well" style="
    -webkit-box-shadow: 0px 4px 7px -2px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.75);
    /* box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.75); */" >
      

      {% if error %}
        <div class="alert alert-dismissible alert-danger">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorText }}
        </div>
      {% endif %}
      {% if success %}
        <div class="alert alert-dismissible alert-success">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ successText }}
        </div>
      {% endif %}

      
        <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.username'] }}</label>
          <input type="text" class="form-control" value="{{ user['username'] }}" readonly>
        </div>

        <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.name'] }}</label>
          <input type="text" class="form-control" value="{{ user['name'] }}" readonly>
        </div>

        <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.email'] }}</label>
          <input type="text" class="form-control" value="{{ user['email'] }}" readonly>
        </div>
          <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.telephone'] }}</label>
          <input type="text" class="form-control" value="{{ user['telephone'] }}" readonly>
        </div>
        
      </div>
      <div class="well">
             <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.statu'] }}</label>
          <input type="text" class="form-control" value="{{ statu }}" readonly>
        </div>
        
          <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.balance'] }}</label>
          <input type="text" class="form-control" value=" {% if settings['site_currency'] == "TRY" %}{{ "&#8378;" }}
                {% elseif settings['site_currency'] == "USD" %} {{ "&#36;" }}
				{% elseif settings['site_currency'] == "INR" %} {{ "₹" }}
                {% else %}{{ "&#8364;" }}
                {% endif %}
				{{ user['balance'] }}" readonly>
        </div>
          <div class="form-group">
          <label for="charge" class="control-label">{{ lang['account.spent'] }}</label>
          <input type="text" class="form-control" value=" {% if settings['site_currency'] == "TRY" %}{{ "&#8378;" }}
                {% elseif settings['site_currency'] == "USD" %}{{ "&#36;" }}
				{% elseif settings['site_currency'] == "INR" %} {{ "₹" }}
                {% else %}{{ "&#8364;" }}
                {% endif %}{{ user['spent'] }}" readonly>
        </div></div>
      <div class="well">
        <form method="post" action="account">

          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.current'] }}</label>
            <input type="password" class="form-control" value="" name="current_password">
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.new'] }}</label>
            <input type="password" class="form-control" value="" name="password">
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">{{ lang['account.password.confirm'] }}</label>
            <input type="password" class="form-control" value="" name="confirm_password">
          </div>
          <button type="submit" class="btn btn-primary">{{ lang['account.password.button'] }}</button>
        </form>
      </div>

      {% if site['languages']|length > 1 %}
        <div class="well">
          <form method="post" action="account/change_lang">

            <div class="form-group">
              <label for="charge" class="control-label">{{ lang['account.changelang.title'] }}</label>
              <select class="form-control" name="lang">
                  {% for language in site['languages'] %}
                  <option {% if language["code"] == user["lang"] %} selected {% endif %} value="{{ language["code"] }}">{{ language["name"] }}</option>
                  {% endfor %}
              </select>
            </div>

            <button type="submit" class="btn btn-primary">{{ lang['account.changelang.button'] }}</button>
          </form>
        </div>
       {% endif %}

       <div class="well">
         <form method="post" action="account/timezone">

           <div class="form-group">
             <label for="charge" class="control-label">{{ lang['account.timezone.title'] }}</label>
             <select class="form-control" name="timezone">
                 {% for timezone in timezones %}
                 <option {% if timezone["timezone"] == user['timezone'] %} selected {% endif %} value="{{ timezone["timezone"] }}">{{ timezone["label"] }}</option>
                 {% endfor %}
             </select>
           </div>

           <button type="submit" class="btn btn-primary">{{ lang['account.timezone.button'] }}</button>
         </form>
       </div>

      <div class="well">
        <form method="post" action="account/newapikey">
          <div class="form-group">
            <label for="charge" class="control-label">API Link</label>
            <input type="text" class="form-control" value="{{ site['url'] }}/api/v2" readonly>
          </div>

          <div class="form-group">
            <label for="charge" class="control-label">API Key</label>
            <input type="text" class="form-control" value="{{ user['apikey'] }}" readonly>
          </div>
          <button type="submit" class="btn btn-primary">{{ lang['account.generate.key'] }}</button>
        </form>
      </div>

    </div>
  </div>
</div>


{% include 'footer.twig' %}
