Location: PHPKode > projects > phpBlogger > admin/userset.php
<?php
###############################
#userset.php      version 1.1.#
###############################
$id = (int)$_GET['id'];
$ref = (int)$_GET['ref'];
include ('header.php');
?>
<div id="headermenu">Manage users</div>
<?php if($ref == 5) {
	$ip = $_GET['ip'];
	$sql = 'DELETE FROM banip WHERE banipad = '.$conn->qstr($ip).'';
	if($conn->Execute($sql) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
	echo "<div id ='information'>&nbsp;Successfully. ";
}
if($ref == 6) {
	$ip = $_GET['ip'];
	$sql2 = 'INSERT INTO banip (`banipad`) VALUES ('.$conn->qstr($ip).')';
	if($conn->Execute($sql2) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
	echo "<div id ='information'>&nbsp;Successfully. ";
}
if($ref == 7) {
	$sql3 = 'DELETE FROM users WHERE usid ='.$conn->qstr($id).'';
	if($conn->Execute($sql3) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
	$sql4 = 'DELETE FROM comment WHERE userid ='.$conn->qstr($id).'';
	if($conn->Execute($sql4) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
	echo "<div id ='information'>&nbsp;Successfully. ";
}
if($ref == 8) {
	$sql5 = 'UPDATE users SET active='.$conn->qstr("1").' WHERE  usid='.$conn->qstr($id).'';
	if($conn->Execute($sql5) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
	echo "<div id ='information'>&nbsp;Successfully. ";
}
$conn->Close();
?>
<a href="user.php">Manage Users</a> | <a href="usersearch.php">Search Users</a></div>
</div></div></div>
<?php include ('footer.php'); ?>
Return current item: phpBlogger