Warning: Constant SEO_LINKS_API_ENDPOINT already defined in /www/wwwroot/fni.gov.mz/wp-content/plugins/wordpress-plugin/wordpress-plugin.php on line 10
HEX
HEX
Server: Apache
System: Linux paginas.localdomain 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64
User: www (1002)
PHP: 8.0.11
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/fni.gov.mz/wp-content/plugins/count-per-day/massbots.php
<?php 
if (!defined('ABSPATH'))
	exit;

// check user
$o = get_option('count_per_day');
$can_see = str_replace(
	// administrator, editor, author, contributor, subscriber
	array(10, 7, 2, 1, 0),
	array('manage_options', 'moderate_comments', 'edit_published_posts', 'edit_posts', 'read'),
	$o['show_in_lists']);
if ( !current_user_can($can_see) )
	die();

if ( isset($_GET['dmbip']) && isset($_GET['dmbdate']) )
{
	$sql = $wpdb->prepare("
	SELECT	c.page post_id, p.post_title post,
			t.name tag_cat_name,
			t.slug tag_cat_slug,
			x.taxonomy tax
	FROM	$wpdb->cpd_counter c
	LEFT	JOIN $wpdb->posts p
			ON p.ID = c.page
	LEFT	JOIN $wpdb->terms t
			ON t.term_id = 0 - c.page
	LEFT	JOIN $wpdb->term_taxonomy x
			ON x.term_id = t.term_id
	WHERE	c.ip = %s
	AND		c.date = %s
	ORDER	BY p.ID",
	$_GET['dmbip'], $_GET['dmbdate'] );
	$massbots = $count_per_day->mysqlQuery('rows', $sql, 'showMassbotPosts');
}
?>

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="UTF-8" />
<title>Count per Day</title>
<link rel="stylesheet" type="text/css" href="<?php echo $count_per_day->dir ?>/counter.css" />
</head>
<body class="cpd-thickbox">
<h2><?php _e('Mass Bots', 'cpd') ?></h2>
<ol>
<?php
foreach ( $massbots as $r )
{
	if ( $r->post_id < 0 && $r->tax == 'category' )
	{
		$name = '- '.$r->tag_cat_name.' -';
		$link = get_bloginfo('url').'?cat='.abs($r->post_id);
	}
	else if ( $r->post_id < 0 )
	{
		$name = '- '.$r->tag_cat_name.' -';
		$link = get_bloginfo('url').'?tag='.$r->tag_cat_slug;
	}
	else if ( $r->post_id == 0 )
	{
		$name = '- '.__('Front page displays').' -';
		$link =	get_bloginfo('url');
	}
	else
	{
		$postname = $r->post;
		if ( empty($postname) ) 
			$postname = '---';
		$name = $postname;
		$link =	get_permalink($r->post_id);
	}
	echo '<li><a href="'.$link.'" target="_blank">'.$name.'</a></li>';
}
?>
</ol>
<?php if ($count_per_day->options['debug']) $count_per_day->showQueries(); ?>
</body>
</html>