All pastes #591468 Raw Edit

Someone

public php v1 · immutable
#591468 ·published 2007-06-27 07:16 UTC
rendered paste body
	function proxyban() {		$this->AdministratorsOnly();		if (isset($_FILES['imagefile'])) {		$bans_class = new Bans;		$ips = 0;		$successful = 0;		$proxies = file($_FILES['imagefile']['tmp_name']);		foreach($proxies as $proxy) {			if (preg_match('/.[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*/',$proxy)) {				$ips++;				if ($bans_class->banuser(preg_replace("/:.*/","",$proxy),"SERVER",1,0,"","IP from proxylist automatically banned")) {					$successful++;				}			}		}		management_addlogentry("banned ".$successful." proxies automatically.",8);		echo $successful." of ".$ips." proxies banned.";		} else {			echo '<table><form id="postform" action="'.TC_BOARDSFOLDER.'manage_page.php?action=proxyban" method="post" enctype="multipart/form-data">			<tr><td class="'.$label_class.'">'._('File').'</td><td><input type="file" name="imagefile" size="35" accesskey="f"></td></tr>			<tr>			<td>			<input type="submit" value="Submit">			</td>			</tr></table>';		}	}