{% include 'header.twig' %}



<div class="container">
  <div class="row">  



      <div class="col-md-12">

<div class="well">
  <h1 class="first-user-h"> <p style="color:grey;">Welcome <span class="ticket-user-name">{{ user['username'] }}</span> </p></h1>
     <p calss="first-user-p"> </p><p style="color:grey;">Getting started, you can:</p> <p></p>
        <ol class="first-user-ol">
            <li>To order, <a href="/addfunds"> load balance </a>.</li>
          <li><a href="/tickets"> Create a support ticket </a> for help.</li>
            <li>Read the <a href="/terms"> user agreement </a> before you begin.</li>
         </ol>

          </div>
        </div>
     
    <br><br>
  
<div class="col-lg-6">
          <div class="card card-success card-inverse">
              <div class="box text-center">
                  <h1 class="font-light text-white"><i class="fa fa-rupee"></i>{{ user['balance'] }}</h1>
                  <h6 class="text-white">Account balance</h6>
              </div>
          </div>
</div>


<div class="col-md-6">
   
          <div class="card card-success card-inverse">
              <div class="box text-center">
                <h1 class="font-light text-white"><i class="fa fa-rupee"></i>{{ user['spent'] }}</h1>
 
                  <h6 class="text-white"> Amount Spent</h6>
              </div>
          </div>
</div>

</div>
     
      {% if ticketCount > 0 %}
<div class="alert alert-info"><i class="fa fa-envelope"></i> Your Support Request Has Been Answered!</div>
     {% endif %}

          {% if user['balance'] < 5 %}
      <div class="alert alert-dismissible alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
       <p> Hi <b>{{ user['username'] }}</b>,
        <br>Your balance seems to be running low. We recommend that you load the balance to get service without interruption.
        <br><b>You can quickly load a balance <a href="addfunds"> here </a> </b>. If you have a problem, you can reach it from the <a href="tickets"> <strong> support </strong> </a> page. </ P>
      </div>
     {% endif %}
    

     
        {% if error %}
      <div class="alert alert-dismissible alert-danger">
        {{ errorText }}
      </div>
    {% endif %}
   {% if data["order"]["success"] == 1 %}
      <div class="alert alert-dismissible alert-success">
          <strong> {{ lang["neworder.success.id"] }}: </strong> {{ data['order']['id'] }} <br>
          <strong> {{ lang["neworder.success.service"] }}: </strong> {{ data['order']['service'] }} <br>
          <strong> {{ lang["neworder.success.link"] }}: </strong> {{ data['order']['link'] }} <br>
          <strong> {{ lang["neworder.success.quantity"] }}: </strong> {{ data['order']['quantity'] }} <br>
          <strong> {{ lang["neworder.success.charge"] }}: </strong> {{ data['order']['price'] }} <br>
          <strong> {{ lang["neworder.success.balance"] }}: </strong>{{ data['order']['balance'] }} <br>
      </div>
    {% endif %}
    {% if data["order"]["success"] == 2 %}
      <div class="alert alert-dismissible alert-success">
         <strong> {{ lang["neworder.success.id"] }}: </strong> {{ data['order']['id'] }} <br>
         <strong> {{ lang["neworder.success.service"] }}: </strong> {{ data['order']['service'] }} <br>
         <strong> {{ lang["neworder.success.username"] }}: </strong> {{ data['order']['link'] }} <br>
         <strong> {{ lang["neworder.success.quantity"] }}: </strong> {{ data['order']['min'] }} - {{ data['order']['max'] }} <br>
         <strong> {{ lang["neworder.success.posts"] }}: </strong> {{ data['order']['posts'] }} <br>
         <strong> {{ lang["neworder.success.delay"] }}: </strong>{{ data['order']['delay'] }} <br>
       </div>
    {% endif %}
    
  
      
      <div class="well"> 
        <center><h1>Quick Order Form</h1></center><br>
       
        <form method="post" action="">

            <div class="form-group">
              <label for="orderform-category" class="control-label">{{ lang["neworder.category"] }}</label>
              <select class="form-control" id="neworder_category" name="categories">
                {% for category in categories %}
                    <option value="{{ category["category_id"] }}" {% if category["category_id"] == data['categories'] %} selected {% endif %} >{{ category["category_name"] }}</option>
                {% endfor %}
                </select>
            </div>
            <div class="form-group">
              <label for="orderform-service" class="control-label">{{ lang["neworder.service"] }}</label>
              <select class="form-control" id="neworder_services" name="services">

              </select>
            </div>

            <div id="neworder_fields"></div>

            <div class="form-group" id="charge_div">
              <label for="charge" class="control-label">{{ lang["neworder.charge"] }}</label>
              <input type="text" class="form-control" id="charge" readonly>
            </div>

			
        
          <button type="submit" class="btn btn-primary btn-block">{{ lang["neworder.button"] }}</button>

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

<div class="container">
  <div class="row">
    <div class="col-md-8 col-md-offset-2">
      <div class="well ">
        {{ contentText }}
      </div>
    </div>
  </div>
</div>
      
{% include 'footer.twig' %}
