login($_POST); if(isset($user['email']) && $user['email'] == $_POST['login_form_email']){ $_SESSION['translations'] = $oTrans->listTranslations($user['lang_code']); $_SESSION['user'] = $user; $_SESSION['features'] = $oFeat->getFeaturesOfUser($user['id'], $user['lang_code']); $_SESSION['config']['default_lang_code'] = $user['lang_code']; } else { $_SESSION['message'] = $user; } } //REM You MUST ABSOLUTELY leave this code here and not place it in the model (models/markets.php) // because of the header which must be declared before any of HTML tags, even // if a guest does a trade from market page, they will need to register to continue if(isset($_POST['portfolio_form_submit'])){ if(!isset($_SESSION['user']['id'])){ $_SESSION['_POST'] = $_POST; header("Location: ".$oConf->getURLRoot('register')) or die("error"); } } // END OF REM $lang_code = (isset($_SESSION['user']['lang_code']))?$_SESSION['user']['lang_code']:$_SESSION['config']['default_lang_code']; ?>
getPage("default", $lang_code); ?>