$smarty->assign_by_ref('ban_comments_list', $ban_comments_list);
}

// Handle case when coming from tiki-admin_actionlog with a list of IPs to ban
if (!empty($_REQUEST['mass_ban_ip_actionlog'])) {
	check_ticket('admin-banning');
	include_once ('lib/logs/logslib.php');
	$actionslib = new LogsLib;
	$smarty->assign('mass_ban_ip', $_REQUEST['mass_ban_ip_actionlog']);
	$info['mode'] = 'mass_ban_ip';
	$info['title'] = tr('Multiple IP Banning');
	$info['message'] = tr('Access from your localization was forbidden due to excessive spamming.');
	$info['date_to'] = $tikilib->now + 365 * 24 * 3600;
	$banId_list = explode('|', $_REQUEST['mass_ban_ip_actionlog']);
	foreach ($banId_list as $id) {
		$ban_actions=$actionslib->get_info_action($id);
		$ban_comments_list[$ban_actions['ip']][$id]['userName'] = $ban_actions['user'];
	}
	$smarty->assign_by_ref('ban_comments_list', $ban_comments_list);
}

$smarty->assign('banId', $_REQUEST['banId']);
$smarty->assign_by_ref('info', $info);

$where = '';
$wheres = array();
if (isset($_REQUEST['where'])) {
	$where = $_REQUEST['where'];
}
if (!isset($_REQUEST["sort_mode"])) {
	$sort_mode = 'created_desc';