stop-spammers-classic/classes/ss_get_gcache.php
2026-05-11 03:50:05 -06:00

39 lines
No EOL
2.2 KiB
PHP

<?php
if ( !defined( 'ABSPATH' ) ) {
status_header( 404 );
exit;
}
class ss_get_gcache {
public function process( $ip, &$stats = array(), &$options = array(), &$post = array() ) {
// gets the innerhtml for cache - same as get gcache except for names
$goodips = $stats['goodips'];
$cachedel = 'delete_gcache';
$container = 'goodips';
$trash = SS_PLUGIN_URL . 'images/trash.png';
$tdown = SS_PLUGIN_URL . 'images/tdown.png';
$tup = SS_PLUGIN_URL . 'images/tup.png';
$whois = SS_PLUGIN_URL . 'images/whois.png';
$stophand = SS_PLUGIN_URL . 'images/stop.png';
$search = SS_PLUGIN_URL . 'images/search.png';
$ajaxurl = admin_url( 'admin-ajax.php' );
$show = '';
foreach ( $goodips as $key => $value ) {
$who = "<a title=\"Look Up WHOIS\" target=\"_stopspam\" href=\"https://whois.domaintools.com/" . esc_attr( $key ) . "\"><img src=\"$whois\" class=\"icon-action\"></a>";
$show .= "<a href=\"https://www.stopforumspam.com/search?q=" . esc_attr( $key ) . "\" target=\"_stopspam\">" . esc_html( $key ) . ": " . esc_html( $value ) . "</a>";
// try AJAX on the delete from bad cache
$onclick = "onclick=\"sfs_ajax_process('" . esc_js( $key ) . "','" . esc_js( $container ) . "','" . esc_js( $cachedel ) . "','" . esc_js( $ajaxurl ) . "');return false;\"";
$show .= " <a href=\"\" $onclick title=\"Delete " . esc_attr( $key ) . " from Cache\" alt=\"Delete " . esc_attr( $key ) . " from Cache\" ><img src=\"$trash\" class=\"icon-action\"></a>";
$onclick = "onclick=\"sfs_ajax_process('" . esc_js( $key ) . "','" . esc_js( $container ) . "','add_black','" . esc_js( $ajaxurl ) . "');return false;\"";
$show .= " <a href=\"\" $onclick title=\"Add " . esc_attr( $key ) . " to Block List\" alt=\"Add to Block List\" ><img src=\"$tdown\" class=\"icon-action\"></a>";
$onclick = "onclick=\"sfs_ajax_process('" . esc_js( $key ) . "','" . esc_js( $container ) . "','add_white','" . esc_js( $ajaxurl ) . "');return false;\"";
$show .= " <a href=\"\" $onclick title=\"Add " . esc_attr( $key ) . " to Allow List\" alt=\"Add to Allow List\" ><img src=\"$tup\" class=\"icon-action\"></a>";
$show .= $who;
$show .= "<br>";
}
return $show;
}
}
?>