403Webshell
Server IP : 217.11.249.137  /  Your IP : 216.73.216.54
Web Server : Apache
System : FreeBSD triton.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-a3d32f9e6 GENERIC amd64
User : www ( 80)
PHP Version : 8.0.30
Disable Function : ini_restore, show_source, socket_select, socket_create_listen, socket_create_pair, socket_listen, socket_strerror, shell_exec, proc_nice, proc_terminate, readlink, symlink, link, pfsocketopen, ini_alter, dl, pcntl_exec, pcntl_fork, pcntl_signal, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifsignaled, pcntl_wifstoped, pcntl_wifstopsig, pcntl_wtermsig, socket_accept, socket_bind, socket_create, socket_create_listen, popen, zlib_decode
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /data/www/24781/extramagazin_cz/www/wp-content/plugins/td-composer/mobile/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /data/www/24781/extramagazin_cz/www/wp-content/plugins/td-composer/mobile/includes//td_ajax_mob.php
<?php

class td_ajax_mob {

    // modify the module used on search
    static function on_ajax_search() {

	    $buffy = '';
        $buffy_msg = '';

        // the search string
        if ( !empty( $_POST['td_string'] ) ) {
            $td_string = esc_html( $_POST['td_string'] );
        } elseif ( !empty( $_POST['s'] ) ) {
            $td_string = esc_html( $_POST['s'] );;
        } else {
            $td_string = '';
        }

        // get the data
        $td_query = &td_data_source::get_wp_query_search( $td_string ); // by ref.. do the query
        $td_query_amp = array();

        // build the results
        if ( !empty( $td_query->posts ) ) {

	        foreach ( $td_query->posts as $index => $post ) {
                $td_module_mob_1 = new td_module_mob_1($post);
                $buffy .= $td_module_mob_1->render();

                $post = (array)$post;
                $post_data = $td_module_mob_1->render_amp();

                foreach ( $post_data as $key => $value ) {
                    $post[$key] = $value;
                }

                $post = (object)$post;

                $td_query_amp[] = $post;

            }
        }

        if ( count( $td_query->posts ) == 0 ) {
            //no results
            $buffy = '<div class="result-msg no-result">' . __td('No results', TD_THEME_NAME) . '</div>';
        } else {
            /**
             * show the results
             * @note:
             * we use esc_url(home_url( '/' )) instead of the wp @see get_search_link function because that's what the internal
             * wp widget it's using and it was creating duplicate links like: yoursite.com/search/search_query and yoursite.com?s=search_query
             */
            $buffy_msg .= '<div class="result-msg"><a href="' . home_url('/?s=' . urlencode($td_string )) . '">' . __td('View all results', TD_THEME_NAME) . '</a></div>';
            //add wrap
            $buffy = '<div class="td-aj-search-results">' . $buffy . '</div>' . $buffy_msg;
        }

        //prepare array for ajax
        $buffyArray = array(
            'td_query_all_results' => home_url('/?s=' . urlencode($td_string)),
            'td_query_posts' => $td_query_amp,
            'td_data' => $buffy,
            'td_total_results' => 2,
            'td_total_in_list' => count($td_query->posts),
            'td_search_query'=> $td_string
        );

        // Return the String
        die( json_encode( $buffyArray ) );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit