value('membersarea')=='Active') { if (!empty($_REQUEST['redirect'])) { $redirect = @ereg_replace('_AND_', '&', $_REQUEST['redirect']); } else { $redirect = 'index.php'; } header_redirect($redirect); } else if ($setts['is_ssl'] && $_SERVER['HTTPS'] != 'on' && $_REQUEST['operation'] != 'submit') { header_redirect($setts['site_path_ssl'] . 'login.php?' . $_SERVER['QUERY_STRING']); } else { if($mobile_device) { require ('global_header_mobile.php'); } else { require ('global_header.php'); } $banned_output = check_banned($_SERVER['REMOTE_ADDR'], 1); if ($banned_output['result']) { $template->set('message_header', header5(MSG_LOGIN_TO_MEMBERS_AREA)); $template->set('message_content', $banned_output['display']); $template_output .= $template->process('single_message.tpl.php'); } else { $template->set('header_registration_message', header5(MSG_LOGIN_TO_MEMBERS_AREA)); if ($_REQUEST['operation'] == 'submit') { $signup_fee = new fees(); $signup_fee->setts = &$setts; $header_redirect = (empty($_REQUEST['redirect'])) ? 'members_area.php' : $_REQUEST['redirect']; if(!empty($_POST['username']) && !empty($_POST['password'])) { $login_output = login_user($_POST['username'], $_POST['password'], $header_redirect); $session->set('membersarea', $login_output['active']); $session->set('username', $login_output['username']); $session->set('user_id', $login_output['user_id']); $session->set('is_seller', $login_output['is_seller']); //setcookie("forum_user_id","$login_output[user_id]"); $session->set('remember_username', intval($_REQUEST['remember_username'])); $session->set('temp_user_id', $login_output['temp_user_id']); /* for use with activate_account.php only! */ $redirect_url = ($login_output['redirect_url'] == 'sell_item') ? 'sell_item.php' : $login_output['redirect_url']; $redirect_url = (eregi('account_activate', $redirect_url)) ? 'members_area.php' : $redirect_url; header_redirect($db->add_special_chars($redirect_url)); } if(empty($_POST['username'])) { $username_email_error = GMSG_EMPTY_USERNAME_EMAIL; } if(empty($_POST['password'])) { $password_error = GMSG_EMPTY_PASSWORD; } $template->set('username_email_error', $username_email_error); $template->set('password_error', $password_error); } if ($_REQUEST['invalid_login'] == 1) { $invalid_login = 1; } if ($_REQUEST['invalid_login'] == 2) { $invalid_login = 2; } if ($_REQUEST['invalid_login'] == 3) { $invalid_login = 3; } $template->set('invalid_login', $invalid_login); $redirect = @ereg_replace('_AND_', '&', $_REQUEST['redirect']); $auction_id = str_replace('auction_details.php?auction_id=','',$_REQUEST['redirect']); if($_POST['username']) { $username = $_POST['username']; } else { $username = $_GET['username']; } $template->set('redirect', $redirect); $template->set('username', $username); if($mobile_device) { $template_output .= $template->process('login_mobile.tpl.php'); } else { if($setts['guest_buy'] && $auction_id && $_REQUEST['guest']) { $template->set('auction_id', $auction_id); $template_output .= $template->process('guest_buy_login.tpl.php'); } else { $template_output .= $template->process('login.tpl.php'); } } } include_once ('global_footer.php'); echo $template_output; } ?>