| Server IP : 194.30.32.123 / Your IP : 216.73.216.89 Web Server : Apache System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64 User : ftpbegirale ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /expert/htwebs/www.begirale.com/public/wp-content/themes/perspective-theme/ |
Upload File : |
<?php
global $xmlObject, $node,$post,$cs_theme_option,$wpdb;
?>
<div class="element_size_<?php echo $node->review_element_size; ?>">
<?php
if($node->review_title <> ''){echo '<header class="heading"><h2 class="heading-color section-title cs-heading-color">'.$node->review_title.'</h2></header>';}
if($node->review_cat <> '0'){
$row = $wpdb->get_row("SELECT * from ".$wpdb->prefix."terms WHERE slug = '" . $node->review_cat ."'" );
cs_enqueue_filterable_style_script();
?>
<script>
jQuery(document).ready(function($){
$('#list').mixitup({ });
$(".splitter li a") .click(function(event){
$(".splitter li") .removeClass("active");
$(this).parent() .addClass("active")
// event.preventDefault();
});
});
</script>
<?php
if ( empty($_GET['page_id_all']) ) $_GET['page_id_all'] = 1;
$count_post = 0;
if($row <> '') {
$args = array( 'posts_per_page' => '-1', 'post_type' => 'reviews', 'review-category' => "$row->name" );
}
else{
$args = array( 'posts_per_page' => '-1', 'post_type' => 'reviews' );
}
$custom_query = new WP_Query($args);
$post_count = $custom_query->post_count;
$filter_category = '';
if ( isset($_GET['filter_category']) ) {
$filter_category = $_GET['filter_category'];
}else {
if($row <> ''){
$filter_category = $row->slug;
}
}
if($node->review_filterable == "On"){
?>
<style>
#list .mix{
opacity: 0;
display: none;
}
</style>
<div class="filter_nav">
<ul class="splitter">
<?php
$qrystr= "";
if ( isset($_GET['page_id']) ) $qrystr = "&page_id=".$_GET['page_id'];
?>
<li class="filter <?php if($filter_category==$row->slug || empty($filter_category)) echo "active"; ?>" >
<a href="?<?php echo $qrystr."&filter_category=".$row->slug?>"><?php if($cs_theme_option["trans_switcher"] == "on") { _e("All",'Perspective'); }else{ echo $cs_theme_option["trans_all"];}?></a></li>
<?php
$categories = get_categories( array('child_of' => "$row->term_id", 'taxonomy' => 'review-category', 'hide_empty' => 0) );
foreach ($categories as $category) {
?>
<li class="filter <?php if($filter_category==$category->slug) echo "active"; ?>" ><a href="?<?php echo $qrystr."&filter_category=".$category->slug?>" onclick="this.form.submit()" ><?php echo $category->cat_name?></a></li>
<?php
}
?>
</ul>
</div>
<!-- Filter Nav Start -->
<!-- Filter Nav End -->
<?php } //End Condition of Filterable
if($node->review_view == 'grid-view'){
?>
<!-- Our reviews Start -->
<div class="our_courses">
<div class="inner grid-view" id="list">
<ul>
<?php
wp_reset_query();
$args = array( 'posts_per_page' => "$node->review_per_page", 'paged' => $_GET['page_id_all'], 'post_type' => 'reviews', 'review-category' => "$filter_category" );
$custom_query = new WP_Query($args);
if(have_posts()):
while ( $custom_query->have_posts()) : $custom_query->the_post();
$image_url = cs_get_post_img_src($post->ID, 585, 440);
?>
<li>
<!-- Article Start -->
<article data-id="id-<?php the_ID(); ?>" <?php post_class(); ?>>
<figure class="<?php if($image_url == '')echo "no-img";?>">
<?php if($image_url <> ''){?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $image_url;?>" alt=""></a>
<?php } ?>
<figcaption>
<span class="stars-large">
<span style="width:<?php cs_user_rating(); ?>%"></span>
</span>
<span class="votes">
<?php
if ( get_post_meta(get_the_id(), "rating_vote_counter", true) > 0 ) {
$rating_vote_counter = get_post_meta(get_the_id(), "rating_vote_counter", true);
}
else {
$rating_vote_counter = 0;
}
echo " ( " . $rating_vote_counter . " Votes )";
?>
</span>
</figcaption>
</figure>
<h6><a href="<?php the_permalink();?>" class="colrhover"><?php echo substr(get_the_title(),0,20); if(strlen(get_the_title()) > 20){ echo '...';}?></a></h6>
</article>
<!-- Article End -->
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
</div>
<!-- Our reviews End -->
<?php
}else{
echo '<div id="list">';
wp_reset_query();
$args = array( 'posts_per_page' => "$node->review_per_page", 'paged' => $_GET['page_id_all'], 'post_type' => 'reviews', 'review-category' => "$filter_category" );
$custom_query = new WP_Query($args);
if(have_posts()):
while ( $custom_query->have_posts()) : $custom_query->the_post();
$post_xml = get_post_meta($post->ID, "cs_review", true);
if ( $post_xml <> "" ) {
$xmlObject = new SimpleXMLElement($post_xml);
$review_social = $xmlObject->review_social;
}
else {
$review_social = '';
}
$image_id = cs_get_post_img($post->ID, 370, 208);
?>
<article data-id="id-<?php the_ID(); ?>" <?php post_class('coursesarticle'); ?>>
<!-- Courses Text Start -->
<div class="courtext webkit <?php if($image_id == '')echo "no-img";?>">
<?php if($image_id <> ''){?>
<figure><a href="<?php the_permalink(); ?>"><?php echo $image_id;?></a></figure>
<?php } ?>
<!-- Text Start -->
<div class="text">
<h2 class="heading-color post-title"><a href="<?php the_permalink(); ?>" class="colrhover"><?php echo substr(get_the_title(),0,60); if(strlen(get_the_title()) > 60){ echo '...';}?></a></h2>
<div class="top">
<ul>
<li><i class="icon-time"></i><?php echo get_the_date();?></li>
<li><i class="icon-comment"></i><a href="<?php echo get_permalink();?>#comments"><?php echo comments_number(__('No Comments', 'Perspective'), __('1 Comment', 'Perspective'), __('% Comments', 'Perspective') );?></a></li>
<li><i class="icon-eye-open"></i><?php
$review_like_counter = get_post_meta(get_the_ID(), "review_counter", true);
if($review_like_counter)
echo $review_like_counter.' ';
else
echo '0 ';
if($cs_theme_option['trans_switcher']== "on"){ _e('Views','Perspective'); }else{ echo $cs_theme_option['trans_review_views']; }
?></li>
</ul>
</div>
<div class="bottom">
<ul>
<?php
/* translators: used between list items, there is a space after the comma */
$before_tag = "<li> ".__( 'Tags','Perspective' ).": ";
$tags_list = get_the_term_list ( get_the_id(), 'review-tag',$before_tag, ', ', '</li>' );
if ( $tags_list){
printf( __( '%1$s', 'Perspective' ),$tags_list );
} // End if categories
?>
<?php
/* translators: used between list items, there is a space after the comma */
if($cs_theme_option['trans_switcher']== "on"){ $before_cat = "<li>"._e('Listed in ','Perspective').": "; }
else{ $before_cat = "<li>".$cs_theme_option['trans_listed_in'].": "; }
$categories_list = get_the_term_list ( get_the_id(), 'review-category', $before_cat, ', ', '</li>' );
if ( $categories_list ){
printf( __( '%1$s', 'Perspective' ),$categories_list );
} // End if categories
?>
</ul>
</div>
</div>
<!-- Text End -->
</div>
<!-- Courses Text End -->
<!-- Rating Start -->
<div class="rating webkit">
<div class="top">
<h5 class="heading-color">
<?php echo cs_admin_reviews(); ?>
</h5>
</div>
<div class="bottom">
<h6 class="heading-color">User Rating</h6>
<span class="stars-large">
<span style="width:<?php cs_user_rating(); ?>%"></span>
</span>
<span>
<?php
cs_user_rating();
if ( get_post_meta(get_the_id(), "rating_vote_counter", true) > 0 ) {
$rating_vote_counter = get_post_meta(get_the_id(), "rating_vote_counter", true);
}
else {
$rating_vote_counter = 0;
}
echo " ( " . $rating_vote_counter . " Votes )";
?>
</span>
</div>
</div>
<!-- Rating End -->
</article>
<?php endwhile; endif;
echo "</div>";
}
$qrystr = '';
if (cs_pagination($post_count, $node->review_per_page,$qrystr) <> ''){
if ( $node->review_pagination == "Show Pagination" and $node->review_per_page > 0 ) {
echo "<nav class='pagination'><ul>";
if ( isset($_GET['page_id']) ) $qrystr = "&page_id=".$_GET['page_id'];
if ( isset($_GET['filter_category']) ) $qrystr .= "&filter_category=".$_GET['filter_category'];
echo cs_pagination($post_count, $node->review_per_page,$qrystr);
echo "</ul></nav>";
}
}
}else{ ?>
<h2><?php _e( 'No results found.', 'Perspective' )?></h2>
<?php }
echo '</div>';