List All Submissions by Score
';
$pid = $_REQUEST['pid'];
if (!preg_match("/^\d+$/",$pid)) {
warn("Invalid Submission ID");
}
if (isset($_POST['submit']) && !empty($_POST['submit'])) {
// Check for valid submission
if (!validToken('chair')) {
warn('Invalid submission');
}
if ($_POST['submit'] == "Pending") {
$q = "UPDATE `" . OCC_TABLE_PAPER . "` SET `accepted`=NULL WHERE `paperid`='" . $pid . "'";
ocsql_query($q) or err("Unable to set submission acceptance");
} elseif (isset($OC_acceptanceColorAR[$_POST['submit']])) {
$q = "UPDATE `" . OCC_TABLE_PAPER . "` SET `accepted`='" . safeSQLstr($_POST['submit']) . "' WHERE `paperid`='" . $pid . "'";
ocsql_query($q) or err("Unable to set submission acceptance");
} elseif ($_POST['submit'] == "Submit Notes") {
$q = "UPDATE `" . OCC_TABLE_PAPER . "` SET `pcnotes`='" . safeSQLstr($_POST['pcnotes']) . "' WHERE `paperid`='" . $pid . "'";
ocsql_query($q) or err("Unable to update notes");
}
}
$q2 = "SELECT CONCAT_WS(' ',`" . OCC_TABLE_REVIEWER . "`.`name_first`,`" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name`, `advocateid`, `adv_recommendation`, `adv_comments` FROM `" . OCC_TABLE_PAPERADVOCATE . "`, `" . OCC_TABLE_REVIEWER . "` WHERE `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`='" . $pid . "' AND `" . OCC_TABLE_PAPERADVOCATE . "`.`advocateid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid`";
$r2 = ocsql_query($q2) or err("Unable to get recommendation");
if (mysql_num_rows($r2) == 0) {
$l2['adv_recommendation'] = 'No advocate was assigned to this submission';
$l2['advocateid'] = NULL;
$l2['name'] = NULL;
$advcmts = 'N/A';
} else {
$l2=mysql_fetch_array($r2);
if (empty($l2['adv_recommendation'])) {
$l2['adv_recommendation'] = 'Not yet provided';
$advcmts = 'N/A';
} else {
$advcmts = safeHTMLstr($l2['adv_comments']);
$advcmts = preg_replace("/\n/","
\n",$advcmts);
}
}
$q3 = "SELECT `accepted`, `format`, `title`, `pcnotes` FROM `" . OCC_TABLE_PAPER . "` WHERE `paperid`='" . $pid . "'";
$r3 = ocsql_query($q3) or err("Unable to get submission info");
if (mysql_num_rows($r3) != 1) { err("Unable to retrieve submission info"); }
else {
$l3 = mysql_fetch_array($r3);
$q = "SELECT `" . OCC_TABLE_PAPERREVIEWER . "`.*, CONCAT_WS(' ',`" . OCC_TABLE_REVIEWER . "`.`name_first`,`" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name` FROM `" . OCC_TABLE_PAPERREVIEWER . "`, `" . OCC_TABLE_REVIEWER . "` WHERE `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`='" . $pid . "' AND `" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid` ORDER BY `recommendation`, `reviewerid`";
$r = ocsql_query($q) or err("Unable to get scores");
print '
Submission ID: ' . $pid . '
Title: ' . safeHTMLstr($l3['title']) . '
';
if ($OC_configAR['OC_paperAdvocates']) {
print '
- Advocate: '. $l2['advocateid'] . ' - ' . safeHTMLstr($l2['name']) . '
- Recommendation: ' . $l2['adv_recommendation'] . '
- Comments:
- '.$advcmts.'
';
}
require_once OCC_REVIEW_INC_FILE;
displayReviews($pid,$r);
// Additional data?
if (oc_hookSet('show_scores-bottom')) {
foreach ($OC_hooksAR['show_scores-bottom'] as $h) {
require_once $h;
}
}
} // else show paper info
printFooter();
?>