' . oc_('Committee sign-in is closed') . '

'; printFooter(); exit; } if (oc_hookSet('committee-signin')) { foreach ($GLOBALS['OC_hooksAR']['committee-signin'] as $hook) { require_once $hook; } } session_regenerate_id(); // prevent login session fixation $vformar[1] = "lkalskjo24uakd"; $vformar[2] = "lkiqwje0913284"; $vformar[3] = "loj0923489wefs"; $errmsg = ""; if (isset($_POST['ocaction']) && ($_POST['ocaction'] == "Sign In")) { // Check for bad uname or pwd if (!preg_match("/^[\p{L}\p{Nd}_\.\-\@]{5,50}$/u",$_POST['uname']) || empty($_POST['upwd'])) { //T: Use care with href - "mailto" and "subject" should not be translated $errmsg = '' . sprintf(oc_('Username and/or password not valid. Please try again. If you continue to have a problem signing in, please contact the Chair.'), $OC_configAR['OC_pcemail']) . '

'; } else { $lowusername = oc_strtolower(trim($_POST['uname'])); $q = "SELECT `reviewerid`, `name_last`, `name_first`, `password`, `onprogramcommittee` FROM `" . OCC_TABLE_REVIEWER . "` WHERE `username`='" . safeSQLstr($lowusername) . "'"; $r = ocsql_query($q) or err("Unable to query database"); // Check for multiple matching usernames if (($rnum=ocsql_num_rows($r)) > 1) { printHeader(safeHTMLstr(oc_('Sign In'))); err("Multiple usernames"); } // Check for unknown username if ($rnum == 0) { //T: Use care with href - "mailto" and "subject" should not be translated $errmsg = '' . sprintf(oc_('Incorrect username or password. Please try again. If you continue to have a problem signing in, please contact the Chair.'), $OC_configAR['OC_pcemail']) . '

'; } else { $p = ocsql_fetch_array($r); // Check that sign-in is still open for user if (!$OC_statusAR['OC_rev_signin_open']) { if ($p['onprogramcommittee'] == "F") { signInClosed(); } elseif (!$OC_statusAR['OC_pc_signin_open']) { signInClosed(); } } // Check for bad pwd if (!oc_password_verify($_POST['upwd'], $p['password'], 'committee', $p['reviewerid'])) { $errmsg = ' ' . sprintf(oc_('Incorrect username or password. Please try again below or click here to reset your password.'), 'reset.php') . '

'; } else { // We have a winner! oc_committeeSignIn($p, $lowusername); } } } // Weak attempt at catching multiple failed logins if ($_POST['validform'] == $vformar[1]) { $vform = $vformar[2]; } else { $vform = $vformar[3]; if ($_POST['validform'] == $vformar[3]) { $errmsg .= ' ' . oc_('If you click the "forgot" links, we will be glad to help you out.') . '

'; } } } else { $vform = $vformar[1]; } printHeader(oc_('Sign In'),3); if (!empty($errmsg)) { print $errmsg; } elseif (isset($_GET['e']) && ($_GET['e'] == "exp")) { print '

' . safeHTMLstr(oc_('Your session has timed out or you did not sign in properly. Please sign in again.')) . '

'; if (isset($_SESSION[OCC_SESSION_VAR_NAME]['POST']['submit'])) { print '

' . safeHTMLstr(oc_('It appears you were filling out a review form -- by signing back in right now with the same username, you will have the option to save the review.')) . '

'; } } print '
( ' . oc_('forgot username?') . ' )
( ' . safeHTMLstr(oc_('forgot password?')) . ' )



'; if ($OC_configAR['OC_ReviewerTimeout'] > 0) { print '

' . safeHTMLstr(sprintf(oc_('Note: Session times out after %d minutes of inactivity'), $OC_configAR['OC_ReviewerTimeout'])) . '

'; } printFooter(); ?>