<?php if ($_SERVER['REQUEST_METHOD']=='POST') { $login=TPOST('login'); $passwd=POST('passwd'); } else { if ($_SESSION['uniwits.inputcache.domain']=='login') { $login=$_SESSION['uniwits.inputcache.data']['login']; $passwd=$_SESSION['uniwits.inputcache.data']['passwd']; } } $DBConn->connect(true); if (member_login($DBConn,$login,$passwd)) { $mb_id=current_mb_id(); if (!db_load_member_emails($DBConn,$mb_id)) header("Location: ./request.email.authenticate"); else goto_return_point($_SESSION['login_return_point']); if ($Config->EnableLog) { $LogDBConn->connect(false); db_insert_log($LogDBConn,'login',$mb_id,$_SERVER['HTTP_USER_AGENT']); } } else header("Location: ./login?error=af"); ?>