\n"; }
}
print "
Advocate(s) have been unassigned.
\n";
if (isset($_POST['s'])) {
print 'Return to Advocate Listings
';
}
printFooter();
exit;
}
if (!isset($_GET['s']) || ($_GET['s'] == "pid")) {
$sortby = "paperid";
$pidsort="P-ID
" . $OC_sortImg;
$psort='Submission';
$nsort='Advocate';
$aidsort='A-ID';
} elseif ($_GET['s'] == "paper") {
$sortby = "title";
$pidsort='P-ID';
$psort="Submission
" . $OC_sortImg;
$nsort='Advocate';
$aidsort='A-ID';
} elseif ($_GET['s'] == "name") {
$sortby = "name_last, name_first";
$pidsort='P-ID';
$psort='Submission';
$nsort="Advocate
" . $OC_sortImg;
$aidsort='A-ID';
} elseif ($_GET['s'] == "aid") {
$sortby = "advocateid";
$pidsort='P-ID';
$psort='Submission';
$nsort='Advocate';
$aidsort="A-ID
" . $OC_sortImg;
} else {
err("Unknown sort source");
}
$q = "SELECT " . OCC_TABLE_PAPER . ".paperid, " . OCC_TABLE_PAPERADVOCATE . ".advocateid, adv_recommendation, CONCAT_WS(' '," . OCC_TABLE_REVIEWER . ".name_first," . OCC_TABLE_REVIEWER . ".name_last) AS name, title FROM " . OCC_TABLE_PAPER . " LEFT JOIN " . OCC_TABLE_PAPERADVOCATE . " ON " . OCC_TABLE_PAPER . ".paperid=" . OCC_TABLE_PAPERADVOCATE . ".paperid LEFT JOIN " . OCC_TABLE_REVIEWER . " ON " . OCC_TABLE_PAPERADVOCATE . ".advocateid=" . OCC_TABLE_REVIEWER . ".reviewerid ORDER BY ".$sortby;
$r = ocsql_query($q) or err("$qUnable to get information ".mysql_errno());
if (mysql_num_rows($r) == 0) {
print 'No advocate assignments have been made yet.
';
} else {
print '
- Links:
- Recom. – Show recommendation
- Submission – Show Submission info
- Advocate – Show Advocate info
';
}
printFooter();
?>