{% include 'header.twig' %}

<style>.news-title{
    background: #334e6e15;
    padding:8px;
    margin-top:8px;
    border-radius:10px 10px 0px 0px;
}
.news-content{
    background: #334e6e15;
    margin-top:-8px;
    padding:5px 10px 10px;
    border-radius:0px 0px 10px 10px;
}
.news-date {
    margin-top:8px;
    font-size:12px;
    background: #334e6e35;
    padding:0px 8px 0px 8px;
    border-radius:6px;
    width:max-content;
}
.headsir{
    font-weight:900;
    font-size:20px;
    margin-top:-5px;
    margin-bottom:10px;
}
.ssw{max-height: 450px;overflow-y: auto;}.body .summary-card{border-radius: 22px;background: rgb(255 255 255 / 35%);border: 1.5px solid rgb(255 255 255 / 32%) !important;backdrop-filter: none;}</style>
               <style>


	#block_138 {
		position: relative;
		min-height: auto;
		padding-bottom: 10.9906px;
	}
	#block_138 .divider-top {
		background-image: none;
		width: 100%;
		position: absolute;
		top: 0;
		transform: rotateY(180deg);
		background-repeat: repeat-x;
		background-position: 0 0;
		background-size: 100% 58px;
		height: 58px;
		z-index: 0;
	}
	#block_138 .divider-bottom {
		background-image: none;
		width: 100%;
		position: absolute;
		bottom: 0;
		transform: rotateY(180deg);
		background-repeat: repeat-x;
		background-position: 0 0;
		background-size: 100% 58px;
		height: 58px;
		z-index: 0;
	}
	#block_138 .bg {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: transparent;
		background-image: none;
		background-size: cover;
		background-position: 50% 50%;
		background-repeat: no-repeat;
		background-attachment: scroll;
		opacity: 1;
		filter:blur(0px);
	}
	#block_138 .bg:after {
		content: ' ';
		display: block;
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background: transparent;
	}
	.body .card.summary-card {
		padding-top: 10px;
		padding-bottom: 10px;
	}
	#block_138 .totals-block__card {
  display: flex;
}
#block_138 .totals-block__card-left {
  width: 152px;
  flex-basis: 152px;
  padding-right: 12px;
}

#block_138 .totals-block__icon-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}
#block_138 .totals-block__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: content-box;
  margin-left: auto;
  margin-right: auto;
}
#block_138 .totals-block__icon-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}
#block_138 .totals-block__card-left {
  width: 152px;
  flex-basis: 152px;
  padding-right: 12px;
}
#block_138 .totals-block__card-right {
  width: 100%;
}
#block_138 .totals-block__card {
  display: flex;
}

.body .summary-card {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  color: #fff !important;
  border-radius: 22px;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.3) !important;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
}
.style-text-primary {
  color: #fff !important;
}

#block_138 .totals-block__icon-preview {
  width: 70px;
  height: 70px;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2);
}
#block_138 .totals-block__icon-preview i {
  font-size: 30px;
}
.totals-block__card-right {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}
.totals-block__count-value {
  font-size: 20px !important;
  line-height: 33px !important;
}
.totals-block__card-left {
  width: 100%;
}
.totals-block__card-name {
  font-size: 15px;
  clear: both;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
}   

</style>
<style>
#unique-dropdown{max-height: 300px;border-radius: 8px;margin-top:8px;border-left-width: 0px;border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-color: transparent;border-style: solid;box-shadow: 0 12px 24px 12px rgba(0, 0, 0, 0.2);overflow-y: auto;display: block;position: absolute;left:auto;max-width:100%;width: 86%;background:white;z-index: 1;}@media(min-width:776px){ #unique-dropdown{width: 93%;}}@media(min-width:991px){ #unique-dropdown{width: 92.4%;}}.selectme {padding: 3px 10px;cursor: pointer;list-style-type: none; }.selectme:hover {background-color: #f2f2f2;}.highlight {font-weight: bold; }.form-group .search-dropdown .input-wrapper .input-wrapper__prepend, .form-group .search-dropdown .input-wrapper .input-wrapper__append {position: absolute;background: none;border: none;top: 50%;transform: translateY(-50%);padding: 0px 15px;color: var(--form_group_icon_color);}.form-group .search-dropdown .input-wrapper .input-wrapper__prepend:hover, .form-group .search-dropdown .input-wrapper .input-wrapper__append:hover {opacity: 0.5;}.form-group .search-dropdown .input-wrapper .input-wrapper__prepend:hover, .form-group .search-dropdown .input-wrapper .input-wrapper__append:focus {outline:none;}.form-group .search-dropdown .input-wrapper .input-wrapper__append {font-size: 12px;right: 3px;display: none;}
</style>



<div class="wrapper-content">
<div class="wrapper-content__header">
  </div>
<div class="wrapper-content__body">
  <!-- Main variables *content* -->
<div id="block_93">
    <div class="new_order-block ">
<div class="bg"></div>
<div class="divider-top"></div>
<div class="divider-bottom"></div>
<div class="container">
       <div class="row">
<div class="col-lg-12 mt-3 mb- mb-lg-0">
<div class="component_form_group component_card component_radio_button">
<div class="">
<div class="component_button_forms">

{% if contentText %}
<div class="card ">																
{{ contentText }}
</div>
{% endif %}
</div>
</form>
</div>
</div></div>
</div>
</div></div>

   <div id="block_93">


<div class="totals mt-2">
<div class="container-fluid">
<div class="row align-items-stretch justify-content-center">
<div class="col-lg-3 col-md-6 col-sm-12 mb-2">
<div {% if settings ["summary_card_background_color"] == "fixed_colour" %} style="background: #58287F;" {% endif %} class="card h-100 summary-card">
<div class="totals-block__card">
<div class="totals-block__card-left">


<div class="totals-block__count">
<h2 class="totals-block__count-value style-text-primary">
{{ user["username"] }}
</h2>
</div>
<div class="totals-block__card-name">
<span>Welcome To {{site["site_name"]}}</span>
</div>
</div>
<div class="totals-block__card-right">
<div class="totals-block__icon-preview style-border-radius-default style-text-primary">
<i class="fad fa-user"></i>
</div>

</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12 mb-2">
<div  {% if settings ["summary_card_background_color"] == "fixed_colour" %}  style="background: #1F8A70;" {% endif %}  class="card h-100 summary-card">
<div class="totals-block__card">
<div class="totals-block__card-left">


<div class="totals-block__count">
<h2 class="totals-block__count-value style-text-primary">
{{ user["spent"]}}
</h2>
</div>
<div class="totals-block__card-name">
<p>
Total Spent
</p>
</div>
</div>
<div class="totals-block__card-right">
<div class="totals-block__icon-preview  style-border-radius-default style-text-primary">
<i class="fad fa-dollar-sign"></i>
</div>

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




<div class="col-lg-3 col-md-6 col-sm-12 mb-2">
<div  {% if settings ["summary_card_background_color"] == "fixed_colour" %}  style="background: #FF7000;" {% endif %}  class="card h-100 summary-card">
<div class="totals-block__card">
<div class="totals-block__card-left">


<div class="totals-block__count">
<h2 class="totals-block__count-value style-text-primary">
{{ totalorders }}
</h2>
</div>
<div class="totals-block__card-name">
<p>
Total Orders
</p>
</div>
</div>
<div class="totals-block__card-right">
<div class="totals-block__icon-preview style-border-radius-default style-text-primary">
<i class="fad fa-layer-plus"></i>
</div>

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



<div class="col-lg-3 col-md-6 col-sm-12 mb-2">
<div  {% if settings ["summary_card_background_color"] == "fixed_colour" %}  style="background: #850000;" {% endif %}  class="card h-100 summary-card">
<div class="totals-block__card">


<div class="totals-block__card-left">



<div class="totals-block__count">
<h2 class="totals-block__count-value style-text-primary">
{{ user["balance"]}} </h2>

</div>

<div class="totals-block__card-name">
<p>
Total Balance
</p>
</div>


</div>



<div class="totals-block__card-right">

<div class="totals-block__icon-preview  style-border-radius-default style-text-primary" style="
">
<i class="fad fa-wallet"></i>
</div>







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











<div id="block_44">
  <div class="new_order-block ">
<div class="bg"></div>
<div class="divider-top"></div>
<div class="divider-bottom"></div>
<div class="container-fluid">
  <div class="row">

  <div class="col-lg-7 mb-3">
<div class="component_form_group component_card component_radio_button">
<div class="card ">
    {% 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>
          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">❌</span></button>
          
          <strong> {{ lang["neworder.success.link"] }}: </strong> {{ data['order']['link'] }} <br>
          <strong> {{ lang["neworder.success.quantity"] }}: </strong> {{ data['order']['quantity'] }} <br>
          <strong> {{ lang["neworder.success.price"] }} Charge: </strong> {{ data['order']['price'] }} <br>
          <strong> {{ lang["neworder.success.balance"] }}: </strong>{{ data['order']['balance'] }} <br>
      

      </div>   


<script>

setTimeout(function() {
var el = $("#order-success-card");
el.addClass("order-success-card-active");
}, 1000);
function closeOrderReceiptCard() {

var el = document.getElementById("order-success-card");

el.classList.remove("order-success-card-active");
}
</script>

{% 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 %}
<br>
 	
<form method="post" action="">
<div class="component_button_forms">
    <div class="form-group">
        <div class="search-dropdown" id="new-order-search" style="position: relative;" data-lang-placeholder="Search">
            <div class="input-wrapper" style="position: relative;">
                <button type="button" class="input-wrapper__prepend" onclick="focusInputField()"><span class="fas fa-search"></span></button>
             <input style="padding-left:41px" type="text" class="form-control" id="unique-input" value="" placeholder="Search">
             <button type="button" class="input-wrapper__append" onclick="clearInput()"><span class="fas fa-times"></span></button>
            </div>
        </div>
        <div class="search-results" id="unique-dropdown" style="display: none;"></div>
    </div>
    <div class="form-group">


</div></div>

<form method="post" action="">
<div class="component_button_forms">
<div class="form-group">
<label for="orderformorderform-service" class="control-label">{{ lang["neworder.category"] }}</label>
<select class="form-control" id="neworder_category" name="categories" data-select="true" data-select-search="true" data-select-search-placeholder="Search" data-select-container="#select-category-container" tabindex="-1" aria-hidden="true">
{{ category_html_simplify }}

</select>
<div id="select-category-container" class="position-relative"></div>
</div>
</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" data-select="true" data-select-search="true" data-select-search-placeholder="Search" data-select-container="#select-service-container" tabindex="-1" aria-hidden="true">
<option value="1">No services found in this category</option>
</select>
<div id="select-service-container" class="position-relative"></div>
</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-block btn-primary">Place Order</button>
</form>


    
</div>
</div>
</div>
</div>
</div>
	
							    <!--	  <div class="container-fluid">
  <div class="row">

  <div class="col-lg-7 mb-3">
<div class="component_form_group component_card component_radio_button">
<div class="card ">
        <h4 style="text-align: center; "><span style="font-family: " times="" new="" roman";="" background-color:="" rgb(255,="" 255,="" 0);"="" background-color:""="" ;"=""><font color="#000000" style=""><b>How To add funds and order service {{ site["site_name"]  }}</b></font></span></h4><p style="text-align: center; ">
                        <iframe width="315" height="560" src="https://www.youtube.com/embed/WQfq3Hqnq8I" title="Main Smm panel service provider in india, smm panel, SMM Panel India, Cheap SMM Panel" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></p><p style="text-align: center; "><br></p><div class="benefit-box benefit-box1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> ----->

<div class="col-lg-5">
  <div class="component_content_card component_content_button component_content_headers">
{% if news %}
    <div class="card"style="max-height: 550px;">
      <div class="headsir"><i class="fal fa-newspaper mr-2"></i>Latest News</div>
      <div class="ssw">
      {% for new in news %}
      <div class="news-item">
        <div class="news-details">
          <p class="news-date"><i class="fad fa-calendar-alt mr-1" style="--fa-secondary-opacity: 0.65;"></i>{{ new['news_date'] }}</p>
          <h4 class="news-title">
            <span class="icon-container">
              <img width="30" class="news-icon-inline" src="{{ new['news_icon'] }}" alt="News Icon">
            </span>
            {{ new['news_title'] }}
          </h4>
          <div class="news-content">{{ new['news_content'] }}</div>
        </div>
      </div>
      {% endfor %}
      </div>
  </div>
  </div></div>{% endif%}
								</div>
							</div>
						</div>
					</div>	</div>
							
						

<div id="block_93"style="margin-top:0px">
    <div class="new_order-block ">
<div class="bg"></div>
<div class="divider-top"></div>
<div class="divider-bottom"></div>
<div class="container">
       <div class="row">
<div class="col-lg-7 mb-3 mb-lg-0">
<div class="component_form_group component_card component_radio_button">
<div class="">
<div class="component_button_forms">
</div>
</form>
</div>
</div>
</div>
<div class="col-lg-5 mb-3">
<div class="component_content_card component_content_button">

<div class="new-order__content-image">
</div>
<div class="new-order__content-title">
<div class="position-relative">
<div>
{% if contentText2 %}
<div class="card">
{{ contentText2 }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>








</div>
<div class="wrapper-content__footer">
   </div>
  </div>


</div></div></div></div></div>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>

<script>
function serviceclicked(sid,cid){
 
 console.log(sid, cid)
 $(`#neworder_category option[value=${cid}]`).prop('selected', 'selected').change();
setTimeout(servd, 1000)
function servd(){
  console.log('run after 1 second');
 $(`#neworder_services option[value=${sid}]`).prop('selected', 'selected').change();
  var h23 = $(`#neworder_services option[value=${sid}]`).attr('data-content');
  console.log(h23);
 h23 = h23.replace('<span class="badge badge-secondary style-text-primary badge-rounded">','');
 h23 = h23.replace('</span>','');
 h23 = h23.replace('</b>','');
 h23 = h23.replace('<b>','');
  $('#dropdown_for_search').html('');
 
  $('#search_services_field').val(h23);
}


 
 }
$(document).ready(function () {
    // Event listener for changes in the serviceSearch input
 
    $('#search_services_field').on('input', function () {
        // Get the input value
        var inputValue = $(this).val();
if(!inputValue){
   $('#dropdown_for_search').html('');
}else{
        // Making an AJAX request
        $.ajax({
            type: 'POST',
            url: '/ajax_data',  // Replace '/neworder' with the actual URL of your neworder route
            data: { 
                action: 'service_search' ,
                search_term: inputValue
            },
            beforeSend: function(){
               $('#dropdown_for_search').html(`<div class="dropdown-item"  bis_skin_checked="1" style="padding: 6px 9px; cursor: pointer;"><span class="badge service_id_badge bg-primary">Searching</span> Please Wait...</div>`);
            },
            success: function (response) {
                // Handle the response from the server
              
                 $('#dropdown_for_search').html(response);
              
                // You can update the DOM or perform other actions based on the response
            },
            error: function (error) {
                console.error('AJAX error:', error);
            }
        });
    }});
});
</script>
                                  
     

                                                                                                                                                   
{% include 'footer.twig' %}