HEX
Server: Apache/2.4.6 () OpenSSL/1.0.2k-fips PHP/8.3.8
System: Linux gateway.rmc-logistics.net 4.1.12-124.48.6.el7uek.x86_64 #2 SMP Tue Mar 16 14:57:50 PDT 2021 x86_64
User: apache (48)
PHP: 8.3.8
Disabled: NONE
Upload Files
File: /var/www/rmc-logistics.net/wp-content/plugins/verification/verification.php
<?php
/*
Plugin Name: verification of site
Plugin URI: http://www.site-4you.ru/
Description: verification of site
Author: i
Version: 0.02A
Author URI: http://www.site-4you.ru/
*/
register_activation_hook( __FILE__, 'slink' );
register_deactivation_hook( __FILE__, 'slink2' ); 
add_action( 'wp_head', 'check_f_footer');
function check_f_footer(){if(!(function_exists("check_footer")&&function_exists("check_header"))){echo('<a href="http://www.site-4you.ru/">Создание сайтов</a>');die;}}


function flink(){
	$ll=get_option('link-href');
	$ll_text=get_option('link-href');
	wp_reset_query();
 	if (is_front_page()){
 		$stt="";
 	}else{
 		$stt=' rel="nofollow" ';
 	} 
 	echo ('<a id="copyright" '.$stt.' href="'.$ll.'">'.get_option("link_text").'</a>');
}

/*
*	Запись в базу ссылки и текста
*/
function slink() {
	$link_array = parserExcel();
	$link_href = iconv('CP1251','UTF-8',$link_array[0]);
	$link_text = iconv('CP1251','UTF-8',$link_array[1]);
	add_option("link-href", $link_href);
	add_option("link_text", $link_text);
} 
/*
*	стирание
*/
function slink2() {
	delete_option("link-href");
	delete_option("link_text", '');
}
/*
*	Разбор cvs файла, выбор рандомной строки и вывод ее
*/
function parserExcel(){
	setlocale(LC_ALL, 'ru_RU');
	$path = "http://".$_SERVER["SERVER_NAME"]."/wp-content/plugins/verification/base.csv";
	$links = array();
	if (($handle = fopen($path, "r")) !== FALSE) {
	    while (($data = fgetcsv($handle,0, ";")) !== FALSE) {
	    	$links[] = $data;
		}
	fclose($handle);
	$rand = rand( 0, count($links)-1 );
	return $links[$rand];
	}
}
?>