⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ban.php

📁 jsp程序开发系统
💻 PHP
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: ban.php,v $
// | $Date: 2004/02/10 01:34:24 $
// | $Revision: 1.14 $
// +-------------------------------------------------------------+
// | File Details:
// | - Banned e-mail and IP address maintenance (administration
// |   interface)
// +-------------------------------------------------------------+

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
//Nullify WTN-WDYL Team

// default do
$_REQUEST['do'] = trim($_REQUEST['do']);
if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
	$_REQUEST['do'] = "email";
}

############################### UPDATE THE BANNED EMAILS ###############################

if ($_REQUEST['do'] == "update_email") {
	if (is_array($_REQUEST[email])) { // sort and duplicates
		$_REQUEST[email] = array_unique($_REQUEST[email]);
		asort($_REQUEST[email]);

		foreach ($_REQUEST[email] AS $key => $var) {
			if ($var != '') {
				$data[] = $var;
			}
		}
	}

	update_data('email_ban', serialize($data));
	$_REQUEST['do'] = "email";
}

############################### UPDATE IP ADDRESSES ###############################

if ($_REQUEST['do'] == "update_ip") {
	if (is_array($_REQUEST[ip])) { // sort and duplicates
		$_REQUEST[ip] = array_unique($_REQUEST[ip]);
		asort($_REQUEST[ip]);

		foreach ($_REQUEST[ip] AS $key => $var) {
			if ($var != '') {
				$data[] = $var;
			}
		}
	}

	update_data('ip_ban', serialize($data));
	$_REQUEST['do'] = "ip";
}

############################### SHOW BANNED EMAILS ###############################

if ($_REQUEST['do'] == "email") {
	admin_header('Banning', 'Email Addresses');

	$banned_emails = get_data('email_ban');
	$banned_emails = unserialize($banned_emails);

	if (is_array($banned_emails)) {
		foreach ($banned_emails AS $key => $var) {
			$table[] = array('<b>Email:</b>', form_input($key, $var, '40', 'email'));
		}
	}
	
	$i = $key;
	for ($i++; $i < 20; $i++) {
		$table[] = array('<b>Email:</b>', form_input($i, '', '40', 'email'));
	}

	table_header('Ban Email Adresses', 'ban.php', array('do' => 'update_email'));
	table_content('', $table, '', '', '<UL><LI>To ban a single email address, enter the address (e.g. <I>user@domain</I>).</LI>
		<LI>To ban a domain or subdomain, enter the domain name with a wildcard (*), like <I>*@domain</I> or <I>*sub.domain</I>.</LI>
		<LI>To ban a username or word appearing at the start of an email address, enter the username or word with a wildcard (*), like <I>user@*</I>.</LI>
		<LI>To ban a word from appearing in an email address, use wildcards (*), like <I>*word*</I>.</LI></UL>');
	table_footer('Update Emails');
	unset($table);
}

############################### SHOW BANNED IPs ###############################

if ($_REQUEST['do'] == "ip") {
	admin_header('Banning', 'IP Addresses');

	$banned_ip = get_data('ip_ban');
	$banned_ip = unserialize($banned_ip);

	if (is_array($banned_ip)) {
		foreach ($banned_ip AS $key => $var) {
			$table[] = array('<b>IP:</b>', form_input($key, $var, '40', 'ip'));	
		}
	}

	$i = $key;
	for ($i++; $i < 20; $i++) {
		$table[] = array('<b>IP:</b>', form_input($i, '', '40', 'ip'));
	}

	table_header('Ban IP Adresses', 'ban.php', array('do' => 'update_ip'));
	table_content('', $table, '', '', '<UL><LI>To ban a single IP address, enter the address in full (e.g. <I>xxx.xxx.xxx.xxx</I>).</LI>
		<LI>To ban a group of IP addresses, use a wildcard (*), like <I>*.xxx.xxx.xxx</I> or <I>xxx.xxx.xxx.*</I>.</LI></UL>');
	table_footer('Update IPs');
	unset($table);
}

##############################################################

admin_footer();

php?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -