<?php
if (! can_action('admin'))
	redirect();

require_once(LIB.'BlockTable.class.php');
$blockObj = new BlockTable();

$id = @$params[0];

if (empty($id)) {
	redirect('block');
}

$blockObj->del($id);
$blockObj->updateCache();
redirect('block');
?>