AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/logmcpe/www/TEST/www/wp-content/plugins/wp/../../themes/cleanmate/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/www/wp-content/plugins/wp/../../themes/cleanmate/comments.php
<?php
if(comments_open())
{
if(have_comments()):
	$comments_count = get_comments_number();
	?>
	<h4><?php echo $comments_count . " " . ($comments_count!=1 ? __("COMMENTS", 'cleanmate') : __("COMMENT", 'cleanmate')); ?></h4>
	<ul id="comments-list">
		<?php
		paginate_comments_links();
		wp_list_comments(array(
			'avatar_size' => 90,
			'page' => (isset($_GET["paged"]) ? (int)$_GET["paged"] : 1),
			'per_page' => '5',
			'callback' => 'cm_theme_comments_list'
		));
		?>
	</ul>
	<?php
	global $post;
	$query = $wpdb->prepare("SELECT COUNT(*) AS count FROM $wpdb->comments WHERE comment_approved = 1 AND comment_post_ID = %d AND comment_parent = 0", get_the_ID());
	$parents = $wpdb->get_row($query);
	if($parents->count>5)
		cm_comments_pagination(2, ceil($parents->count/5));
	?>
	<script type="text/javascript">
	jQuery(document).ready(function($){
		$(".comments-list-container .reply-button").on("click", function(event){
			event.preventDefault();
			var offset = $("#comment-form").offset();
			$("html, body").animate({scrollTop: offset.top-90}, 400);
			$("#comment-form [name='comment_parent_id']").val($(this).attr("href").substr(1));
			$("#cancel-comment").css('display', 'inline-block');
		});
		$("#cancel-comment").on("click", function(event){
			event.preventDefault();
			$(this).css('display', 'none');
			$("#comment-form [name='comment_parent_id']").val(0);
		});
	});
	</script>
	<?php
endif;
}
else
{
	if(have_comments()):
	?>
	<ul id="comments-list">
		<?php
		wp_list_comments(array(
			'type' => 'pings',
			'avatar_size' => 90,
			'page' => (isset($_GET["paged"]) ? (int)$_GET["paged"] : 1),
			'per_page' => '5',
			'callback' => 'cm_theme_comments_list'
		));
		?>
	</ul>
	<?php
endif;
}
function cm_theme_comments_list($comment, $args, $depth)
{
	global $post;
	$GLOBALS['comment'] = $comment;
?>
	<li <?php comment_class('comment clearfix'); ?> id="comment-<?php echo esc_attr(get_comment_ID()); ?>">
		<div class="comment-container clearfix">
			<?php
			if(get_comment_type()=="comment")
			{
			?>
			<div class="comment-author-avatar">
				<?php echo get_avatar( $comment->comment_author_email, $args['avatar_size'] ); ?>
			</div>
			<?php
			}
			?>
			<div class="comment-details">
				<div class="posted-by clearfix">
					<h6>
					<?php
					comment_author_link();
					?>
					</h6>
					<?php
					if((int)$comment->comment_parent>0)
					{	
						$parent_author = get_comment_author((int)$comment->comment_parent);
						echo '<a href="#comment-' . esc_attr((int)$comment->comment_parent) . '" class="in-reply">' . $parent_author . '</a>';
					}
					?>
					<abbr title="<?php printf(esc_html__('%1$s, %2$s', 'cleanmate'), get_comment_date(),  get_comment_time()); ?>" class="timeago"><?php printf(__('%1$s, %2$s', 'cleanmate'), get_comment_date(),  get_comment_time()); ?></abbr>
					<?php
					if(get_comment_type()=="comment")
					{
					?>
					<a class="more gray small reply-button" href="#<?php echo esc_attr(get_comment_ID()); ?>" title="<?php esc_attr_e('Reply', 'cleanmate'); ?>"><?php _e('Reply', 'cleanmate'); ?></a>
					<?php
					}
					?>
				</div>
				<?php 
				comment_text(); 
				edit_comment_link(__('(Edit)', 'cleanmate'),'<br>','<br><br>'); 
				?>
			</div>
		</div>
<?php
}
function cm_comments_pagination($range, $pages)
{
	$paged = (!isset($_GET["paged"]) || (int)$_GET["paged"]==0 ? 1 : (int)$_GET["paged"]);
	$showitems = ($range * 2)+1;
	
	echo "<ul class='pagination page-margin-top'>";
	if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<li><a href='#page-1'>&laquo;</a></li>";
	if($paged > 1 && $showitems < $pages) echo "<li class='left'><a class='template-arrow-horizontal-3' href='#page-" . esc_attr(($paged-1)) . "'></a></li>";

	for ($i=1; $i <= $pages; $i++)
	{
		if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
		{
			echo "<li" . ($paged == $i ? " class='selected'" : "") . ">" . ($paged == $i ? "<span>".$i."</span>":"<a href='#page-" . absint($i) . "'>".$i."</a>") . "</li>";
		}
	}

	if ($paged < $pages && $showitems < $pages) echo "<li class='right'><a class='template-arrow-horizontal-3' href='#page-" . esc_attr(($paged+1)) . "'></a></li>";  
	if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "<li><a href='#page-" . esc_attr($pages) . "' class='pagination_arrow'>&raquo;</a></li>";
	echo "</ul>";
}
?>

AnonSec - 2021