templates/panel/modules/user/vpn/service/enter.html.twig line 1

Open in your IDE?
  1. <div class="card">
  2.     <div class="card-body">
  3.         <div class="col-12 col-md-12">
  4.             <div class="alert alert-danger">
  5.                 <p class="m-0 p-0">
  6.                     مهم :
  7.                     با توجه به شرایط حساس کشوری به شدت پیشنهاد میشود برای جلوگیری از بروز اختلالات در یک پروتکل خاص از سرویس های میکس که دارای چندین پروتکل هستند استفاده فرمایید
  8.                 </p>
  9.             </div>
  10.             <div class="alert alert-primary">
  11.                 <p class="m-0 p-0">
  12.                     قیمت ها با
  13.                     <strong>
  14.                         احتساب تخفیف پلکانی
  15.                     </strong>
  16.                     و
  17.                     <strong>
  18.                         شارژ هدیه
  19.                     </strong>
  20.                     موجود حساب شما محاسبه می گردد
  21.                     <a href="{{ path('app_user_vpn_dynamic_price') }}">
  22.                         اطلاعات بیشتر
  23.                     </a>
  24.                 </p>
  25.             </div>
  26.         </div>
  27.         <ul class="nav nav-pills mb-3 w-100" id="pills-tab" role="tablist">
  28.             <li class="nav-item " style="width: 100% !important;" role="presentation">
  29.                 <button  class="mb-1 w-100 nav-link" id="pills-vip-tab" data-bs-toggle="pill" data-bs-target="#pills-vip"
  30.                         type="button" role="tab" aria-controls="pills-vip" aria-selected="true">
  31.                     میکس
  32.                     <br>
  33.                     تمام پروتکل ها V2ray + OpenVPN + Cisco
  34.                     <br>
  35.                     PC-Mobile-TV
  36.                 </button>
  37.             </li>
  38.             <li class="nav-item " style="width: 33% !important;" role="presentation">
  39.                 <button class="mb-1 w-100 nav-link active" id="pills-v2ray-tab" data-bs-toggle="pill" data-bs-target="#pills-v2ray"
  40.                         type="button" role="tab" aria-controls="pills-v2ray" aria-selected="true">
  41.                     V2RAY
  42.                     <br>
  43.                     سرویس وی تو ری
  44.                     <br>
  45.                     PC-Mobile-TV
  46.                 </button>
  47.             </li>
  48.             <li class="nav-item " style="width: 33% !important;" role="presentation">
  49.                 <button class="mb-1 w-100 nav-link" id="pills-cisco-tab" data-bs-toggle="pill" data-bs-target="#pills-cisco" type="button"
  50.                         role="tab" aria-controls="pills-cisco" aria-selected="false">
  51.                     Cisco
  52.                     <br>
  53.                     سرویس سیسکو انی کانکت
  54.                     <br>
  55.                     PC-Mobile-TV
  56.                 </button>
  57.             </li>
  58.             <li class="nav-item " style="width: 33% !important;" role="presentation">
  59.                 <button class="mb-1 w-100 nav-link" id="pills-open-tab" data-bs-toggle="pill" data-bs-target="#pills-open" type="button"
  60.                         role="tab" aria-controls="pills-open" aria-selected="false">
  61.                     OpenVPN/L2TP
  62.                     <br>
  63.                     سرویس اوپن وی پی ان / ال تو تی پی
  64.                     <br>
  65.                     PC-Mobile-TV
  66.                 </button>
  67.             </li>
  68.         </ul>
  69.         <div class="tab-content" id="pills-tabContent">
  70.             <div class="tab-pane fade show active" id="pills-v2ray" role="tabpanel" aria-labelledby="pills-v2ray-tab"
  71.                  tabindex="0">
  72.                 {% include 'panel/pages/user/vpn/service/v2ray-form.html.twig' with {'sizedV2rayForm' : sizedV2rayForm , 'unlimitedV2rayForm' : unlimitedV2rayForm}  %}
  73.             </div>
  74.             <div class="tab-pane fade" id="pills-cisco" role="tabpanel" aria-labelledby="pills-cisco-tab" tabindex="0">
  75.                 {% include 'panel/pages/user/vpn/service/cisco-form.html.twig' with {'sizedOcServForm' : sizedOcServForm , 'unlimitedOcServForm' : unlimitedOcServForm} %}
  76.             </div>
  77.             <div class="tab-pane fade" id="pills-open" role="tabpanel" aria-labelledby="pills-open-tab" tabindex="0">
  78.                 {% include 'panel/pages/user/vpn/service/open-form.html.twig' with {'sizedOpenForm' : sizedOpenForm , 'unlimitedOpenForm' : unlimitedOpenForm}%}
  79.             </div>
  80.             <div class="tab-pane fade" id="pills-vip" role="tabpanel" aria-labelledby="pills-vip-tab"
  81.                  tabindex="0">
  82.                 {% include 'panel/pages/user/vpn/service/vip-form.html.twig' with {'sizedVipForm' : sizedVipForm}  %}
  83.             </div>
  84.         </div>
  85.     </div>
  86. </div>
  87. {% block footer %}
  88.     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  89.     <script>
  90.             $(document).ready(function() {
  91.                 // Vip Limited
  92.                 $(document).ready(function() {
  93.                     $('.ajax-vipLimited').on('change', function() {
  94.                         let formElement = $(this).closest('form'); // Find the closest form element
  95.                         let formName = formElement.attr('name'); // Get the form's name attribute
  96.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  97.                         let formData = {}; // Object to store cleaned data
  98.                         // Remove the form name prefix
  99.                         $.each(rawData, function(index, field) {
  100.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  101.                             formData[fieldName] = field.value;
  102.                         });
  103.                         $.ajax({
  104.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  105.                             type: "POST",
  106.                             data: formData, // Send cleaned data
  107.                             success: function(response) {
  108.                                 $('#limited_vip_price').val(response.message);
  109.                             }
  110.                         });
  111.                     });
  112.                 });
  113.                 // V2ray Limited
  114.                 $(document).ready(function() {
  115.                     $('.ajax-v2rayLimited').on('change', function() {
  116.                         let formElement = $(this).closest('form'); // Find the closest form element
  117.                         let formName = formElement.attr('name'); // Get the form's name attribute
  118.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  119.                         let formData = {}; // Object to store cleaned data
  120.                         // Remove the form name prefix
  121.                         $.each(rawData, function(index, field) {
  122.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  123.                             formData[fieldName] = field.value;
  124.                         });
  125.                         $.ajax({
  126.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  127.                             type: "POST",
  128.                             data: formData, // Send cleaned data
  129.                             success: function(response) {
  130.                                 $('#limited_v2ray_price').val(response.message);
  131.                             }
  132.                         });
  133.                     });
  134.                 });
  135.                 // V2ray UnLimited
  136.                 $(document).ready(function() {
  137.                     $('.ajax-v2rayUnLimited').on('change', function() {
  138.                         let formElement = $(this).closest('form'); // Find the closest form element
  139.                         let formName = formElement.attr('name'); // Get the form's name attribute
  140.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  141.                         let formData = {}; // Object to store cleaned data
  142.                         // Remove the form name prefix
  143.                         $.each(rawData, function(index, field) {
  144.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  145.                             formData[fieldName] = field.value;
  146.                         });
  147.                         $.ajax({
  148.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  149.                             type: "POST",
  150.                             data: formData, // Send cleaned data
  151.                             success: function(response) {
  152.                                 $('#unlimited_v2ray_price').val(response.message);
  153.                             }
  154.                         });
  155.                     });
  156.                 });
  157.                 // open Limited
  158.                 $(document).ready(function() {
  159.                     $('.ajax-openLimited').on('change', function() {
  160.                         let formElement = $(this).closest('form'); // Find the closest form element
  161.                         let formName = formElement.attr('name'); // Get the form's name attribute
  162.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  163.                         let formData = {}; // Object to store cleaned data
  164.                         // Remove the form name prefix
  165.                         $.each(rawData, function(index, field) {
  166.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  167.                             formData[fieldName] = field.value;
  168.                         });
  169.                         $.ajax({
  170.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  171.                             type: "POST",
  172.                             data: formData, // Send cleaned data
  173.                             success: function(response) {
  174.                                 $('#limited_open_price').val(response.message);
  175.                             }
  176.                         });
  177.                     });
  178.                 });
  179.                 // open UnLimited
  180.                 $(document).ready(function() {
  181.                     $('.ajax-openUnLimited').on('change', function() {
  182.                         let formElement = $(this).closest('form'); // Find the closest form element
  183.                         let formName = formElement.attr('name'); // Get the form's name attribute
  184.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  185.                         let formData = {}; // Object to store cleaned data
  186.                         // Remove the form name prefix
  187.                         $.each(rawData, function(index, field) {
  188.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  189.                             formData[fieldName] = field.value;
  190.                         });
  191.                         $.ajax({
  192.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  193.                             type: "POST",
  194.                             data: formData, // Send cleaned data
  195.                             success: function(response) {
  196.                                 $('#unlimited_open_price').val(response.message);
  197.                             }
  198.                         });
  199.                     });
  200.                 });
  201.                 // ocserv Limited
  202.                 $(document).ready(function() {
  203.                     $('.ajax-ocservLimited').on('change', function() {
  204.                         let formElement = $(this).closest('form'); // Find the closest form element
  205.                         let formName = formElement.attr('name'); // Get the form's name attribute
  206.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  207.                         let formData = {}; // Object to store cleaned data
  208.                         // Remove the form name prefix
  209.                         $.each(rawData, function(index, field) {
  210.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  211.                             formData[fieldName] = field.value;
  212.                         });
  213.                         $.ajax({
  214.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  215.                             type: "POST",
  216.                             data: formData, // Send cleaned data
  217.                             success: function(response) {
  218.                                 $('#limited_oc_serv_price').val(response.message);
  219.                             }
  220.                         });
  221.                     });
  222.                 });
  223.                 // ocserv UnLimited
  224.                 $(document).ready(function() {
  225.                     $('.ajax-ocservUnLimited').on('change', function() {
  226.                         let formElement = $(this).closest('form'); // Find the closest form element
  227.                         let formName = formElement.attr('name'); // Get the form's name attribute
  228.                         let rawData = $("form[name='" + formName + "']").serializeArray(); // Serialize form fields
  229.                         let formData = {}; // Object to store cleaned data
  230.                         // Remove the form name prefix
  231.                         $.each(rawData, function(index, field) {
  232.                             let fieldName = field.name.replace(formName + "[", "").replace("]", ""); // Clean field name
  233.                             formData[fieldName] = field.value;
  234.                         });
  235.                         $.ajax({
  236.                             url: "{{ path('app_panel_user_vpn_service_get_price_ajax') }}", // Symfony route
  237.                             type: "POST",
  238.                             data: formData, // Send cleaned data
  239.                             success: function(response) {
  240.                                 $('#unlimited_oc_serv_price').val(response.message);
  241.                             }
  242.                         });
  243.                     });
  244.                 });
  245.             });
  246.     </script>
  247. {% endblock %}