<div class="card">
<div class="card-body">
<div class="col-12 col-md-12">
<div class="alert alert-primary">
<p class="m-0 p-0">
قیمت ها با
<strong>
احتساب تخفیف پلکانی
</strong>
و
<strong>
شارژ هدیه
</strong>
موجود حساب شما محاسبه می گردد
<a href="{{ path('app_user_vpn_dynamic_price') }}">
اطلاعات بیشتر
</a>
</p>
</div>
</div>
<ul class="nav nav-pills mb-3 w-100" id="pills-tab" role="tablist">
<li class="nav-item " style="width: 100% !important;" role="presentation">
<button class="mb-1 w-100 nav-link" id="pills-vip-tab" data-bs-toggle="pill" data-bs-target="#pills-vip"
type="button" role="tab" aria-controls="pills-vip" aria-selected="true">
میکس
<br>
تمام پروتکل ها V2ray + OpenVPN + Cisco
<br>
PC-Mobile-TV
</button>
</li>
<li class="nav-item " style="width: 33% !important;" role="presentation">
<button class="mb-1 w-100 nav-link active" id="pills-v2ray-tab" data-bs-toggle="pill" data-bs-target="#pills-v2ray"
type="button" role="tab" aria-controls="pills-v2ray" aria-selected="true">
V2RAY
<br>
سرویس وی تو ری
<br>
PC-Mobile-TV
</button>
</li>
<li class="nav-item " style="width: 33% !important;" role="presentation">
<button class="mb-1 w-100 nav-link" id="pills-cisco-tab" data-bs-toggle="pill" data-bs-target="#pills-cisco" type="button"
role="tab" aria-controls="pills-cisco" aria-selected="false">
Cisco
<br>
سرویس سیسکو انی کانکت
<br>
PC-Mobile-TV
</button>
</li>
<li class="nav-item " style="width: 33% !important;" role="presentation">
<button class="mb-1 w-100 nav-link" id="pills-open-tab" data-bs-toggle="pill" data-bs-target="#pills-open" type="button"
role="tab" aria-controls="pills-open" aria-selected="false">
OpenVPN/L2TP
<br>
سرویس اوپن وی پی ان / ال تو تی پی
<br>
PC-Mobile-TV
</button>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-v2ray" role="tabpanel" aria-labelledby="pills-v2ray-tab"
tabindex="0">
{% include 'panel/pages/user/vpn/service/v2ray-form.html.twig' with {'sizedV2rayForm' : sizedV2rayForm , 'unlimitedV2rayForm' : unlimitedV2rayForm} %}
</div>
<div class="tab-pane fade" id="pills-cisco" role="tabpanel" aria-labelledby="pills-cisco-tab" tabindex="0">
{% include 'panel/pages/user/vpn/service/cisco-form.html.twig' with {'sizedOcServForm' : sizedOcServForm , 'unlimitedOcServForm' : unlimitedOcServForm} %}
</div>
<div class="tab-pane fade" id="pills-open" role="tabpanel" aria-labelledby="pills-open-tab" tabindex="0">
{% include 'panel/pages/user/vpn/service/open-form.html.twig' with {'sizedOpenForm' : sizedOpenForm , 'unlimitedOpenForm' : unlimitedOpenForm}%}
</div>
<div class="tab-pane fade" id="pills-vip" role="tabpanel" aria-labelledby="pills-vip-tab"
tabindex="0">
{% include 'panel/pages/user/vpn/service/vip-form.html.twig' with {'sizedVipForm' : sizedVipForm} %}
</div>
</div>
</div>
</div>
{% block footer %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
// Vip Limited
$(document).ready(function() {
$('.ajax-vipLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#limited_vip_price').val(response.message);
}
});
});
});
// V2ray Limited
$(document).ready(function() {
$('.ajax-v2rayLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#limited_v2ray_price').val(response.message);
}
});
});
});
// V2ray UnLimited
$(document).ready(function() {
$('.ajax-v2rayUnLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#unlimited_v2ray_price').val(response.message);
}
});
});
});
// open Limited
$(document).ready(function() {
$('.ajax-openLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#limited_open_price').val(response.message);
}
});
});
});
// open UnLimited
$(document).ready(function() {
$('.ajax-openUnLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#unlimited_open_price').val(response.message);
}
});
});
});
// ocserv Limited
$(document).ready(function() {
$('.ajax-ocservLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#limited_oc_serv_price').val(response.message);
}
});
});
});
// ocserv UnLimited
$(document).ready(function() {
$('.ajax-ocservUnLimited').on('change', function() {
let formElement = $(this).closest('form'); // Find the closest form element
let formName = formElement.attr('name'); // Get the form's name attribute
let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
let formData = {}; // Object to store cleaned data
// Remove the form name prefix
$.each(rawData, function(index, field) {
let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
formData[fieldName] = field.value;
});
$.ajax({
url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
type: "POST",
data: formData, // Send cleaned data
success: function(response) {
$('#unlimited_oc_serv_price').val(response.message);
}
});
});
});
});
</script>
{% endblock %}