{% include 'header.twig' %}

   <div class="wrapper-content">
    <div class="wrapper-content__header">
          </div>
    <div class="wrapper-content__body">
      <!-- Main variables *content* -->
      <div id="block_47"><div class="block-bg"></div><div class="container"><div class="orders-history ">
  <div class="row align-items-start justify-content-start">
                                                <div class="col-lg-6 col-sm-12 mb-2 mt-2">
          <div class="card h-100"
               style="
                                                                                                                                                padding-top: 24px;                                  padding-bottom: 24px;                                                                                                                                                                                                                                  border-left-width: 0px;                                  border-right-width: 0px;                                  border-bottom-width: 0px;                                  border-top-width: 0px;                                                                  border-style: solid; ">
            <div class="totals-block__card">
                              <div class="totals-block__card-left">
                  <div
                          class="totals-block__icon-preview style-bg-primary-alpha-10 style-border-radius-default style-text-primary"
                          style="
                                                                                                                                                                                                                            ">
                        <span class="totals-block__icon style-text-primary fas fa-hands-usd" style="
                                font-size: 38px;
                                transform: rotate(0deg);
                                color: ;
                                text-shadow: Array;
                                border-radius: 0px;
                                "></span>
                  </div>
                </div>
                            <div class="totals-block__card-right">
                                <div class="totals-block__count">
                  <h2 class="totals-block__count-value style-text-primary"
                      style="">
                                                                 {{ user["balance"] }}
                                                                                </h2>
                </div>
                <div class="totals-block__card-name">
                                      <p>Account balance</p>
                                  </div>
              </div>
            </div>
          </div>
        </div>
                                  <div class="col-lg-6 col-sm-12 mb-2 mt-2">
          <div class="card h-100"
               style="
                                                                                                                                                padding-top: 24px;                                  padding-bottom: 24px;                                                                                                                                                                                                                                  border-left-width: 0px;                                  border-right-width: 0px;                                  border-bottom-width: 0px;                                  border-top-width: 0px;                                                                  border-style: solid; ">
            <div class="totals-block__card">
                              <div class="totals-block__card-left">
                  <div
                          class="totals-block__icon-preview style-bg-primary-alpha-10 style-border-radius-default style-text-primary"
                          style="
                                                                                                                                                                                                                            ">
                        <span class="totals-block__icon style-text-primary fad fa-chart-bar" style="
                                font-size: 38px;
                                transform: rotate(0deg);
                                color: ;
                                text-shadow: Array;
                                border-radius: 0px;
                                "></span>
                  </div>
                </div>
                            <div class="totals-block__card-right">
                                <div class="totals-block__count">
                  <h2 class="totals-block__count-value style-text-primary"
                      style="">
                                                                 {{totalorders}} 
                                                                                </h2>
                </div>
                <div class="totals-block__card-name">
                                      <p> total orders</p>
                                  </div>
              </div>
            </div>
          </div>
        </div>
            </div>
</div></div></div><div id="block_68"><div class="block-bg"></div><div class="container"><div class="faq ">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="row">
                                    <div class="col-lg-12">
                        <div class="faq-block__card">
                            <div class="card" style="
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ">
                                <div class="faq-block__header collapsed" data-toggle="collapse" data-target="#faq-block-68-1" aria-expanded="false" aria-controls="#faq-block-68-1">
                                    <div class="faq-block__header-title">
                                                                                    <h4>Read About Status FAQ's!</h4>
                                                                            </div>
                                    <div class="faq-block__header-icon">
                                        <div class="style-text-dark faq-block__icon" style=""></div>
                                    </div>
                                </div>
                                <div class="faq-block__body collapse" id="faq-block-68-1">
                                    <div class="faq-block__body-description" style="padding-top: 8px">
                                                                                    <p>Why order in pending?</p>
<p>&gt; We mentioned some start time on service description, so till start time preiod usualy a order can shows in pending.</p>
<p><br></p>
<p>What is In progress?</p>
<p>&gt; In progress means server delivering your quntity.</p>
<p><br></p>
<p>What is completed?</p>
<p>&gt; Complete means sever delivered your quntity.</p>
<p><br></p>
<p>Why order in processing?</p>
<p>&gt; For overloaded issue order got processing but after sometimes it will fix automatic.</p>
<p><br></p>
<p>What is cancelled?</p>
<p>&gt; Sometimes server got problem and unable to take order and it cancel the order. If any order got cancel, it automatically refund the money for that order too. Check the order it's cost 0. You can check your account balance too. In this case just order again.</p>
<p><br></p>
<p>What is partial?</p>
<p>&gt; Partial Status is when we partially refund the remains of an order. Sometimes for some reasons we are unable to deliver a full order, so we refund you the remaining undelivered amount.</p>
<p><strong style="font-weight: bold">Example</strong>: You bought an order with quantity 5000 and charges 5$, let's say we delivered 3000 and the remaining 2000 we couldn't deliver, then we will "Partial" the order and refund you the remaining 2000 (2$ in this example). This partial refunded amount will automacally adjust to your user balance.</p>
<p>If an order got partial, you can order again using other server.</p>
                                                                            </div>
                                </div>
                            </div>
                        </div>
                    </div>
                            </div>
        </div>
    </div>
        
        
        
        
        
</div></div></div><div id="block_16"><div class="block-bg"></div><div class="block-divider-bottom"><svg width="100%" height="100%" viewBox="0 0 1280 140" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="M640 139L0 0v140h1280V0L640 139z" fill-opacity=".5"/><path d="M640 139L0 42v98h1280V42l-640 97z"/></g></svg></div><div class="container-fluid"><div class="orders-history ">
    <div class="row">
        <div class="col">
            <div class="orders-history__margin-tab">
                <div class="component_status_tabs">
                    <div class="">
                        <ul class="nav nav-pills tab">
                            <li class="nav-item">
		<a {% if 'all' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders">All</a>
		</li>
        <li class="nav-item"><a {% if 'pending' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/pending">{{ lang['orders.status.pending'] }}</a></li>
        <li class="nav-item"><a {% if 'inprogress' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/inprogress">{{ lang['orders.status.inprogress'] }}</a></li>
        <li class="nav-item"><a {% if 'completed' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/completed">{{ lang['orders.status.completed'] }}</a></li>
        <li class="nav-item"><a {% if 'partial' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/partial">{{ lang['orders.status.partial'] }}</a></li>
        <li class="nav-item"><a {% if 'processing' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/processing">{{ lang['orders.status.processing'] }}</a></li>
        <li class="nav-item"><a {% if 'canceled' == status %}  class="nav-link active" {% endif %} class="nav-link" href="orders/canceled">{{ lang['orders.status.canceled'] }}</a></li>
       
      </ul><br>
	       <div class="row">
                <div class="col-12">
                    <div class="orders-history__margin-search component_card">
                        <div class="card">
                            <div class="component_form_group component_button_search">
                                <div class="">
                                    <form action="" method="get" id="history-search">
                                        <div class="input-group">
                                            <input type="text" name="search" class="form-control" value="{{ search }}" placeholder="Search orders">
                                            <div class="input-group-append">
                                                <button class="btn btn-big-secondary" type="submit">
                                                    <span class="fas fa-search"></span>
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                             </div>
                        </div>
                    </div>
                </div>
            </div>
     <div class="row">
                <div class="col">
                    <div class="orders-history__margin-table">
                        <div class="table-bg component_table ">
                            <div class="table-wr table-responsive">
        <table class="table ">
          <thead>
            <tr>
              <th>{{ lang['orders.id'] }}</th>
              <th>{{ lang['orders.date'] }}</th>
              <th width="20%">{{ lang['orders.link'] }}</th>
              <th>{{ lang['orders.charge'] }}</th>
              <th class="nowrap">{{ lang['orders.start.count'] }}</th>
              <th>{{ lang['orders.quantity'] }}</th>
              <th width="20%">{{ lang['orders.service'] }}</th>
              <th>Status</th>
              <th>Remains</th>
<th></th>
            </tr>
          </thead>
          <tbody>

            {% for order in orders %}
              <tr>
<td>
<span id="order-{{ order['id'] }}">{{ order['id'] }}</span>
                                        <a>
                                            <span
                                                data-clip="true"
                                                title="Order Id copied"
                                                data-clipboard-action="copy"
                                                data-clipboard-target="#order-{{ order['id'] }}"
                                                class="fas fa-clone"></span>
                                        </a>

                                        
{% if order['order_where'] == "api"  %}<a class="btn btn-actions">Api</a>{% endif %} </td>
                <td>{{ order['date'] }}</td>
                <td width="20%"><a target="_blank" href="{{ order['link'] }}">{{ order['link'] }}</a></td>
<td><div style="width:90px;">{{order["charge"]}}</div></td>
                <td class="nowrap">{{ order['start_count'] }}</td>
                <td>{{ order['quantity'] }}</td>
                <td><div  style="width:300px;"> ➤  {{ order['service'] }}</div></td>
                
                                        <td>{% if order['status'] == lang['orders.status.completed'] %}
								<div class="ordStatus align-items-center" style="background: #28a745; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-checkbox-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
								
              {% if order['status'] == lang['orders.status.inprogress'] %}
								<div class="ordStatus align-items-center" style="background: #ff870b; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-loader-2-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
                
                {% if order['status'] == lang['orders.status.pending'] %}
								<div class="ordStatus align-items-center" style="background: #ffcc29; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-file-damage-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
								
								{% if order['status'] == lang['orders.status.partial'] %}
								<div class="ordStatus align-items-center" style="background: #11698e; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-star-half-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
								
									{% if order['status'] == lang['orders.status.processing'] %}
								<div class="ordStatus align-items-center" style="background: #61c0bf; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-remote-control-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
								
								
									{% if order['status'] == lang['orders.status.canceled'] %}
								<div class="ordStatus align-items-center" style="background: #ec4646; color:#000; border-radius: 15px; padding: 5px 15px; font-size: 12px; text-align: center;">
								   <i class="ri-qr-scan-line"></i>
								   <span style="color:#000">{{order['status']}}</span>
								</div>
								{% endif %}
								
								</td>
                <td>{{ order['remains'] }}</td>
<td>
{% if order["refillButton"] == "2" %}
{% if order['status'] == "Completed"  %}

{% if order['show_refill'] == "true"  %}
<a href="orders/refill/{{order['id']}}" class="btn btn-sm refill-button">Refill</a>
<br><br>
{% endif %}
{% endif %}
{% endif %}
{% if order["refillButton"] == "3" %}

{% if order['status'] == "Completed"  %}

{% if order['show_refill'] == "true"  %}
  <button data-tippy-content="Refill will be available in {{order['refillTimeLeft']}}" class="btn btn-sm refill-button">Refill</button>
{% endif %}
{% endif %}
{% endif %}
{% if order["refillButton"] == "4" %}



{% if order['status'] == "Completed"  %}

{% if order['show_refill'] == "true"  %}
<button type="button" class="btn btn-sm refill-button" disabled="true">{{"Refilling"}}</button>
{% endif %}
{% endif %}
{% endif %}

{% if order['cancelButton']   == true %}
         


                   <a href="orders/cancel/{{order['id']}}" class="btn btn-actions bg-danger">cancel</a>
               {% endif %}

                 </td>
              </tr>
            {% endfor %}

          </tbody>
        </table>
      </div>

      {% if pagination["count"] > 1 %}
        <ul class="pagination">

          {% if pagination["current"] != 1 %}
            <li>
              <a class="btn btn-actions" href="orders/{{ status }}/{{ pagination["previous"] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Previous">
                <span aria-hidden="true">«</span>
              </a>
            </li>
          {% endif %}

          {% set r, l = 3, 3 %}

          {% if pagination['current'] == 1 %}
            {% set r = 7 %}
          {% endif %}

          {% if pagination['current'] == 2 %}
            {% set r = 5 %}
          {% endif %}

          {% if pagination['current'] >= pagination['count'] %}
            {% set l = 5 %}
          {% endif %}

          {% for page in 1..pagination["count"] %}
            {% if page >= (pagination['current']-l) and page <= (pagination['current']+r) %}
              <li{% if page == pagination['current'] %} class="active" {%endif%}><a class="btn btn-actions" 
 href="orders/{{ status }}/{{ page }}{% if search %}?search={{ search }}{% endif %}">{{ page }}</a></li>
            {%endif%}
          {% endfor %}

          {% if pagination['current'] < pagination['count'] %}
            <li>
              <a class="btn btn-actions" href="orders/{{ status }}/{{ pagination['next'] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Next">
                <span aria-hidden="true">»</span>
              </a>
            </li>
          {% endif %}

        </ul>
      {% endif %}

    </div>
   </div></div>
   </div></div></div></div></div>
   </div</div></div>
   </div></div></div>
   </div>
 <div class="divider-top"></div>
        <div class="divider-bottom"></div>
        <div class="container-fluid">
 {% if contentText2 %}
 <div class="card mb-4">	
{{ contentText2 }}
</div>
{% endif %}
</div>

{% include 'footer.twig' %}

                

                       