С Новым годом! Форум программистов, компьютерный форум, киберфорум
PHP
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.75/4: Рейтинг темы: голосов - 4, средняя оценка - 4.75
0 / 0 / 0
Регистрация: 01.10.2017
Сообщений: 32

Подскажите код вируса в php-файлах !

09.10.2018, 16:34. Показов 924. Ответов 3
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Всем здравствуйте!!!
Лёг сайт- хостер выдаёт вирус в этих 5- ти файлах. Вирусняк увидели и все поисковики и блокнули сайт.
Кто нибудь может подскать мне, что в этих кодах является вирусным кодом и помочь вырезать ненужное?!
Заранее большое спасибо.

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php if ( get_post_format() != 'quote' && ( ( isset( $GLOBALS['ghostpool_meta_author'] ) && $GLOBALS['ghostpool_meta_author'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_date'] ) && $GLOBALS['ghostpool_meta_date'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_comment_count'] ) && $GLOBALS['ghostpool_meta_comment_count'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_views'] ) && $GLOBALS['ghostpool_meta_views'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_followers'] ) && $GLOBALS['ghostpool_meta_followers'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_cats'] ) && $GLOBALS['ghostpool_meta_cats'] == '1' ) ) ) { ?>
 
    <div class="gp-entry-meta">
    
        <?php if ( isset( $GLOBALS['ghostpool_meta_author'] ) && $GLOBALS['ghostpool_meta_author'] == '1' ) { ?><span class="gp-post-meta gp-meta-author"><?php ghostpool_author_name( get_the_ID() ); ?></span><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_date'] ) && $GLOBALS['ghostpool_meta_date'] == '1' ) { ?><time class="gp-post-meta gp-meta-date" datetime="<?php echo get_the_date( 'c' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_comment_count'] ) && $GLOBALS['ghostpool_meta_comment_count'] == '1' ) { ?><span class="gp-post-meta gp-meta-comments"><?php comments_popup_link( esc_html__( 'No Comments', 'gauge' ), esc_html__( '1 Comment', 'gauge' ), esc_html__( '% Comments', 'gauge' ), 'comments-link', esc_html__( 'Comments Closed', 'gauge' ) ); ?></span><?php } ?>
    
        <?php if ( function_exists( 'pvc_get_post_views' ) && ( isset( $GLOBALS['ghostpool_meta_views'] ) && $GLOBALS['ghostpool_meta_views'] == '1' ) ) { ?><span class="gp-post-meta gp-meta-views"><?php echo pvc_get_post_views(); ?> <?php esc_html_e( 'views', 'gauge' ); ?></span><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_followers'] ) && $GLOBALS['ghostpool_meta_followers'] == '1' ) { ?>
            <span class="gp-post-meta gp-meta-followers"><?php echo get_post_meta( $GLOBALS['ghostpool_hub_id'], '_gp_followers', true ); ?> <?php esc_html_e( 'followers', 'gauge' ); ?></span>
        <?php } ?>
    
        <?php if ( isset( $GLOBALS['ghostpool_meta_cats'] ) && $GLOBALS['ghostpool_meta_cats'] == '1' && $post->post_type == 'post' ) { $video_cats = wp_get_object_terms( get_the_ID(), 'gp_videos' ); ?><span class="gp-post-meta gp-meta-cats"><?php if ( ! empty( $video_cats ) && ! is_wp_error( $video_cats ) ) { echo get_the_term_list( get_the_ID(), 'gp_videos', '', ', ' ); } else { the_category( ', ' ); } ?></span><?php } ?>
        
    </div>
 
<?php } ?>
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php global $gp;
 
// Resize ARVE thumbnail when there is no feature image specified
if ( function_exists( 'activate_advanced_responsive_video_embedder' ) && get_post_format() == 'video' && ! has_post_thumbnail() && $GLOBALS['ghostpool_featured_image'] == 'enabled' && $GLOBALS['ghostpool_image_alignment'] != 'image-above' ) {
    echo '<style>.post-format-video-content.gp-image-align-left .arve-wrapper,.post-format-video-content.gp-image-wrap-right .arve-wrapper,.post-format-video-content.gp-image-align-left .arve-wrapper,.post-format-video-content.gp-image-align-right .arve-wrapper {width: ' . $GLOBALS['ghostpool_image_width'] . 'px;}</style>';
}
 
// Margin class
if ( $GLOBALS['ghostpool_title_position'] == 'title-over-thumbnail' && $GLOBALS['ghostpool_excerpt_length'] == '0' && $GLOBALS['ghostpool_meta_author'] != '1' && $GLOBALS['ghostpool_meta_date'] != '1' && $GLOBALS['ghostpool_meta_comment_count'] != '1' && $GLOBALS['ghostpool_meta_views'] != '1' && $GLOBALS['ghostpool_meta_followers'] != '1' && $GLOBALS['ghostpool_meta_tags'] != '1' && $GLOBALS['ghostpool_meta_hub_cats'] != '1' && $GLOBALS['ghostpool_meta_hub_fields'] != '1' && $GLOBALS['ghostpool_meta_hub_award'] != '1' ) {
    $gp_margin_class = ' gp-no-margin';
} else {
    $gp_margin_class = '';
}
 
?>
 
<section <?php post_class( 'gp-post-item' . $gp_margin_class ); ?> itemscope itemtype="http://schema.org/Blog">
 
    <?php echo ghostpool_meta_data( get_the_ID() ); ?>
 
    <?php if ( has_post_thumbnail() && $GLOBALS['ghostpool_featured_image'] == 'enabled' ) { ?>
 
        <div class="gp-post-thumbnail gp-loop-featured">
        
            <div class="gp-<?php echo sanitize_html_class( $GLOBALS['ghostpool_image_alignment'] ); ?>">
            
                <?php $gp_image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['ghostpool_image_width'], $GLOBALS['ghostpool_image_height'], $GLOBALS['ghostpool_hard_crop'], false, true ); ?>
                <?php if ( $gp['retina'] == 'gp-retina' ) {
                    $gp_retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['ghostpool_image_width'] * 2, $GLOBALS['ghostpool_image_height'] * 2, $GLOBALS['ghostpool_hard_crop'], true, true );
                } else {
                    $gp_retina = '';
                } ?>            
 
                <?php $gp_mobile_image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 80, 80, $GLOBALS['ghostpool_hard_crop'], false, true ); ?>
                <?php if ( $gp['retina'] == 'gp-retina' ) {
                    $gp_mobile_retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 80 * 2, 80 * 2, $GLOBALS['ghostpool_hard_crop'], true, true );
                } else {
                    $gp_retina = '';
                } ?>
            
                <a href="<?php if ( get_post_format() == 'link' ) { echo get_post_meta( get_the_ID(), 'link', true ); } else { the_permalink(); } ?>" title="<?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?>"<?php if ( get_post_format() == 'link' ) { ?> target="<?php echo redux_post_meta( 'gp', get_the_ID(), 'link_target' ); ?>"<?php } ?>>
            
                    <?php if ( $GLOBALS['ghostpool_title_position'] == 'title-over-thumbnail' ) { ?>
                        <div class="gp-bottom-bg-gradient-overlay"></div>
                        <h2 class="gp-loop-title" itemprop="headline"><?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?></h2>
                    <?php } ?>
                            
                    <img src="<?php echo esc_url( $gp_image[0] ); ?>" data-rel="<?php echo esc_url( $gp_retina ); ?>" width="<?php echo absint( $gp_image[1] ); ?>" height="<?php echo absint( $gp_image[2] ); ?>" alt="<?php if ( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) { echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); } else { echo ghostpool_prefix_hub_title( get_the_ID() ); } ?>" class="gp-post-image gp-large-image" />
                    
                    <img src="<?php echo esc_url( $gp_mobile_image[0] ); ?>" data-rel="<?php echo esc_url( $gp_mobile_retina ); ?>" width="<?php echo absint( $gp_mobile_image[1] ); ?>" height="<?php echo absint( $gp_mobile_image[2] ); ?>" alt="<?php if ( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) { echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); } else { echo ghostpool_prefix_hub_title( get_the_ID() ); } ?>" class="gp-post-image gp-mobile-image" />
            
                </a>
                
            </div>  
                                
        </div>
 
    <?php } elseif ( get_post_format() != '0' ) { ?>
    
        <div class="gp-loop-featured">
            <?php get_template_part( 'lib/sections/loop', get_post_format() ); ?>
        </div>
        
    <?php } ?>
    
    <?php if ( get_post_format() != 'quote' OR has_post_thumbnail() && $GLOBALS['ghostpool_featured_image'] == 'enabled' ) { ?>
    
        <div class="gp-loop-content gp-<?php echo sanitize_html_class( $GLOBALS['ghostpool_image_alignment'] ); ?>">
 
            <?php if ( $GLOBALS['ghostpool_title_position'] == 'title-next-to-thumbnail' && ( get_post_format() != 'quote' OR $GLOBALS['ghostpool_featured_image'] == 'enabled' ) ) { ?>
                <h2 class="gp-loop-title"><a href="<?php if ( get_post_format() == 'link' ) { echo esc_url( get_post_meta( get_the_ID(), 'link', true ) ); } else { the_permalink(); } ?>" title="<?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?>"<?php if ( get_post_format() == 'link' ) { ?> target="<?php echo redux_post_meta( 'gp', get_the_ID(), 'link_target' ); ?>"<?php } ?>><?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?></a></h2>
            <?php } ?>
    
            <?php if ( $GLOBALS['ghostpool_content_display'] == 'full_content' ) { ?>
 
                <div class="gp-loop-text">
                    <?php global $more; $more = 0; the_content( '[' . esc_html__( 'Read More', 'gauge' ) . ']' ); ?>
                </div>
 
            <?php } else { ?>
 
                <?php if ( $GLOBALS['ghostpool_excerpt_length'] != '0' ) { ?>
                    <div class="gp-loop-text">
                        <p><?php echo ghostpool_excerpt( $GLOBALS['ghostpool_excerpt_length'] ); ?></p>
                    </div>
                <?php } ?>
 
            <?php } ?>  
 
            <?php get_template_part( 'lib/sections/loop', 'meta' ); ?>
 
            <?php if ( isset( $GLOBALS['ghostpool_meta_tags'] ) && $GLOBALS['ghostpool_meta_tags'] == '1' ) { the_tags( '<div class="gp-loop-tags">', ' ', '</div>' ); } ?>
    
        </div>
    
    <?php } ?>
            
    <?php if ( $GLOBALS['ghostpool_format'] == 'blog-large' ) { ?>
        <div class="gp-loop-divider"></div>
    <?php } ?>  
                
</section>
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php if ( get_post_format() != 'quote' && ( ( isset( $GLOBALS['ghostpool_meta_author'] ) && $GLOBALS['ghostpool_meta_author'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_date'] ) && $GLOBALS['ghostpool_meta_date'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_comment_count'] ) && $GLOBALS['ghostpool_meta_comment_count'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_views'] ) && $GLOBALS['ghostpool_meta_views'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_followers'] ) && $GLOBALS['ghostpool_meta_followers'] == '1' ) OR ( isset( $GLOBALS['ghostpool_meta_cats'] ) && $GLOBALS['ghostpool_meta_cats'] == '1' ) ) ) { 
 
    global $post;
 
    ?>
 
    <div class="gp-loop-meta">
    
        <?php if ( isset( $GLOBALS['ghostpool_meta_author'] ) && $GLOBALS['ghostpool_meta_author'] == '1' ) { ?><span class="gp-post-meta gp-meta-author"><?php ghostpool_author_name( get_the_ID() ); ?></span><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_date'] ) && $GLOBALS['ghostpool_meta_date'] == '1' ) { ?><time class="gp-post-meta gp-meta-date" datetime="<?php echo get_the_date( 'c' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_comment_count'] ) && $GLOBALS['ghostpool_meta_comment_count'] == '1' ) { ?><span class="gp-post-meta gp-meta-comments"><?php comments_popup_link( esc_html__( 'No Comments', 'gauge' ), esc_html__( '1 Comment', 'gauge' ), esc_html__( '% Comments', 'gauge' ), 'comments-link', esc_html__( 'Comments Closed', 'gauge' ) ); ?></span><?php } ?>
    
        <?php if ( function_exists( 'pvc_get_post_views' ) && ( isset( $GLOBALS['ghostpool_meta_views'] ) && $GLOBALS['ghostpool_meta_views'] == '1' ) ) { ?><span class="gp-post-meta gp-meta-views"><?php echo pvc_get_post_views(); ?> <?php esc_html_e( 'views', 'gauge' ); ?></span><?php } ?>
 
        <?php if ( isset( $GLOBALS['ghostpool_meta_followers'] ) && $GLOBALS['ghostpool_meta_followers'] == '1' && $post->post_type == 'page' ) { ?>
            <span class="gp-post-meta gp-meta-followers"><?php echo get_post_meta( $GLOBALS['ghostpool_loop_hub_id'], '_gp_followers', true ); ?> <?php esc_html_e( 'followers', 'gauge' ); ?></span>
        <?php } ?>
        
        <?php if ( isset( $GLOBALS['ghostpool_meta_cats'] ) && $GLOBALS['ghostpool_meta_cats'] == '1' && $post->post_type == 'post' ) { $video_cats = wp_get_object_terms( get_the_ID(), 'gp_videos' ); ?><span class="gp-post-meta gp-meta-cats"><?php if ( ! empty( $video_cats ) && ! is_wp_error( $video_cats ) ) { echo get_the_term_list( get_the_ID(), 'gp_videos', '', ', ' ); } else { the_category( ', ' ); } ?></span><?php } ?>
        
    </div>
 
<?php } ?>
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?php global $gp;
 
// Detect review loop
$GLOBALS['ghostpool_review_loop'] = true;
 
// Loop options for search results page
if ( $post->post_type == 'gp_user_review' ) {
    if ( is_page_template( 'my-reviews-template.php' ) ) { 
        $GLOBALS['ghostpool_display_site_rating'] = 0;
    } else {
        $GLOBALS['ghostpool_display_site_rating'] = $gp['user_reviews_display_rating']['site_rating'];
    }
    $GLOBALS['ghostpool_display_user_rating'] = 0;
}
 
// Get loop hub ID
ghostpool_get_loop_hub_id( get_the_ID() );
 
// Get ratings data
ghostpool_ratings( get_the_ID() );
 
// Margin class
if ( $GLOBALS['ghostpool_title_position'] == 'title-over-thumbnail' && $GLOBALS['ghostpool_excerpt_length'] == '0' && $GLOBALS['ghostpool_meta_author'] != '1' && $GLOBALS['ghostpool_meta_date'] != '1' && $GLOBALS['ghostpool_meta_comment_count'] != '1' && $GLOBALS['ghostpool_meta_views'] != '1' && $GLOBALS['ghostpool_meta_followers'] != '1' && $GLOBALS['ghostpool_meta_tags'] != '1' && $GLOBALS['ghostpool_meta_hub_cats'] != '1' && $GLOBALS['ghostpool_meta_hub_fields'] != '1' && $GLOBALS['ghostpool_meta_hub_award'] != '1' ) {
    $gp_margin_class = ' gp-no-margin';
} else {
    $gp_margin_class = '';
}
 
?>
 
<section <?php post_class( 'gp-post-item' . $gp_margin_class ); ?> itemscope itemtype="http://schema.org/Blog">
        
    <?php echo ghostpool_meta_data( get_the_ID() ); ?>
        
    <?php if ( has_post_thumbnail() && isset( $GLOBALS['ghostpool_featured_image'] ) && $GLOBALS['ghostpool_featured_image'] == 'enabled' ) { ?>
 
        <div class="gp-post-thumbnail gp-loop-featured">
        
            <div class="gp-<?php echo sanitize_html_class( $GLOBALS['ghostpool_image_alignment'] ); ?>">
 
                <?php $gp_image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['ghostpool_image_width'], $GLOBALS['ghostpool_image_height'], $GLOBALS['ghostpool_hard_crop'], false, true ); ?>
                <?php if ( $gp['retina'] == 'gp-retina' ) {
                    $gp_retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['ghostpool_image_width'] * 2, $GLOBALS['ghostpool_image_height'] * 2, $GLOBALS['ghostpool_hard_crop'], true, true );
                } else {
                    $gp_retina = '';
                } ?>                
 
                <?php $gp_mobile_image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 80, 80, $GLOBALS['ghostpool_hard_crop'], false, true ); ?>
                <?php if ( $gp['retina'] == 'gp-retina' ) {
                    $gp_mobile_retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 80 * 2, 80 * 2, $GLOBALS['ghostpool_hard_crop'], true, true );
                } else {
                    $gp_retina = '';
                } ?>
                            
                <a href="<?php the_permalink(); ?>" title="<?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?>">
 
                    <?php if ( $GLOBALS['ghostpool_title_position'] == 'title-over-thumbnail' OR ( ( $GLOBALS['ghostpool_site_rating_enabled'] == true OR $GLOBALS['ghostpool_user_rating_enabled'] == true ) && ( $GLOBALS['ghostpool_format'] != 'blog-standard' ) ) ) { ?>
                        <div class="gp-bottom-bg-gradient-overlay"></div>
                    <?php } ?>
                        
                    <?php if ( ( $GLOBALS['ghostpool_site_rating_enabled'] == true OR $GLOBALS['ghostpool_user_rating_enabled'] == true ) && ( $GLOBALS['ghostpool_format'] != 'blog-standard' ) ) { ?>
                        <div class="gp-rating-wrapper">
                            <?php if ( $GLOBALS['ghostpool_site_rating_enabled'] == true ) { get_template_part( 'lib/sections/site', 'rating' ); } ?>
                            <?php if ( $GLOBALS['ghostpool_user_rating_enabled'] == true ) { get_template_part( 'lib/sections/user', 'rating' ); } ?>
                        </div>
                    <?php } ?>
    
                    <?php if ( $GLOBALS['ghostpool_title_position'] == 'title-over-thumbnail' ) { ?>
                        <h2 class="gp-loop-title"><?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?></h2>
                    <?php } ?>
        
                    <img src="<?php echo esc_url( $gp_image[0] ); ?>" data-rel="<?php echo esc_url( $gp_retina ); ?>" width="<?php echo absint( $gp_image[1] ); ?>" height="<?php echo absint( $gp_image[2] ); ?>" alt="<?php if ( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) { echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); } else { echo ghostpool_prefix_hub_title( get_the_ID() ); } ?>" class="gp-post-image gp-large-image" />
                    
                    <img src="<?php echo esc_url( $gp_mobile_image[0] ); ?>" data-rel="<?php echo esc_url( $gp_mobile_retina ); ?>" width="<?php echo absint( $gp_mobile_image[1] ); ?>" height="<?php echo absint( $gp_mobile_image[2] ); ?>" alt="<?php if ( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) { echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); } else { echo ghostpool_prefix_hub_title( get_the_ID() ); } ?>" class="gp-post-image gp-mobile-image" />
                        
                </a>
            
            </div>
                                                        
        </div>
    
    <?php } ?>
    
    <?php if ( function_exists( 'ghostpool_remove_follow_button' ) ) { echo ghostpool_remove_follow_button( get_the_ID() ); } ?>
        
    <?php if ( ( $GLOBALS['ghostpool_site_rating_enabled'] == true OR $GLOBALS['ghostpool_user_rating_enabled'] == true ) && $GLOBALS['ghostpool_format'] == 'blog-standard' ) { ?>
        <div class="gp-rating-wrapper">
            <?php if ( $GLOBALS['ghostpool_site_rating_enabled'] == true ) { get_template_part( 'lib/sections/site', 'rating' ); } ?>
            <?php if ( $GLOBALS['ghostpool_user_rating_enabled'] == true ) { get_template_part( 'lib/sections/user', 'rating' ); } ?>               
        </div>
    <?php } ?>
                        
    <div class="gp-loop-content <?php if ( isset( $GLOBALS['ghostpool_image_alignment'] ) ) { echo 'gp-' . sanitize_html_class( $GLOBALS['ghostpool_image_alignment'] ); } ?>">
        
        <?php if ( $GLOBALS['ghostpool_title_position'] == 'title-next-to-thumbnail' ) { ?>
            <h2 class="gp-loop-title">
                <a href="<?php the_permalink(); ?>" title="<?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?>"><?php echo ghostpool_prefix_hub_title( get_the_ID() ); ?></a> 
            </h2>
        <?php } ?>
 
        <?php ghostpool_my_review_links(); ?> 
    
        <?php if ( get_post_meta( get_the_ID(), 'hub_award', true ) == '1' && ( isset( $GLOBALS['ghostpool_meta_hub_award'] ) && $GLOBALS['ghostpool_meta_hub_award'] == '1' ) ) { ?>
            <div class="gp-hub-awards">
                <span class="gp-hub-award"><i class="fa <?php if ( get_post_meta( get_the_ID(), 'hub_award_icon', true ) ) { echo get_post_meta( get_the_ID(), 'hub_award_icon', true ); } else { ?>fa-trophy<?php } ?>"></i><?php echo get_post_meta( get_the_ID(), 'hub_award_title', true ); ?></span>
            </div>  
        <?php } ?>
                            
        <?php if ( ( isset( $GLOBALS['ghostpool_meta_hub_cats'] ) && $GLOBALS['ghostpool_meta_hub_cats'] == '1' ) && ( ! empty( $GLOBALS['ghostpool_hub_cats_selected'][0] ) ) ) { ?>
 
            <div class="gp-loop-cats">
 
                <?php foreach( $GLOBALS['ghostpool_hub_cats_selected'] as $gp_hub_cat ) {
                    if ( has_term( $gp_hub_cat, 'gp_hubs', $GLOBALS['ghostpool_loop_hub_id'] ) OR has_term( $gp_hub_cat, 'gp_hubs', get_the_ID() ) ) {
                        $gp_term = get_term( $gp_hub_cat, 'gp_hubs' );
                        $gp_t_ID = $gp_term->term_id;
                        $gp_term_data = get_option( "taxonomy_$gp_t_ID" );                                          
                        $gp_term_link = get_term_link( $gp_term, 'gp_hubs' );
                        if ( ! $gp_term_link OR is_wp_error( $gp_term_link ) ) {
                            continue;
                        }
                        ?>
                        <a href="<?php echo esc_url( $gp_term_link ); ?>"<?php if ( $gp_term_data['color'] ) { ?> style="background-color: <?php echo esc_attr( $gp_term_data['color'] ); ?>"<?php } ?>><?php echo esc_attr( $gp_term->name ); ?></a>
                    <?php } ?>  
 
                <?php } ?>
 
            </div>
 
        <?php } ?>
 
        <?php if ( $GLOBALS['ghostpool_content_display'] == 'full_content' ) { ?>
 
            <div class="gp-loop-text">
                <?php global $more; $more = 0; the_content( '[' . esc_html__( 'Read More', 'gauge' ) . ']' ); ?>
            </div>
 
        <?php } else { ?>
 
            <?php if ( $GLOBALS['ghostpool_excerpt_length'] != '0' ) { ?>
                <div class="gp-loop-text">
                    <p><?php echo ghostpool_excerpt( $GLOBALS['ghostpool_excerpt_length'] ); ?></p>
                </div>
            <?php } ?>
 
        <?php } ?>
 
        <?php if ( ( isset( $GLOBALS['ghostpool_meta_hub_fields'] ) && $GLOBALS['ghostpool_meta_hub_fields'] == '1' ) && ( ! empty( $gp['hub_cat_fields'][0] ) ) ) { ?>
 
            <div class="gp-loop-meta">
                <?php foreach( $gp['hub_cat_fields'] as $gp_hub_field ) {
                    $gp_taxonomy = get_taxonomy( $gp_hub_field );
                    if ( ! $gp_taxonomy ) {
                        continue;
                    }
                    $gp_name = $gp_taxonomy->labels->singular_name;
                    $gp_term_list = get_the_term_list( $GLOBALS['ghostpool_loop_hub_id'], $gp_hub_field, '<span class="gp-post-meta">' . $gp_name . ': ', ', ', '</span>' );        
                    if ( $gp['hub_field_links'] == 'disabled' ) {
                        $gp_term_list = preg_replace( '/<\/?a[^>]*>/', '', $gp_term_list );
                    }                       
                    if ( ! $gp_term_list OR is_wp_error( $gp_term_list ) ) {
                        continue;
                    }   
                    echo wp_kses_post( $gp_term_list ); 
                } ?>
            </div>
 
        <?php } ?>
 
        <?php get_template_part( 'lib/sections/loop', 'meta' ); ?>
        
        <?php if ( isset( $GLOBALS['ghostpool_meta_tags'] ) && $GLOBALS['ghostpool_meta_tags'] == '1' ) { the_tags( '<div class="gp-loop-tags">', ' ', '</div>' ); } ?>
            
    </div>
    
    <?php if ( isset( $GLOBALS['ghostpool_format'] ) && $GLOBALS['ghostpool_format'] == 'blog-large' ) { ?>
        <div class="gp-loop-divider"></div>
    <?php } ?>  
                            
</section>
 
<?php $GLOBALS['ghostpool_review_loop'] = null; ?>
Миниатюры
Подскажите код вируса в php-файлах !  
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
09.10.2018, 16:34
Ответы с готовыми решениями:

Одинаковый php код, но в разных PHP файлах
Добрый вечер! Есть файл ac.php, он лежит в корне сайта, я взял и скопировал код в другой php файл, его назовем ac2.php. Но почему-то...

Подскажите код кругового обрезания картинки в файлах *.jpg, *.jpeg и прочее
Это круговое обрезание картинки работает с файлами *.bmp, но как с иными прошу подсказать. ... procedure TForm1.okruglenie(i: integer);...

Подскажите PHP код
Кто-гибудь подскажите скрипт отсылки и потверждения смс.Отправляется смс с кодом--&gt;Открывается страница,вводится код--&gt;Вы...

3
0 / 0 / 0
Регистрация: 01.10.2017
Сообщений: 32
09.10.2018, 16:35  [ТС]
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<?php 
 
if ( ! function_exists( 'ghostpool_data_properties' ) ) {
    function ghostpool_data_properties( $type ) {
 
        // Get hub ID
        ghostpool_get_hub_id( get_the_ID() );
        
        // Check to see if options exists
        if ( is_singular() ) { $GLOBALS['ghostpool_ajax_post_id'] = $GLOBALS['ghostpool_hub_id']; } else { $GLOBALS['ghostpool_ajax_post_id'] = ''; }
        $GLOBALS['ghostpool_ajax_cats'] = ! empty( $GLOBALS['ghostpool_cats'] ) ? $GLOBALS['ghostpool_cats'] : '';  
        $GLOBALS['ghostpool_ajax_hub_field_slugs'] = ! empty( $GLOBALS['ghostpool_hub_field_slugs'] ) ? $GLOBALS['ghostpool_hub_field_slugs'] : ''; 
        $GLOBALS['ghostpool_ajax_post_association'] = ! empty( $GLOBALS['ghostpool_post_association'] ) ? $GLOBALS['ghostpool_post_association'] : '';      
        $GLOBALS['ghostpool_ajax_post_types'] = ! empty( $GLOBALS['ghostpool_post_types'] ) ? $GLOBALS['ghostpool_post_types'] : '';        
        $GLOBALS['ghostpool_ajax_format'] = ! empty( $GLOBALS['ghostpool_format'] ) ? $GLOBALS['ghostpool_format'] : '';    
        $GLOBALS['ghostpool_ajax_size'] = ! empty( $GLOBALS['ghostpool_size'] ) ? $GLOBALS['ghostpool_size'] : '';      
        $GLOBALS['ghostpool_ajax_orderby'] = ! empty( $GLOBALS['ghostpool_orderby'] ) ? $GLOBALS['ghostpool_orderby'] : '';
        $GLOBALS['ghostpool_ajax_date_posted'] = ! empty( $GLOBALS['ghostpool_date_posted'] ) ? $GLOBALS['ghostpool_date_posted'] : '';
        $GLOBALS['ghostpool_ajax_date_modified'] = ! empty( $GLOBALS['ghostpool_date_modified'] ) ? $GLOBALS['ghostpool_date_modified'] : '';
        $GLOBALS['ghostpool_ajax_per_page'] = ! empty( $GLOBALS['ghostpool_per_page'] ) ? $GLOBALS['ghostpool_per_page'] : '';
        $GLOBALS['ghostpool_ajax_menu_per_page'] = ! empty( $GLOBALS['ghostpool_menu_per_page'] ) ? $GLOBALS['ghostpool_menu_per_page'] : '';
        $GLOBALS['ghostpool_ajax_offset'] = ! empty( $GLOBALS['ghostpool_offset'] ) ? $GLOBALS['ghostpool_offset'] : '';
        $GLOBALS['ghostpool_ajax_featured_image'] = ! empty( $GLOBALS['ghostpool_featured_image'] ) ? $GLOBALS['ghostpool_featured_image'] : '';
        $GLOBALS['ghostpool_ajax_image_width'] = ! empty( $GLOBALS['ghostpool_image_width'] ) ? $GLOBALS['ghostpool_image_width'] : '';
        $GLOBALS['ghostpool_ajax_image_height'] = ! empty( $GLOBALS['ghostpool_image_height'] ) ? $GLOBALS['ghostpool_image_height'] : '';
        $GLOBALS['ghostpool_ajax_hard_crop'] = ! empty( $GLOBALS['ghostpool_hard_crop'] ) ? $GLOBALS['ghostpool_hard_crop'] : '';
        $GLOBALS['ghostpool_ajax_image_alignment'] = ! empty( $GLOBALS['ghostpool_image_alignment'] ) ? $GLOBALS['ghostpool_image_alignment'] : '';
        $GLOBALS['ghostpool_ajax_title_position'] = ! empty( $GLOBALS['ghostpool_title_position'] ) ? $GLOBALS['ghostpool_title_position'] : '';
        $GLOBALS['ghostpool_ajax_content_display'] = ! empty( $GLOBALS['ghostpool_content_display'] ) ? $GLOBALS['ghostpool_content_display'] : '';
        $GLOBALS['ghostpool_ajax_excerpt_length'] = ! empty( $GLOBALS['ghostpool_excerpt_length'] ) ? $GLOBALS['ghostpool_excerpt_length'] : 0;
        $GLOBALS['ghostpool_ajax_meta_author'] = ! empty( $GLOBALS['ghostpool_meta_author'] ) ? $GLOBALS['ghostpool_meta_author'] : '';
        $GLOBALS['ghostpool_ajax_meta_date'] = ! empty( $GLOBALS['ghostpool_meta_date'] ) ? $GLOBALS['ghostpool_meta_date'] : '';
        $GLOBALS['ghostpool_ajax_meta_comment_count'] = ! empty( $GLOBALS['ghostpool_meta_comment_count'] ) ? $GLOBALS['ghostpool_meta_comment_count'] : '';
        $GLOBALS['ghostpool_ajax_meta_views'] = ! empty( $GLOBALS['ghostpool_meta_views'] ) ? $GLOBALS['ghostpool_meta_views'] : '';
        $GLOBALS['ghostpool_ajax_meta_followers'] = ! empty( $GLOBALS['ghostpool_meta_followers'] ) ? $GLOBALS['ghostpool_meta_followers'] : '';
        $GLOBALS['ghostpool_ajax_meta_cats'] = ! empty( $GLOBALS['ghostpool_meta_cats'] ) ? $GLOBALS['ghostpool_meta_cats'] : '';
        $GLOBALS['ghostpool_ajax_meta_tags'] = ! empty( $GLOBALS['ghostpool_meta_tags'] ) ? $GLOBALS['ghostpool_meta_tags'] : '';
        $GLOBALS['ghostpool_ajax_meta_hub_cats'] = ! empty( $GLOBALS['ghostpool_meta_hub_cats'] ) ? $GLOBALS['ghostpool_meta_hub_cats'] : '';
        $GLOBALS['ghostpool_ajax_meta_hub_fields'] = ! empty( $GLOBALS['ghostpool_meta_hub_fields'] ) ? $GLOBALS['ghostpool_meta_hub_fields'] : '';
        $GLOBALS['ghostpool_ajax_meta_hub_award'] = ! empty( $GLOBALS['ghostpool_meta_hub_award'] ) ? $GLOBALS['ghostpool_meta_hub_award'] : '';
        $GLOBALS['ghostpool_ajax_hub_cats_selected'] = ! empty( $GLOBALS['ghostpool_hub_cats_selected'] ) ? implode( ',', $GLOBALS['ghostpool_hub_cats_selected'] ) : '';
        $GLOBALS['ghostpool_ajax_display_site_rating'] = ! empty( $GLOBALS['ghostpool_display_site_rating'] ) ? $GLOBALS['ghostpool_display_site_rating'] : '';
        $GLOBALS['ghostpool_ajax_display_user_rating'] = ! empty( $GLOBALS['ghostpool_display_user_rating'] ) ? $GLOBALS['ghostpool_display_user_rating'] : '';
        $GLOBALS['ghostpool_ajax_read_more_link'] = ! empty( $GLOBALS['ghostpool_read_more_link'] ) ? $GLOBALS['ghostpool_read_more_link'] : '';
        $GLOBALS['ghostpool_ajax_page_arrows'] = ! empty( $GLOBALS['ghostpool_page_arrows'] ) ? $GLOBALS['ghostpool_page_arrows'] : '';
        $GLOBALS['ghostpool_ajax_page_numbers'] = ! empty( $GLOBALS['ghostpool_page_numbers'] ) ? $GLOBALS['ghostpool_page_numbers'] : '';
        $GLOBALS['ghostpool_ajax_author_id'] = ! empty( $GLOBALS['ghostpool_author_id'] ) ? $GLOBALS['ghostpool_author_id'] : '';   
     
        // Add to blog wrappers to pull query data 
        return ' data-type="' . $type . '" data-postid="' . $GLOBALS['ghostpool_ajax_post_id'] . '" data-cats="' . $GLOBALS['ghostpool_ajax_cats'] . '" data-hubfieldslugs="' . $GLOBALS['ghostpool_ajax_hub_field_slugs'] . '" data-postassociation="' . $GLOBALS['ghostpool_ajax_post_association'] . '" data-posttypes="' . $GLOBALS['ghostpool_ajax_post_types'] . '" data-format="' . $GLOBALS['ghostpool_ajax_format'] . '" data-size="' . $GLOBALS['ghostpool_ajax_size'] . '" data-orderby="' . $GLOBALS['ghostpool_ajax_orderby'] . '" data-dateposted="' . $GLOBALS['ghostpool_ajax_date_posted'] . '" data-datemodified="' . $GLOBALS['ghostpool_ajax_date_modified'] . '" data-perpage="' . $GLOBALS['ghostpool_ajax_per_page'] . '" data-menuperpage="' . $GLOBALS['ghostpool_ajax_menu_per_page'] . '" data-offset="' . $GLOBALS['ghostpool_ajax_offset'] . '"  data-featuredimage="' . $GLOBALS['ghostpool_ajax_featured_image'] . '" data-imagewidth="' . $GLOBALS['ghostpool_ajax_image_width'] . '" data-imageheight="' . $GLOBALS['ghostpool_ajax_image_height'] . '" data-hardcrop="' . $GLOBALS['ghostpool_ajax_hard_crop'] . '" data-imagealignment="' . $GLOBALS['ghostpool_ajax_image_alignment'] . '" data-titleposition="' . $GLOBALS['ghostpool_ajax_title_position'] . '" data-contentdisplay="' . $GLOBALS['ghostpool_ajax_content_display'] . '" data-excerptlength="' . $GLOBALS['ghostpool_ajax_excerpt_length'] . '" data-metaauthor="' . $GLOBALS['ghostpool_ajax_meta_author'] . '" data-metadate="' . $GLOBALS['ghostpool_ajax_meta_date'] . '" data-metacommentcount="' . $GLOBALS['ghostpool_ajax_meta_comment_count'] . '" data-metaviews="' . $GLOBALS['ghostpool_ajax_meta_views'] . '" data-metafollowers="' . $GLOBALS['ghostpool_ajax_meta_followers'] . '" data-metacats="' . $GLOBALS['ghostpool_ajax_meta_cats'] . '" data-metatags="' . $GLOBALS['ghostpool_ajax_meta_tags'] . '" data-metahubcats="' . $GLOBALS['ghostpool_ajax_meta_hub_cats'] . '" data-metahubfields="' . $GLOBALS['ghostpool_ajax_meta_hub_fields'] . '" data-metahubaward="' . $GLOBALS['ghostpool_ajax_meta_hub_award'] . '" data-hubcatsselected="' . $GLOBALS['ghostpool_ajax_hub_cats_selected'] . '" data-displaysiterating="' . $GLOBALS['ghostpool_ajax_display_site_rating'] . '" data-displayuserrating="' . $GLOBALS['ghostpool_ajax_display_user_rating'] . '" data-readmorelink="' . $GLOBALS['ghostpool_ajax_read_more_link'] . '"  data-pagenumbers="' . $GLOBALS['ghostpool_ajax_page_numbers'] . '" data-authorid="' . $GLOBALS['ghostpool_ajax_author_id'] . '"';
 
    }
}
 
if ( ! function_exists( 'ghostpool_register_ajax' ) ) {
    function ghostpool_register_ajax() {
    
        global $query_string;
        
        wp_enqueue_style( 'wp-mediaelement' );
        wp_enqueue_script( 'wp-mediaelement' );         
        wp_enqueue_script( 'gp-flexslider' );
        
        // Determine http or https for admin-ajax.php URL
        if ( is_ssl() ) { $gp_scheme = 'https'; } else { $gp_scheme = 'http'; }
        
        wp_enqueue_script( 'ajax-loop', ghostpool_scripts_uri . 'ajax-loop.js', array( 'jquery' ) );
        wp_localize_script( 'ajax-loop', 'ghostpoolAjax', array(
            'ajaxurl' => admin_url( 'admin-ajax.php', $gp_scheme ),
            'ajaxnonce' => wp_create_nonce( 'gp-ajax-nonce' ),
            'querystring' => $query_string,
        ) ); 
        
    }
}
add_action( 'wp_enqueue_scripts', 'ghostpool_register_ajax' );
 
if ( ! function_exists( 'ghostpool_ajax' ) ) {
    function ghostpool_ajax() {
    
        global $gp;
    
        if ( ! wp_verify_nonce( $_GET['ajaxnonce'], 'gp-ajax-nonce' ) )
            die();
    
        // Pagination
        $gp_pagination = ( isset( $_GET['pagenumber'] ) ) ? $_GET['pagenumber'] : 0;
                
        // Get theme options from ajax values
        $GLOBALS['ghostpool_cats'] = isset( $_GET['cats'] ) ? $_GET['cats'] : '';   
        $GLOBALS['ghostpool_hub_field_slugs'] = isset( $_GET['hubfieldslugs'] ) ? $_GET['hubfieldslugs'] : '';
        $GLOBALS['ghostpool_post_types'] = isset( $_GET['posttypes'] ) ? $_GET['posttypes'] : '';       
        $GLOBALS['ghostpool_format'] = isset( $_GET['format'] ) ? $_GET['format'] : ''; 
        $GLOBALS['ghostpool_size'] = isset( $_GET['size'] ) ? $_GET['size'] : '';       
        $GLOBALS['ghostpool_orderby'] = isset( $_GET['orderby'] ) ? $_GET['orderby'] : '';
        $GLOBALS['ghostpool_date_posted'] = isset( $_GET['dateposted'] ) ? $_GET['dateposted'] : '';
        $GLOBALS['ghostpool_date_modified'] = isset( $_GET['datemodified'] ) ? $_GET['datemodified'] : '';
        $GLOBALS['ghostpool_per_page'] = isset( $_GET['perpage'] ) ? $_GET['perpage'] : '';
        $GLOBALS['ghostpool_menu_per_page'] = isset( $_GET['menuperpage'] ) ? $_GET['menuperpage'] : '';
        $GLOBALS['ghostpool_offset'] = isset( $_GET['offset'] ) ? $_GET['offset'] : '';
        $GLOBALS['ghostpool_featured_image'] = isset( $_GET['featuredimage'] ) ? $_GET['featuredimage'] : '';
        $GLOBALS['ghostpool_image_width'] = isset( $_GET['imagewidth'] ) ? $_GET['imagewidth'] : '';
        $GLOBALS['ghostpool_image_height'] = isset( $_GET['imageheight'] ) ? $_GET['imageheight'] : '';
        $GLOBALS['ghostpool_hard_crop'] = isset( $_GET['hardcrop'] ) ? $_GET['hardcrop'] : '';
        $GLOBALS['ghostpool_image_alignment'] = isset( $_GET['imagealignment'] ) ? $_GET['imagealignment'] : '';
        $GLOBALS['ghostpool_title_position'] = isset( $_GET['titleposition'] ) ? $_GET['titleposition'] : '';
        $GLOBALS['ghostpool_content_display'] = isset( $_GET['contentdisplay'] ) ? $_GET['contentdisplay'] : '';
        $GLOBALS['ghostpool_excerpt_length'] = isset( $_GET['excerptlength'] ) ? $_GET['excerptlength'] : 0;
        $GLOBALS['ghostpool_meta_author'] = isset( $_GET['metaauthor'] ) ? $_GET['metaauthor'] : '';
        $GLOBALS['ghostpool_meta_date'] = isset( $_GET['metadate'] ) ? $_GET['metadate'] : '';
        $GLOBALS['ghostpool_meta_comment_count'] = isset( $_GET['metacommentcount'] ) ? $_GET['metacommentcount'] : '';
        $GLOBALS['ghostpool_meta_views'] = isset( $_GET['metaviews'] ) ? $_GET['metaviews'] : '';
        $GLOBALS['ghostpool_meta_followers'] = isset( $_GET['metafollowers'] ) ? $_GET['metafollowers'] : '';
        $GLOBALS['ghostpool_meta_cats'] = isset( $_GET['metacats'] ) ? $_GET['metacats'] : '';
        $GLOBALS['ghostpool_meta_tags'] = isset( $_GET['metatags'] ) ? $_GET['metatags'] : '';
        $GLOBALS['ghostpool_meta_hub_cats'] = isset( $_GET['metahubcats'] ) ? $_GET['metahubcats'] : '';
        $GLOBALS['ghostpool_meta_hub_fields'] = isset( $_GET['metahubfields'] ) ? $_GET['metahubfields'] : '';
        $GLOBALS['ghostpool_meta_hub_award'] = isset( $_GET['metahubaward'] ) ? $_GET['metahubaward'] : '';
        $GLOBALS['ghostpool_hub_cats_selected'] = isset( $_GET['hubcatsselected'] ) ? explode( ',', $_GET['hubcatsselected'] ) : '';
        $GLOBALS['ghostpool_display_site_rating'] = isset( $_GET['displaysiterating'] ) ? $_GET['displaysiterating'] : '';
        $GLOBALS['ghostpool_display_user_rating'] = isset( $_GET['displayuserrating'] ) ? $_GET['displayuserrating'] : '';
        $GLOBALS['ghostpool_read_more_link'] = isset( $_GET['readmorelink'] ) ? $_GET['readmorelink'] : '';
        $GLOBALS['ghostpool_page_numbers'] = isset( $_GET['pagenumbers'] ) ? $_GET['pagenumbers'] : '';
        $GLOBALS['ghostpool_author_id'] = isset( $_GET['authorid'] ) ? $_GET['authorid'] : '';
 
        // Post Type
        if ( $_GET['type'] == 'news' OR $_GET['type'] == 'news-template' OR $_GET['type'] == 'videos' OR $_GET['type'] == 'videos-template' ) {
            $gp_post_type = 'post';
        } elseif ( $_GET['type'] == 'user-reviews' ) {
            $gp_post_type = 'gp_user_review';           
        } else {
            $gp_post_type = explode( ',', $GLOBALS['ghostpool_post_types'] );
        }
 
        // Use filtered category is selected
        if ( isset( $_GET['cats_new'] ) && $_GET['cats_new'] != '0' ) {
            $GLOBALS['ghostpool_cats'] = $_GET['cats_new'];
        }
    
        // Use filtered menu category is selected
        if ( isset( $_GET['menu_cats_new'] ) && $_GET['menu_cats_new'] != '0' ) {
            $GLOBALS['ghostpool_cats'] = $_GET['menu_cats_new'];
        }
                    
        // Use filtered orderby if selected
        if ( isset( $_GET['orderby_new'] ) && $_GET['orderby_new'] != '0' ) {
            $GLOBALS['ghostpool_orderby'] = $_GET['orderby_new'];
        }   
 
        // Use filtered date posted if selected
        if ( isset( $_GET['date_posted_new'] ) && $_GET['date_posted_new'] != '0' ) {
            $GLOBALS['ghostpool_date_posted'] = $_GET['date_posted_new'];
        }   
 
        // Use filtered date modified if selected
        if ( isset( $_GET['date_modified_new'] ) && $_GET['date_modified_new'] != '0' ) {
            $GLOBALS['ghostpool_date_modified'] = $_GET['date_modified_new'];
        }   
                            
        ghostpool_query_variables();                
        
 
        // Get blog posts associated with hub
        if ( ( $_GET['type'] == 'blog' && $_GET['postassociation'] != 'disabled' && ( get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-template.php' OR get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-review-template.php' ) ) OR ( $_GET['type'] == 'blog-template' && get_post_meta( $_GET['postid'], 'blog_template_post_association', true ) == 'enabled' ) ) {
            $GLOBALS['ghostpool_meta_query'] = array( 'relation' => 'OR', array( 'key' => 'post_association', 'value' => sprintf( ' "%s" ', $_GET['postid'] ), 'compare' => 'LIKE' ), array( 'key' => '_hub_page_id', 'value' => $_GET['postid'], 'compare' => '=' ) );
            // Removed since v6.0
            //$GLOBALS['ghostpool_meta_key'] = 'post_association';
        }
        
        // Get news posts associated with hub
        if ( ( $_GET['type'] == 'news' && $_GET['postassociation'] != 'disabled' && ( get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-template.php' OR get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-review-template.php' ) ) OR ( $_GET['type'] == 'news-template' && get_post_meta( $_GET['postid'], 'news_post_association', true ) != 'disabled' ) ) {
            $GLOBALS['ghostpool_meta_query'] = array( 'relation' => 'OR', array( 'key' => 'post_association', 'value' => sprintf( ' "%s" ', $_GET['postid'] ), 'compare' => 'LIKE' ), array( 'key' => '_hub_page_id', 'value' => $_GET['postid'], 'compare' => '=' ) );
            // Removed since v6.0
            //$GLOBALS['ghostpool_meta_key'] = 'post_association';
        }
        
        echo get_post_meta( $_GET['postid'], 'news_post_association', true );
                
        // Get video posts associated with hub
        if ( ( $_GET['type'] == 'videos' && $_GET['postassociation'] != 'disabled' && ( get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-template.php' OR get_post_meta( $_GET['postid'], '_wp_page_template', true ) == 'hub-review-template.php' ) ) OR ( $_GET['type'] == 'videos-template' && get_post_meta( $_GET['postid'], 'videos_post_association', true ) != 'disabled' ) ) {
            $GLOBALS['ghostpool_meta_query'] = array( 'relation' => 'OR', array( 'key' => 'post_association', 'value' => sprintf( ' "%s" ', $_GET['postid'] ), 'compare' => 'LIKE' ), array( 'key' => '_hub_page_id', 'value' => $_GET['postid'], 'compare' => '=' ) );
            // Removed since v6.0
            //$GLOBALS['ghostpool_meta_key'] = 'post_association';
        }
 
        // Hub fields
        if ( $_GET['type'] == 'blog' ) {
            $gp_hub_field_args = '';
            if ( $_GET['hubfieldslugs'] ) {
        
                // Put hub fields into an array
                $gp_hub_fields_array = explode( ',', $GLOBALS['ghostpool_hub_field_slugs'] );
 
                foreach ( $gp_hub_fields_array as $gp_hub_field ) {
 
                    // Get taxonomy e.g. genre
                    $gp_taxonomy = strstr( $gp_hub_field, ':', true );
            
                    // Get terms e.g. horror, romance
                    $gp_terms = strstr( $gp_hub_field, ':', false );
            
                    // Remove : from front of terms
                    $gp_terms = ltrim( $gp_terms, ':' );
            
                    // Put list of terms into an array
                    $gp_terms = explode( ':', $gp_terms );
        
                    // Hub field tax query
                    $gp_hub_field_args[] = array( 
                        'taxonomy' => $gp_taxonomy,
                        'field'     => 'slug',
                        'terms'     => $gp_terms,
                        'operator' => 'AND',
                    );  
            
                }
            }
        }
                
        // Tax query
        if ( $_GET['type'] == 'news' OR $_GET['type'] == 'news-template' ) {
            $gp_tax_query  = array( 'relation' => 'AND', $GLOBALS['ghostpool_post_cats'], array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array( 'post-format-quote', 'post-format-audio', 'post-format-gallery', 'post-format-image', 'post-format-link', 'post-format-video' ), 'operator' => 'NOT IN' )     ); 
        } elseif ( $_GET['type'] == 'videos' OR $_GET['type'] == 'videos-template' ) {
            $gp_tax_query  = array( 'relation' => 'AND', $GLOBALS['ghostpool_video_cats'], array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array( 'post-format-video' ) ) );          
        } elseif ( $_GET['type'] == 'blog-template' OR $_GET['type'] == 'menu' ) {
            $gp_tax_query = $GLOBALS['ghostpool_tax'];
        } elseif ( $_GET['type'] == 'blog' ) {
            $gp_tax_query = array( 
                $GLOBALS['ghostpool_tax'],  
                array(
                    'relation' => 'AND',
                    $gp_hub_field_args,
                ),
            );          
        } else {
            $gp_tax_query  = '';
        }
 
        // Query                                                        
        if ( $_GET['type'] == 'taxonomy' ) {
            $gp_defaults = array(
                'meta_query'     => $GLOBALS['ghostpool_meta_query'],
                'orderby'        => $GLOBALS['ghostpool_orderby_value'],
                'date_query' => array( $GLOBALS['ghostpool_date_posted_value'], $GLOBALS['ghostpool_date_modified_value'] ),
            );
            $gp_args = $_GET['querystring'] . "&post_status=publish&order=" . $GLOBALS['ghostpool_order'] . "&meta_key=" . $GLOBALS['ghostpool_meta_key'] . "&posts_per_page=" . $GLOBALS['ghostpool_per_page'] . "&paged=$gp_pagination";      
            $gp_args = wp_parse_args( $gp_args, $gp_defaults );
        } elseif ( $_GET['type'] == 'author' ) {        
            $gp_args = array(
                'post_status' => 'publish',
                'post_type' => array( 'post', 'page', 'gp_user_review' ),
                'author' => $GLOBALS['ghostpool_author_id'],
                'meta_query' => array(
                    'relation' => 'OR',     
                    array(
                        'key' => '_wp_page_template',
                        'value' => array( 'hub-template.php', 'hub-review-template.php', 'review-template.php' ),
                        'compare' => 'IN',
                    ),
                    array(
                        'key' => '_wp_page_template',
                        'compare' => 'NOT EXISTS',
                    ),                      
                ), 
                'orderby' => $GLOBALS['ghostpool_orderby_value'],
                'order' => $GLOBALS['ghostpool_order'], 
                'posts_per_page' => $GLOBALS['ghostpool_per_page'],
                'paged' => $gp_pagination,
                'date_query' => array( $GLOBALS['ghostpool_date_posted_value'], $GLOBALS['ghostpool_date_modified_value'] ),
            );
        } elseif ( $_GET['type'] == 'menu' ) {  
            $gp_args = array(
                'post_status'     => 'publish',
                'post_type'       => array( 'post', 'page' ),
                'tax_query'       => $gp_tax_query,
                'orderby'         => 'date',
                'order'           => 'desc',
                'posts_per_page'  => $GLOBALS['ghostpool_menu_per_page'],
                'paged'           => $gp_pagination,        
            );              
        } else {
            $gp_args = array(
                'post_status'    => 'publish',
                'post_type'      => $gp_post_type,
                'tax_query'      => $gp_tax_query,
                'orderby'        => $GLOBALS['ghostpool_orderby_value'],
                'order'          => $GLOBALS['ghostpool_order'],
                'meta_query'     => $GLOBALS['ghostpool_meta_query'],
                'meta_key'       => $GLOBALS['ghostpool_meta_key'],
                'posts_per_page' => $GLOBALS['ghostpool_per_page'],
                'offset'         => $GLOBALS['ghostpool_offset'],
                'paged'          => $gp_pagination,
                'date_query' => array( $GLOBALS['ghostpool_date_posted_value'], $GLOBALS['ghostpool_date_modified_value'] ),
            );
        }
 
        //print_r($gp_args);
        
        $gp_query = new wp_query( $gp_args );
                        
        if ( $gp_query->have_posts() ) :
        
            $gp_total_pages = $gp_query->max_num_pages;
 
            // Pagination (Arrows)
            if ( $gp_total_pages > 1 && $_GET['type'] == 'menu' ) {
                echo '<div class="gp-ajax-pagination gp-pagination-arrows">';
                    if ( $gp_pagination > 1 ) {
                        echo '<a href="#" data-pagelink="' . ( $gp_pagination - 1 ) . '" class="prev"></a>';
                    }
                    if ( $gp_pagination < $gp_total_pages ) {
                        echo '<a href="#" data-pagelink="' . ( $gp_pagination + 1 ) . '" class="next"></a>';
                    }   
                echo '</div>'; 
            }
                    
            while ( $gp_query->have_posts() ) : $gp_query->the_post(); ?>
 
                <?php if ( $_GET['type'] == 'menu' ) {
                                                                                
                    // Post link
                    if ( get_post_format() == 'link' ) { 
                        $gp_link = esc_url( get_post_meta( get_the_ID(), 'link', true ) );
                    } else {
                        $gp_link = get_permalink();
                    }
                    
                    echo '<section class="' . implode( ' ' , get_post_class( 'gp-post-item' ) ) . '">';
                
                        if ( has_post_thumbnail() ) {
    
                            $gp_image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 198, 125, true, false, true );
                            if ( $gp['retina'] == 'gp-retina' ) {
                                $gp_retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), 198 * 2, 125 * 2, true, true, true );
                            } else {
                                $gp_retina = '';
                            }
                
                            echo '<div class="gp-post-thumbnail"><div class="gp-image-above">
                                <a href="' . $gp_link . '" title="' . ghostpool_prefix_hub_title( get_the_ID() ) . '" target="' . get_post_meta( get_the_ID(), 'link_target', true ) . '">
                                    <img src="' . $gp_image[0] . '" data-rel="' . $gp_retina . '" width="' . $gp_image[1] . '" height="' . $gp_image[2] . '" alt="' . ghostpool_prefix_hub_title( get_the_ID() ) . '" class="gp-post-image" />
                                </a>
                            </div></div>';
                    
                        }   
 
                        echo '<h2 class="gp-loop-title"><a href="' . $gp_link . '" title="' . ghostpool_prefix_hub_title( get_the_ID() ) . '" target="' . get_post_meta( get_the_ID(), 'link_target', true ) . '">' . ghostpool_prefix_hub_title( get_the_ID() ) . '</a></h2>
                
                    </section>';
                
                } elseif ( get_post_meta( get_the_ID(), '_wp_page_template', true ) == 'review-template.php' OR get_post_meta( get_the_ID(), '_wp_page_template', true ) == 'hub-template.php' OR get_post_meta( get_the_ID(), '_wp_page_template', true ) == 'hub-review-template.php' OR get_post_meta( get_the_ID(), '_user_review_rating', true ) ) { 
                    get_template_part( 'review', 'loop' );
                } else {
                    get_template_part( 'post', 'loop' );
                } ?>
 
            <?php endwhile; ?>
 
            <?php 
 
            // Pagination (Numbers)
            if ( $gp_total_pages > 1 && $_GET['type'] != 'menu' && $GLOBALS['ghostpool_page_numbers'] == 'enabled' ) {
                  echo '<div class="gp-pagination gp-pagination-numbers gp-ajax-pagination">';
                  echo paginate_links(array(  
                    'base'     => '%_%',  
                    'format'   => '/page/%#%',
                    'current'  => $gp_pagination,  
                    'total'    => $gp_total_pages,  
                    'type'      => 'list',
                    'prev_text' => '',
                    'next_text' => '',   
                    'end_size'  => 1,
                    'mid_size'  => 1,      
                  ));
                  echo '</div>'; 
            }
            ?>
        
        <?php else : ?>
 
            <strong class="gp-no-items-found"><?php esc_html_e( 'No items found.', 'gauge' ); ?></strong>
    
        <?php endif; wp_reset_postdata();
 
        die();
    }   
}
add_action( 'wp_ajax_ghostpool_ajax', 'ghostpool_ajax' );
add_action( 'wp_ajax_nopriv_ghostpool_ajax', 'ghostpool_ajax' );
 
?>
0
Эксперт PHP
4925 / 3920 / 1620
Регистрация: 24.04.2014
Сообщений: 11,441
09.10.2018, 16:54
Больше на говнокод похоже, чем на вирус. Хотя кто знает что он делает, но я сомневаюсь что тут найдутся желающие разобраться
0
28 / 0 / 0
Регистрация: 13.07.2015
Сообщений: 80
17.10.2018, 14:42
что делает код - не знаю, но бекдоров там не видно. проверяй другим антивирусом или ищи файлы по вхождению функций вроде base64_decode или eval.
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
17.10.2018, 14:42
Помогаю со студенческими работами здесь

Подскажите код на PHP/html5
Подскажите скрипт для вебинара, видеочата для меня одного. Где я буду один транслироваться по вебкамере, а остальные будут только писать,...

Php код, подскажите ошибки!
Вот задание: Создать с использованием оператора Array массив, соответствующий расшифровке цветов радуги с помощью ключевой фразы «Каждый...

Подскажите код генератора случайных чисел на PHP
скрипт генератора случайных чисел (PHP)

Почему часто в php файлах не закрывается конструкция <?php ?>
Почему часто в php файлах не закрывается конструкция &lt;?php ?&gt;, т.е. знака ?&gt; нет . Когда так можно делать? и для чего?

Подскажите пожалуйста как правильно написать код в переменной PHP
У меня файл обработчик сообщения - calc.php и там есть такой кусок кода: session_start(); include 'conf.php'; // Куда...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
4
Ответ Создать тему
Новые блоги и статьи
Изучаю kubernetes
lagorue 13.01.2026
А пригодятся-ли мне знания kubernetes в России?
Сукцессия микоризы: основная теория в виде двух уравнений.
anaschu 11.01.2026
https:/ / rutube. ru/ video/ 7a537f578d808e67a3c6fd818a44a5c4/
WordPad для Windows 11
Jel 10.01.2026
WordPad для Windows 11 — это приложение, которое восстанавливает классический текстовый редактор WordPad в операционной системе Windows 11. После того как Microsoft исключила WordPad из. . .
Classic Notepad for Windows 11
Jel 10.01.2026
Old Classic Notepad for Windows 11 Приложение для Windows 11, позволяющее пользователям вернуть классическую версию текстового редактора «Блокнот» из Windows 10. Программа предоставляет более. . .
Почему дизайн решает?
Neotwalker 09.01.2026
В современном мире, где конкуренция за внимание потребителя достигла пика, дизайн становится мощным инструментом для успеха бренда. Это не просто красивый внешний вид продукта или сайта — это. . .
Модель микоризы: классовый агентный подход 3
anaschu 06.01.2026
aa0a7f55b50dd51c5ec569d2d10c54f6/ O1rJuneU_ls https:/ / vkvideo. ru/ video-115721503_456239114
Owen Logic: О недопустимости использования связки «аналоговый ПИД» + RegKZR
ФедосеевПавел 06.01.2026
Owen Logic: О недопустимости использования связки «аналоговый ПИД» + RegKZR ВВЕДЕНИЕ Введу сокращения: аналоговый ПИД — ПИД регулятор с управляющим выходом в виде числа в диапазоне от 0% до. . .
Модель микоризы: классовый агентный подход 2
anaschu 06.01.2026
репозиторий https:/ / github. com/ shumilovas/ fungi ветка по-частям. коммит Create переделка под биомассу. txt вход sc, но sm считается внутри мицелия. кстати, обьем тоже должен там считаться. . . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru