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("Error checking submission id ".mysql_errno()); if (mysql_num_rows($r) != 1) { print '
We were unable to match the submission id to the contact author\'s email. Please contact the Program Chair.
'; printFooter(); exit; } else { $newpwd = newPassword(); $q2 = "UPDATE " . OCC_TABLE_PAPER . " SET password='" . hashPassword($newpwd) . "' WHERE paperid='" . $_POST['pid'] . "'"; $r2 = ocsql_query($q2) or err("unable to update password"); $msg = ' Per your request, we have issued you a new password for accessing the ' . $OC_configAR['OC_confName'] . ' OpenConf system. The new password is: ' . $newpwd . ' You may change this password by signing in to the OpenConf system and editing your submission. '; sendEmail($_POST['email'], "Author Password Reset", $msg, $OC_configAR['OC_notifyAuthorReset']); print 'We have emailed you a new password.

'; printFooter(); exit; } } else { print "

Please enter your submission id and the contact author's email below

\n"; } print '

Submission ID:
Email:

'; printFooter(); ?>