1<?php 2include('../Code/confHeader.inc'); 3$_SESSION[Me] -> goIfInvalid("../index.php"); 4$_SESSION[Me] -> goIfNotChair('../index.php'); 5$Conf -> connect(); 6include('Code.inc'); 7?> 8 9<html> 10 11<?php $Conf->header("Indicate Paper Conflicts With PC Members ") ?> 12 13<body> 14<?php 15// 16// Process actions from this form.. 17// 18if (IsSet($_REQUEST[assignConflicts])) { 19 if (!IsSet($_REQUEST[reviewer])) { 20 $Conf->errorMsg("You need to select a reviewer."); 21 } else { 22 if (IsSet($_REQUEST[Conflict])) { 23 for($i=0; $i < sizeof($_REQUEST[Conflict]); $i++) { 24 $paperId=$_REQUEST[Conflict][$i]; 25 // 26 // Delete any existing.. 27 // 28 $query="DELETE FROM PaperConflict WHERE paperId='$paperId' " 29 . " AND authorId='$_REQUEST[reviewer]'"; 30 $Conf->qe($query); 31 32 $query="INSERT INTO PaperConflict SET paperId='$paperId', " 33 . " authorId='$_REQUEST[reviewer]'"; 34 $Conf -> qe($query); 35 $Conf->log("Added reviewer conflict for $_REQUEST[reviewer] for paper $paper", $_SESSION[Me]); 36 } 37 } 38 } 39} 40 41if (IsSet($_REQUEST[removeConflict])) { 42 removePCConflictPapers($_REQUEST[ExistingConflicts]); 43} 44 45$Conf->infoMsg("This is the existing list of conflicts. " 46 . " If you want to remove a conflict, check the box " 47 . " and click the 'remove conflicts' button"); 48 49showPCConflictPapers(); 50 51print "<br> <br>\n"; 52 53print "<center>"; 54$Conf->textButtonPopup("Click here to search for conflicts based on author names", 55 "FindPCConflicts.php"); 56print "<br>\n"; 57 58$Conf->toggleButtonUpdate('OnlySeeConflicts'); 59print $Conf->toggleButton('OnlySeeConflicts', 60 "Click to see paper list (for adding conflicts)", 61 "Click to only see conflicts (for printing)"); 62 63print "</center>"; 64 65print "<br> <br>\n"; 66 67 68if ( ! $_REQUEST[OnlySeeConflicts] ) { 69$Conf->infoMsg("You can use this interface to indicate further conflicts"); 70 71?> 72 73<FORM METHOD="POST" ACTION="<?php echo $_SERVER[PHP_SELF] ?>"> 74 75<?php $Conf->makePCSelector('reviewer', $_REQUEST[reviewer]); ?> 76 77<br> 78 <INPUT TYPE="SUBMIT" name="assignConflicts" value="Indicate conflict for the selected papers"> 79 80 <table border="1" width="100%" cellpadding=0 cellspacing=0> 81 82 <thead> 83 <tr> 84 <th colspan=1 width=15% valign="center" align="center"> Paper </th> 85 <th colspan=3 width=80% valign="center" align="center"> Title & Conflicts </th> 86 </tr> 87<?php 88 89$result=$Conf->qe("SELECT Paper.paperId, Paper.title " 90 . " FROM Paper ORDER BY paperId"); 91if (DB::isError($result)) { 92 $Conf->errorMsg("Error in sql " . $result->getMessage()); 93 exit; 94} 95 while ($paperRow=$result->fetchRow(DB_FETCHMODE_ASSOC)) { 96 $paperId=$paperRow['paperId']; 97 // 98 // All other fields indexed by papers 99 // 100 $title=$paperRow['title']; 101?> 102 <tr> 103 <td> 104 <b> <?php echo $paperId ?> </b> 105 <INPUT TYPE=checkbox NAME=Conflict[] VALUE='<?php echo $paperId?>'> 106 </td> 107 108 <td> <?php 109 110 $Conf->linkWithPaperId($title, 111 "../Assistant/AssistantViewSinglePaper.php", 112 $_REQUEST[paperId]); 113 114 $query2="SELECT ContactInfo.email, PaperConflict.paperConflictId " 115 . " FROM ContactInfo, PaperConflict " 116 . " WHERE PaperConflict.paperId=$paperId AND PaperConflict.authorId=ContactInfo.contactId " 117 . " ORDER BY ContactInfo.email"; 118 $result2=$Conf -> q($query2); 119 if ( $result2 ) { 120 print "<br>"; 121 while ($row2=$result2->fetchRow()) { 122 print $row2[0]; 123 print "<br>"; 124 } 125 } 126 ?> </td> <tr> 127 <?php 128 } 129?> 130 </table> 131<INPUT TYPE="SUBMIT" name="assignConflicts" value="Indicate conflict for the selected papers"> 132</FORM> 133 <?php } ?> 134</body> 135<?php $Conf->footer() ?> 136</html> 137 138