' . oc_('Submission withdraw is not available.') . '

'; printFooter(); exit; } // Is this a post? if (isset($_POST['ocaction']) && ($_POST['ocaction'] == 'Withdraw Submission')) { // Check for paper ID & password if (! isset($_POST['pid']) || ! preg_match("/^\d+$/", $_POST['pid']) || ! isset($_POST['pwd']) || empty($_POST['pwd']) ) { warn(oc_('Submission ID or password entered is incorrect')); printFooter(); exit; } $pq = "SELECT `" . OCC_TABLE_PAPER . "`.`title`, `" . OCC_TABLE_PAPER . "`.`password`, `" . OCC_TABLE_AUTHOR . "`.`email` FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_AUTHOR . "` WHERE `" . OCC_TABLE_PAPER . "`.`paperid`='" . safeSQLstr($_POST['pid']) . "' AND `" . OCC_TABLE_PAPER . "`.`paperid`=`" . OCC_TABLE_AUTHOR . "`.`paperid` AND `" . OCC_TABLE_PAPER . "`.`contactid`=`" . OCC_TABLE_AUTHOR . "`.`position`"; $pr = ocsql_query($pq) or err("Unable to retrieve submission ".ocsql_errno()); if (ocsql_num_rows($pr) != 1) { warn(oc_('Submission ID or password entered is incorrect')); printFooter(); exit; } $pl = ocsql_fetch_array($pr); if (!oc_password_verify($_POST['pwd'], $pl['password'])) { warn(oc_('Submission ID or password entered is incorrect')); printFooter(); exit; } // Withdraw submission if (withdrawPaper($_POST['pid'], OCC_WORD_AUTHOR)) { deletePaper($_POST['pid'], false); print '

' . oc_('Your submission has been withdrawn. If this is not what you intended to do, please contact the Chair.') . '

'; // Notify via email // ocIgnore included so poEdit picks up (DB) template translation //T: [:sid:] is the numeric submission ID $ocIgnoreSubject = oc_('Submission Withdraw - ID [:sid:]'); $ocIgnoreBody = oc_('The submission below has been withdrawn at the author\'s request. If you did not intend to withdraw the submission, please reply back. [:submission:]'); list($mailsubject, $mailbody) = oc_getTemplate('author-withdraw'); $templateExtraAR = array( 'sid' => $_POST['pid'], 'submission' => oc_('Submission ID') . ': ' . $_POST['pid'] . "\n" . oc_('Title') . ': ' . $pl['title'] ); $mailsubject = oc_replaceVariables($mailsubject, $templateExtraAR); $mailbody = oc_replaceVariables($mailbody, $templateExtraAR); sendEmail($pl['email'], $mailsubject, $mailbody, $OC_configAR['OC_notifyAuthorWithdraw']); } else { print '

' . oc_('We encountered a problem withdrawing your submission. Please contact the Chair.') . '

'; } printFooter(); exit; } // if submit // display sub id/password form print '
: ( ' . oc_('forgot ID?') . ' )
: ( ' . oc_('forgot password?') . ' )

'; if (oc_hookSet('author-withdraw-bottom')) { foreach ($GLOBALS['OC_hooksAR']['author-withdraw-bottom'] as $hook) { require_once $hook; } } printFooter(); exit; ?>