' . oc_('Email address entered is invalid') . '
'; printFooter(); exit; } $q = "SELECT " . OCC_TABLE_AUTHOR . ".email FROM " . OCC_TABLE_PAPER . ", " . OCC_TABLE_AUTHOR . " WHERE " . OCC_TABLE_PAPER . ".paperid='".$_POST['pid']."' AND " . OCC_TABLE_AUTHOR . ".paperid=" . OCC_TABLE_PAPER . ".paperid AND " . OCC_TABLE_AUTHOR . ".position=" . OCC_TABLE_PAPER . ".contactid AND " . OCC_TABLE_AUTHOR . ".email='" . safeSQLstr(oc_strtolower($_POST['email'])) . "'"; $r = ocsql_query($q) or err(oc_('Error checking submission ID')); if (mysql_num_rows($r) != 1) { print '' . oc_("Submission ID or contact author's email invalid.") . ' ' . sprintf(oc_('Please contact the Chair.'), $OC_configAR['OC_pcemail'], 'Unable to Reset Password') . '
'; printFooter(); exit; } else { $newpwd = newPassword(); $q2 = "UPDATE " . OCC_TABLE_PAPER . " SET password='" . hashPassword($newpwd) . "' WHERE paperid='" . $_POST['pid'] . "'"; $r2 = ocsql_query($q2) or err(oc_('Unable to update password')); $msg = "\n" . sprintf(oc_('Per your request, we have issued you a new password for accessing the %s OpenConf system. The new password is:'), $OC_configAR['OC_confName']) . "\n " . $newpwd . "\n\n" . oc_('You may change this password by signing in to the OpenConf system and editing your submission.'); sendEmail($_POST['email'], oc_('Author Password Reset'), $msg, $OC_configAR['OC_notifyAuthorReset']); print oc_('We have emailed you a new password.'); printFooter(); exit; } } else { print '' . oc_('Please enter your submission id and the contact author\'s email below') . "
\n"; } print '