<?php if (!defined('INIT_INSTANCE')) { die('Access restricted'); } if ($member_db[UDB_ACL] != ACL_LEVEL_ADMIN) { msg("error", "Access Denied", "You don't have permission for this section"); } // ******************************************************************************** // Add IP // ******************************************************************************** if ($action == "add" or $action == "quickadd") { if (!empty($add_ip)) { user_addban($add_ip); } // from editcomments if ($action == "quickadd") { die_stat(false, str_replace('%1', $add_ip, lang('The IP %1 is now banned from commenting'))); } } elseif ($action == "remove") { if (empty($remove_ip)) { msg("error", lang('Error!'), lang("The IP or nick cannot be blank"), '#GOBACK'); } user_remove_ban($remove_ip); } // ******************************************************************************** // List all IP // ******************************************************************************** echoheader("options", lang("Blocking IP / Nickname"), make_breadcrumbs('main/options=options/Block IP or nickname')); $c = 0; $iplist = array();
$_SESS['user'] = $username; if ($rememberme == 'yes') { $_SESS['@'] = true; } elseif (isset($_SESS['@'])) { unset($_SESS['@']); } add_to_log($username, 'login'); user_remove_ban($ip); // Modify Last Login $member_db[UDB_LAST] = time(); user_update($username, $member_db); $is_loged_in = true; send_cookie(); } else { $_SESS['user'] = false; $bandata = user_addban($ip, time() + 3600); $result .= getpart('block_ban', $bandata[1], date('d-m-Y H:i:s', $bandata[2])); add_to_log($username, lang('Wrong username/password')); $is_loged_in = false; send_cookie(); } } } else { // Check existence of user $member_db = user_search($_SESS['user']); if ($member_db) { $is_loged_in = true; } else { $_SESS['user'] = false; $is_loged_in = false; send_cookie();