value('membersarea')=='Active') { header_redirect('index.php'); } else { require ('global_header.php'); $template->set('box_top', box_top('Login / Register')); $template->set('box_bottom', box_bottom()); if ($_REQUEST['operation'] == 'submit') { $header_redirect = (empty($_REQUEST['redirect'])) ? 'members_area.php' : $_REQUEST['redirect']; $login_output = login_user($_POST['username'], $_POST['password'], $header_redirect); $session->set('membersarea', $login_output['active']); $session->set('username', $login_output['username']); $session->set('email', $login_output['email']); $session->set('name', $login_output['f_name'] . " " . $login_output['l_name'] ); $session->set('user_id', $login_output['user_id']); $session->set('subscriber_online', $login_output['subscriber_online']); $session->set('subscriber_print', $login_output['subscriber_print']); if (check_subscription($session->value('subscriber_online'))) { $session->set('can_download', true); $session->set('free_trial', $login_output['trial']); } else { $session->set('free_trial', $login_output['trial']); $session->set('can_download', false); } $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 ($_REQUEST['invalid_login'] == 1) { $invalid_login_message = ' '. ' '. '
' . MSG_INVALID_LOGIN . '
'; $template->set('invalid_login_message', $invalid_login_message); } $template->set('redirect', $_REQUEST['redirect']); $template_output .= $template->process('login.tpl.php'); include_once ('global_footer.php'); echo $template_output; } ?>