' . safeHTMLstr($subinfo['title']) . '
' . oc_('Submission ID') . ': ' . $pid; if (isset($subinfo['type']) && !empty($subinfo['type'])) { print '
(' . safeHTMLstr($subinfo['type']) . ')
'; } print '
'; if (oc_hookSet('committee-advocate-fields')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-fields'] as $v) { require_once $v; } } oc_displayFieldSet($GLOBALS['OC_advocateQuestionsFieldsetAR'], $GLOBALS['OC_advocateQuestionsAR'], $recommendation); if (oc_hookSet('committee-advocate-extra')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-extra'] as $v) { require_once $v; } } print '
'; // Display Reviews print '

Reviews

'; if ($emailList = getPaperReviewersEmail($pid)) { // email reviewers link print '

(' . oc_('Email Reviewers') . ')

'; } $q = "SELECT `" . OCC_TABLE_PAPERREVIEWER . "`.*, CONCAT_WS(' ', `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_REVIEWER . "`.`name_last`) as `name`, `" . OCC_TABLE_REVIEWER . "`.`email` FROM `" . OCC_TABLE_PAPERREVIEWER . "`, `" . OCC_TABLE_REVIEWER . "` WHERE `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`='" . safeSQLstr($pid) . "' AND `" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid` ORDER BY `score`, `reviewerid`"; $r = ocsql_query($q) or err("Unable to get information"); if (ocsql_num_rows($r)==0) { print '

' . oc_('No reviews found') . ' (2)

'; } else { displayReviews($pid, $r, $subinfo['type']); } } // submission? if (isset($_POST['ocaction']) && ($_POST['ocaction'] == "Submit Recommendation")) { // Check for valid submission if (!validToken('ac')) { $w = sprintf(oc_('This submission failed our security check, possibly due to you have signed in again, or a third-party having redirected you here. Below is the information provided. If you were attempting to submit a review, print this information out or copy/paste it to a new document so it can be re-entered; then try again. If the problem persists, please contact the Chair.'), ($_SERVER['PHP_SELF'] . '?pid=' . (is_numeric($_POST['pid']) ? $_POST['pid'] : ''))) . '
'; $OC_advocateQuestionsARkeys = array_keys($OC_advocateQuestionsAR); foreach ($_POST as $k => $v) { if (($k == 'submit') || ($k == 'token')) { continue; } if (in_array($k, $OC_advocateQuestionsARkeys)) { $w .= "
\n

\n" . safeHTMLstr($OC_advocateQuestionsAR[$k]['short']) . " "; if ($OC_advocateQuestionsAR[$k]['usekey']) { $w .= $OC_advocateQuestionsAR[$k]['values'][$v]; } else { $w .= safeHTMLstr($v); } } else { $w .= "
\n

\n" . safeHTMLstr($k) . ": " . safeHTMLstr($v); } } $w .= '
'; warn($w); } // Validate fields $qfields = array(); $err = ''; foreach ($GLOBALS['OC_advocateQuestionsFieldsetAR'] as $fsid => $fs) { foreach ($fs['fields'] as $fid) { oc_validateField($fid, $GLOBALS['OC_advocateQuestionsAR'], $qfields, $err); } } // Hooks if (oc_hookSet('committee-advocate-validate')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-validate'] as $v) { require_once $v; } } // Error? if (!empty($err)) { print '
' . oc_('Please check the following:') . '

'; printAdvocateForm($_POST, $pid, $subinfo); return; } // Compose sql and update $q = "UPDATE `" . OCC_TABLE_PAPERADVOCATE . "` SET "; foreach ($qfields as $qid => $qval) { $q .= "`" . $qid . "`=" . $qval . ","; } $q = rtrim($q, ','); $q .= " WHERE `paperid`='" . safeSQLstr($pid) . "' AND `advocateid`='" . safeSQLstr($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']) . "'"; ocsql_query($q) or err("Unable to submit recommendation"); if (oc_hookSet('committee-advocate-save')) { foreach ($GLOBALS['OC_hooksAR']['committee-advocate-save'] as $v) { require_once $v; } } print '

' . oc_('Recommendation has been submitted.') . '

'; print '

» ' . oc_('Return to Recommendation') . '

'; //T: Member = Committee Member -- see "Member Home" string print '

» ' . sprintf('Return to Member home page', 'reviewer.php') . '

'; printFooter(); exit; } // Retrieve advocate recommendation $advq = "SELECT * FROM `" . OCC_TABLE_PAPERADVOCATE . "` WHERE `paperid`='" . safeSQLstr($pid) . "' AND `advocateid`='" . safeSQLstr($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']) . "'"; $advr = ocsql_query($advq) or err("Unable to get advocate info"); $recommendation = ocsql_fetch_array($advr); // Display form printAdvocateForm($recommendation, $pid, $subinfo); printFooter(); ?>