\n"; } } print '

Conflicts have been unset.

'; print '

Return to Conflict Listings

'; printFooter(); exit; } elseif ($_POST['ocaction'] == 'update') { if (isset($_POST['alloworgconflict']) && ($_POST['alloworgconflict'] == 'no')) { updateConfigSetting('OC_allowOrgConflict', 0); $OC_configAR['OC_allowOrgConflict'] = 0; } else { updateConfigSetting('OC_allowOrgConflict', 1); $OC_configAR['OC_allowOrgConflict'] = 1; } if (isset($_POST['allowemailconflict']) && ($_POST['allowemailconflict'] == 'no')) { updateConfigSetting('OC_allowEmailConflict', 0); $OC_configAR['OC_allowEmailConflict'] = 0; } else { updateConfigSetting('OC_allowEmailConflict', 1); $OC_configAR['OC_allowEmailConflict'] = 1; } } } $pq = "SELECT `" . OCC_TABLE_CONFLICT . "`.`paperid`, `" . OCC_TABLE_CONFLICT . "`.`reviewerid`, CONCAT_WS(' ',`" . OCC_TABLE_REVIEWER . "`.`name_first`,`" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name`, `title` FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_REVIEWER . "`, `" . OCC_TABLE_CONFLICT . "` WHERE `" . OCC_TABLE_CONFLICT . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` AND `" . OCC_TABLE_CONFLICT . "`.`reviewerid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid`"; if (empty($_GET['s']) || ($_GET['s'] == "pid")) { $q = $pq . " ORDER BY `" . OCC_TABLE_CONFLICT . "`.`paperid`, `" . OCC_TABLE_CONFLICT . "`.`reviewerid`"; $sortid = "paper"; $pidsort="P-ID
" . $OC_sortImg; $psort='Submission'; $rsort='Reviewer'; $ridsort='R-ID'; } elseif ($_GET['s'] == "paper") { $q = $pq . " ORDER BY `" . OCC_TABLE_PAPER . "`.`title`, `" . OCC_TABLE_CONFLICT . "`.`reviewerid`"; $sortid = "paper"; $pidsort='P-ID'; $psort="Submission
" . $OC_sortImg; $rsort='Reviewer'; $ridsort='R-ID'; } elseif ($_GET['s'] == "rid") { $q = $pq . " ORDER BY `" . OCC_TABLE_CONFLICT . "`.`reviewerid`, `" . OCC_TABLE_CONFLICT . "`.`paperid`"; $sortid = "reviewer"; $pidsort='P-ID'; $psort='Submission'; $rsort='Reviewer'; $ridsort="R-ID
" . $OC_sortImg; } elseif ($_GET['s'] == "reviewer") { $q = $pq . " ORDER BY `" . OCC_TABLE_REVIEWER . "`.`name_last`, `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_CONFLICT . "`.`paperid`"; $sortid = "reviewer"; $pidsort='P-ID'; $psort='Submission'; $rsort="Reviewer
" . $OC_sortImg; $ridsort= 'R-ID'; } else { err("Unknown sort source"); } print '

Manually Set Conflicts: (set)

'; $r = ocsql_query($q) or err("Unable to get information ".ocsql_errno()); if (ocsql_num_rows($r) == 0) { print '

      No conflicts have been set.

'; } else { $s = substr($sortid, 0, 1); print '
'; $currid = -1; $row = 1; while ($l = ocsql_fetch_array($r)) { if ($sortid == "reviewer") { $ptags = ''; $rtags = ''; } else { $ptags = ''; $rtags = ''; } $blanktags = ''; if ($currid != $l[$sortid.'id']) { if ($currid != -1) { if ($row==1) { $row=2; } else { $row=1; } } $currid = $l[$sortid.'id']; } else { if ($sortid == "reviewer") { $rtags = $blanktags; } else { $ptags = $blanktags; } } print '' . $ptags . $rtags; print ''; print "\n"; } print '
' . $pidsort . '' . $psort . '' . $ridsort . '' . $rsort . 'UC
'.$l['paperid'].'' . safeHTMLstr($l['title']) . '' . $l['reviewerid'] . '' . safeHTMLstr($l['name']) . ''.$l['paperid'].'' . safeHTMLstr($l['title']) . ''.$l['reviewerid'].'' . safeHTMLstr($l['name']) . '  
'; if (empty($l['reviewerid'])) { print ' '; } else { print ''; } print '
'; } // Show auto-detected conflicts print '


Automatically Detected Conflicts:

         

'; if (($OC_configAR['OC_allowEmailConflict'] == 1) && ($OC_configAR['OC_allowOrgConflict'] == 1)) { print '

Auto-conflict detection is disabled; change settings above.

'; } else { $q = "SELECT `" . OCC_TABLE_AUTHOR . "`.`paperid`, `reviewerid`, `title`, CONCAT_WS(' ',`" . OCC_TABLE_REVIEWER . "`.`name_first`,`" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name` FROM `" . OCC_TABLE_AUTHOR . "`, `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_REVIEWER . "` WHERE " . "`" . OCC_TABLE_PAPER . "`.`paperid`=`" . OCC_TABLE_AUTHOR . "`.`paperid` AND ("; if ($GLOBALS['OC_configAR']['OC_allowEmailConflict'] == 0) { $q .= " (`" . OCC_TABLE_AUTHOR . "`.`email`=`" . OCC_TABLE_REVIEWER . "`.`email`)"; } if ($GLOBALS['OC_configAR']['OC_allowOrgConflict'] == 0) { if ($GLOBALS['OC_configAR']['OC_allowEmailConflict'] == 0) { $q .= " OR"; } $q .= " (`" . OCC_TABLE_AUTHOR . "`.`organization` <> '' AND `" . OCC_TABLE_AUTHOR . "`.`organization`=`" . OCC_TABLE_REVIEWER . "`.`organization`)"; } $q .= ") GROUP BY `paperid`, `reviewerid` ORDER BY `paperid`, `reviewerid`"; $r = ocsql_query($q) or err("Unable to get auto paper/reviewer conflicts ".ocsql_errno()); if (ocsql_num_rows($r) < 1) { print '

      No conflicts detected

'; } else { print ''; $row = 1; while ($l=ocsql_fetch_array($r)) { print ''; $row = $rowAR[$row]; } print '
SubmissionReviewer
' . $l['paperid'] . '. ' . safeHTMLstr($l['title']) . '' . $l['reviewerid'] .'. ' . safeHTMLstr($l['name']) . '

For a match to occur, the email address or organization name must be exactly the same.

'; } } // Check for addt'l (hook) conflict displays if (isset($OC_hooksAR['list_conflicts-display']) && !empty($OC_hooksAR['list_conflicts-display'])) { foreach ($OC_hooksAR['list_conflicts-display'] as $hook) { print '


'; require_once $hook; } } printFooter(); ?>