HEX
Server: Apache
System: Linux srv-plesk28.ps.kz 5.14.0-284.18.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 29 17:06:27 EDT 2023 x86_64
User: greencl1 (10085)
PHP: 8.1.33
Disabled: apache_setenv,dl,eval,exec,openlog,passthru,pcntl_exec,pcntl_fork,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,socket_create,socket_create_listen,socket_create_pair,syslog,system,socket_listen,stream_socket_server
Upload Files
File: /var/www/vhosts/greenclinic.kz/newsite/wp-content/themes/green-clinic/blocks/dscarousel.php
<?php 
  $list = get_sub_field('dscarousel_item');
  $list2 = get_sub_field('popular_services');
  $list3 = get_sub_field('dscarousel_list');
  $list4 = get_sub_field('popular_list');      
?>



<div class="container">
    <div class="services-search"> 
        <div class="search-title wow animate__animated animate__fadeInLeft " >
            <?php 
                    // Get the current language
                    $current_language = wpm_get_language();

                    // Output the appropriate translation based on the current language
                    if ($current_language == 'en') {
                        echo 'Directions and services';
                    } elseif ($current_language == 'kz') {
                        echo 'Бағыттар мен қызметтер';
                    } else {
                        echo 'Направление и услуги'; // Default to Russian or the original language
                    }
                    ?>
                    </div>
        <input type="search" id="dscarousel_search" class="search-input wow animate__animated animate__fadeInLeft"  
        placeholder="<?php 
                    // Get the current language
                    $current_language = wpm_get_language();

                    // Output the appropriate translation based on the current language
                    if ($current_language == 'en') {
                        echo 'Search...';
                    } elseif ($current_language == 'kz') {
                        echo 'Іздеу...';
                    } else {
                        echo 'Найти...'; // Default to Russian or the original language
                    }
                    ?>">
		<div class="yellow-button searchBtny" id="searchBtn" style="cursor:pointer; margin-top: 0 !important;line-height: 1; position: absolute;
    top: 93px;
    right: 27px;
    /* left: 100%; */
    bottom: 0;
    z-index: 50;">
          <span class="yellow-button-label" style="    padding: 25px;">Поиск</span>
        
        </div>
        <div id="dscarousel_search_result">
            <div class="search__results-service">
				<div class="search__service">
							
				<p class="search__service-name"></p>
				</div>
				<h3 class="search__results-price"></h3>
			</div>
        </div>
    </div>
    <div class="services-popular"> 
                <div class="services-sub-title  wow animate__animated animate__fadeInLeft">
                <?php 
                    // Get the current language
                    $current_language = wpm_get_language();

                    // Output the appropriate translation based on the current language
                    if ($current_language == 'en') {
                        echo 'Family services';
                    } elseif ($current_language == 'kz') {
                        echo 'Барлық отбасы мүшелеріне арналған қызметтер';
                    } else {
                        echo 'Услуги для всей семьи'; // Default to Russian or the original language
                    }
                    ?>
                </div>
                <h2 class="section-title services-title wow animate__animated animate__fadeInLeft"><?php echo esc_html(the_sub_field('block_title')); ?></h2>
                <div class="row"> 

                <div class="services-slider owl-carousel  wow animate__animated animate__fadeInLeft " >
                <?php  foreach($list3 as $list3_item): ?>
                    <div class="services-slider-item ">   
                        <div class="service-slide-wrapp">    
                                    <div class="service-slide-title"><?php echo esc_html($list3_item["title"]); ?></div>
                                    <div class="service-slide-text"><?php echo $list3_item["text"]; ?></div>
                                    <div class="service-slide-readmore">
                                        <a href="<?php echo $list3_item["link"]; ?>">
												<?php 
            // Get the current language
            $current_language = wpm_get_language();

            // Output the appropriate translation based on the current language
            if ($current_language == 'ru') {
                echo 'Подробнее';
            } elseif ($current_language == 'kz') {
                echo 'Толығырақ';
            } else {
                echo 'More detailed'; // Default to Russian or the original language
            }
            ?>		
											
											  
                                            <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                <path d="M18 12.5L18.3536 12.1464L18.7071 12.5L18.3536 12.8536L18 12.5ZM6 13C5.72386 13 5.5 12.7761 5.5 12.5C5.5 12.2239 5.72386 12 6 12V13ZM14.3536 8.14645L18.3536 12.1464L17.6464 12.8536L13.6464 8.85355L14.3536 8.14645ZM18.3536 12.8536L14.3536 16.8536L13.6464 16.1464L17.6464 12.1464L18.3536 12.8536ZM18 13H6V12H18V13Z" fill="#262626"/>
                                            </svg> 
                                        </a> 
                                    </div>
                                    <div class="services-slide-bg-img " data-wow-delay="1s" ><img class="wow animate__animated animate__fadeInBottomRight" src="<?php echo $list3_item["img"]; ?>"></div>  
                        </div>                                   
                    </div>    
                <?php endforeach;?> 
                </div>
                <div class="services-items row  wow animate__animated animate__fadeInRight" >
                    <?php  foreach($list4 as $list4_item): ?>
                        <div class="services-item">
                                <div class="services-item-wrapp"> 
                                <a href="<?php echo esc_html($list4_item["link"]); ?>"> 
                                    <div class="service-title"><?php echo esc_html($list4_item["title"]); ?></div>
                                    <div class="service-text"><?php echo $list4_item["text"]; ?></div> 
                                    <div class="service-readmore-arrow">
                                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                <path d="M18 12L18.3536 11.6464L18.7071 12L18.3536 12.3536L18 12ZM6 12.5C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5V12.5ZM14.3536 7.64645L18.3536 11.6464L17.6464 12.3536L13.6464 8.35355L14.3536 7.64645ZM18.3536 12.3536L14.3536 16.3536L13.6464 15.6464L17.6464 11.6464L18.3536 12.3536ZM18 12.5H6V11.5H18V12.5Z" fill="#FFCA79"/>
                                            </svg>  
                                    </div>
                                </a>
                                    <div class="services-bg"></div>
                                </div>
                        </div>
                    <?php endforeach;?>
                    <div class="services-show-all">
                            <div class="services-show-all-wrapp">
                                <a href="/search">
									<?php 
            // Get the current language
            $current_language = wpm_get_language();

            // Output the appropriate translation based on the current language
            if ($current_language == 'ru') {
                echo 'Смотреть все услуги';
            } elseif ($current_language == 'kz') {
                echo 'Барлық қызметтерді қараңыз';
            } else {
                echo 'View all services'; // Default to Russian or the original language
            }
            ?>		
									
									 
                                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <path d="M18 12L18.3536 11.6464L18.7071 12L18.3536 12.3536L18 12ZM6 12.5C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5V12.5ZM14.3536 7.64645L18.3536 11.6464L17.6464 12.3536L13.6464 8.35355L14.3536 7.64645ZM18.3536 12.3536L14.3536 16.3536L13.6464 15.6464L17.6464 11.6464L18.3536 12.3536ZM18 12.5H6V11.5H18V12.5Z" fill="#262626"/>
                                    </svg> 
                                </a> 
                            </div>
                    </div>
                </div>                 
    
     
</div> 
 
<script>
    (function($){
        
$(document).ready(function () { 

    $('body').on('click', '.search__service-name', function() {

    var value_one = $(this).text();
    

    var click_one = 1;

    localStorage.setItem("value_ls", value_one);
    localStorage.setItem("value_click", click_one);
    
    document.location.href = '/search';

    }); 

});
// Получаем элемент input по его id
const inputElement = document.getElementById('dscarousel_search');

// Инициализируем переменную для хранения данных
let inputData = '';

// Обработчик события нажатия клавиши
$( "#searchBtn" ).on( "click", function() {
 
    // Проверяем, была ли нажата клавиша Enter (код 13)

        // Записываем данные из input в переменную
        inputData = inputElement.value;

        var value_one = inputData; 
    

        var click_one = 1;

        localStorage.setItem("value_ls", value_one);
        localStorage.setItem("value_click", click_one);
        
        document.location.href = '/search';
        console.log('Данные записаны в переменную:', inputData);
   
});
})(jQuery);
</script>
		<style>
		@media (max-width: 767px) {
.searchBtny{
		    top: 84px !important;
		}
		}
			
		@media (max-width: 560px) {
.searchBtny{
		  width: fit-content;
    margin: 0;
    padding: 0;
		}
		}	
			
			</style>