<!DOCTYPE html>

<html lang="en">

	<head>

		<meta http-equiv="content-type" content="text/html; charset=UTF-8">

		<title>{{ title }}</title>

		<meta property="og:title" content="{{ title }}" />

			<meta charset="utf-8">

							<meta http-equiv="cache-control" content="no-cache">

							<meta http-equiv="expires" content="0">

							<meta http-equiv="X-UA-Compatible" content="IE=edge">

							<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="keywords" content="{{ site['keywords'] }}" />

								<meta name="description" content="{{ site['description'] }}" />

								<meta property="og:description" content="{{ site['description'] }}" /><link rel="icon" href="{{ site['favicon'] }}" type="image/gif" sizes="32x32">
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css" />
      <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.0/animate.css">
		<link href="/assets/style.css" rel="stylesheet">
		<link href="https://cdn.rentalpanel.com/main/fa5151/css/all.min.css" rel="stylesheet">
					<link href="/assets/default_css.css" rel="stylesheet"><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.css" rel="stylesheet">
		
      	
	</head>
	<body id="order-pages" class="order_history authorized">
		
		<nav class="navbar navbar-default navbar-static-top">
												<div class="container-fluid">
													<div class="navbar-header">
														<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
															<span class="sr-only"></span>
															<span class="icon-bar"></span>
															<span class="icon-bar"></span>
															<span class="icon-bar"></span>
														</button>
														<a class="navbar-brand navbar-brand-emphasized" href="/">
													
													<img class="red-logo" src="{{ site['logo'] }}" alt="{{ site['site_name'] }}" title="{{ site['site_name'] }}">												</a>
													</div>
													<div id="navbar" class="navbar-collapse collapse" data-nav="navbar-priority" >
														<ul id="sidebar_menu" class="sidebar-nav">
															<li class="sidebar-brand">
																<button id="menu-toggle" href="#">
																<span class="icon-bar"></span>
																<span class="icon-bar"></span>
																<span class="icon-bar"></span>
																</button>
															</li>
														</ul>
														
														<ul class="nav navbar-nav nav-bar-leftside sidebar-nav">
															<li class="nav-item  menu_item_1 " id="menu_item_1">
												<a class="nav-link" href="/">
													 New Order 
												</a>
											</li><li class="nav-item  menu_item_3 " id="menu_item_3">
												<a class="nav-link" href="/orders">
													 Order History
												</a>
											</li><li class="nav-item  menu_item_4 " id="menu_item_4">
												<a class="nav-link" href="/services">
													 Services 
												</a>
											</li><li class="nav-item  menu_item_7 " id="menu_item_7">
												<a class="nav-link" href="/addfunds">
													 Add Funds 
												</a>
											</li><li class="nav-item  menu_item_10 " id="menu_item_10">
												<a class="nav-link" href="/child-panels">
													 Child 
Panel
												</a>	
											</li><li class="nav-item  menu_item_10 " id="menu_item_10">
												<a class="nav-link" href="/tickets">
													 Tickets <span class="badge" style="">0</span>
												</a>
											</li><li class="nav-item  menu_item_12 " id="menu_item_12">
												<a class="nav-link" href="/api">
													 API 
												</a>
											</li>
														</ul>

												</li>
											</ul>
														
														<ul class="nav navbar-nav nav-bar-account navbar-right">
															<li>
																<a> 
																	<span class="badge" >
																		{{ settings['csymbol'] }} {{ user['balance'] }}
																	</span> 
																</a>
															</li>
															<li class="dropdown ">
																<a href="#" class="dropdown-toggle" data-toggle="dropdown">
																	<i class="fas fa-user"></i>
																	  {{ user["username"] }} 
																	<span class="caret"></span>
																</a>
																<ul class="dropdown-menu">
																<li><a href="/account">Account</a></li>                 
																	<li><a href="/logout">Logout</a></li>
																</ul>
															</li>
														</ul>
													</div>
												</div>
											</nav>
		
		
			
	
		<div class="paddingbody"></div>
		<div class="container-fluid container-fluid-spacious">
			<div class="row">
				<div class="col-md-12">
					<div  class="well well-float table-responsive">
							
					</div>
					
					
				
					<nav>
						<ul class="nav nav-pills ">
							<li class="active"><a href="?type=all">All</a></li>
							<li class=""><a href="/pending">Pending</a></li>
							<li class=""><a href="/inprogress">In Progress</a></li>
							<li class=""><a href="/completed">Completed</a></li>
							<li class=""><a href="/partial">Partial</a></li>
							<li class=""><a href="orders/canceled">Canceled</a></li>
							<li class=""><a href="/processing">Order Process</a></li>
						 </ul>
						<div class="col-lg-6 col-xs-12 forced-pull-right-search">
							<form action="" method="get" id="history-search">
								<div class="input-group">
									<input name="search" class="form-control" placeholder="Search orders" type="text">
									<span class="input-group-btn">
									<button type="submit" class="btn btn-default"><i class="fa fa-search" aria-hidden="true"></i></button>
									</span>
								</div>
							</form>
						</div>
						
						<select class="custom-select w-full" >
							<option value="?type=all" selected="selected" >All</option>
						<option value="orders/pending"  >Pending</option>
							<option value="orders/inprogress"   >In Progress</option>
							<option value="orders/completed"  >Completed</option>
							<option value="orders/partial" >Partial</option>
							<option value="orders/canceled"  >Canceled</option>
							<option value="orders/processing"   >Order Process</option>
						</select>
						<div class="select-search search">
							<form action="" method="get" id="history-search-mobile">
								<div class="input-group">
									<input name="search" class="form-control" placeholder="Search orders" type="text">
									<span class="input-group-btn">
									<button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i></button>
									</span>
								</div>
							</form>		 
						 
					</nav>
				</div>
				<div class="col-md-12">
					<div id="order-page" class="well well-float table-responsive">
						<table class="table ">
							<thead>
								<tr>
									<th>{{ lang['orders.id'] }}</th>
              <th>{{ lang['orders.date'] }}</th>
              <th class="width-40">{{ lang['orders.link'] }}</th>
              <th>{{ lang['orders.charge'] }}</th>
              <th class="nowrap">{{ lang['orders.start.count'] }}</th>
              <th>{{ lang['orders.quantity'] }}</th>
              <th>{{ lang['orders.service'] }}</th>
              <th>{{ lang['orders.status'] }}</th>
              <th>{{ lang['orders.remains'] }}</th
									<th > </th>
								</tr>
							</thead>
							<tbody>
								
{% for order in orders %}
              <tr>
                <td>{{ order['id'] }}</td>
                <td>{{ order['date'] }}</td>
                <td class="width-40">{{ order['link'] }}</td>
                <td>{{ order['charge'] }}</td>
                <td class="nowrap">{{ order['start_count'] }}</td>
                <td>{{ order['quantity'] }}</td>
                <td>{{ order['service'] }}</td>
                <td>{{ order['status'] }}</td>
                <td>{{ order['remains'] }}</td>
              </tr>
            {% endfor %}
							</tbody>
						</table>
					</div>
					
					      {% if pagination["count"] > 1 %}
        <ul class="pagination">

          {% if pagination["current"] != 1 %}
            <li>
              <a href="orders/{{ status }}/{{ pagination["previous"] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Previous">
                <span aria-hidden="true">&laquo;</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 href="orders/{{ status }}/{{ page }}{% if search %}?search={{ search }}{% endif %}">{{ page }}</a></li>
            {%endif%}
          {% endfor %}

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

        </ul>
      {% endif %}

<div  class="well well-float table-responsive">
					
					</body>
	<script>
					if( (self.parent && !(self.parent===self))
						&&(self.parent.frames.length!=0)){
						self.parent.location=document.location
					}
					</script><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
		
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.27.6/js/jquery.tablesorter.js"></script>
			<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10" ></script>
			<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
			<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script><script src="/assets/toolkit.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
	<script src="/assets/application.v21.60.12.js"></script>
 
  	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.js"></script>
  <script>
    new WOW().init();
  </script>
</html>	
