\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("$q

Unable 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

'; $row = 1; while ($l = mysql_fetch_array($r)) { print ''; if (empty($l['adv_recommendation'])) { print ""; } else { print ''; } print ''; if (empty($l['advocateid'])) { print ""; } else { print ''; print ''; } print ""; if ($row==1) { $row=2; } else { $row=1; } } print '
   

Check to also unassign review

Recom.'.$pidsort.''.$psort.''.$aidsort.''.$nsort.'UAA
 ' . $l['adv_recommendation'] . '' . $l['paperid'] . '' . safeHTMLstr($l['title']) . '   ' . $l['advocateid'] . '' . safeHTMLstr($l['name']) . '
Check to also unassign review

   

'; } printFooter(); ?>