1<?php 2include('../Code/confHeader.inc'); 3$_SESSION[Me] -> goIfInvalid($Conf->paperSite); 4$_SESSION[Me] -> goIfNotPC($Conf->paperSite); 5$Conf -> connect(); 6?> 7 8<html> 9 10<?php $Conf->header("Check reviews of all papers you were assigned") ?> 11 12<body> 13<?php 14$result=$Conf->qe("SELECT Paper.paperId, Paper.title FROM Paper, PrimaryReviewer " 15. "WHERE PrimaryReviewer.reviewer='" . $_SESSION[Me]->contactId. "' AND Paper.paperId=PrimaryReviewer.paperId " 16 . "ORDER BY Paper.paperId"); 17 18if (DB::isError($result)) { 19 $Conf->errorMsg("Error in sql " . $result->getMessage()); 20 exit(); 21} 22 23$Conf->infoMsg("In order for you to see the other reviews for papers for which you are " 24 . " a primary reviewer, you need to finalize your review. The reason for " 25 . " this is that we want reviewers to formulate their <i> own </i> opinion " 26 . " and not be influenced by the opinions of others "); 27?> 28 29<table border=1> 30<tr bgcolor=<?php echo $Conf->contrastColorOne?>> 31<th colspan=3> Primary Papers </th> </tr> 32 33<tr> 34<th width=1%> Paper # </th> 35<th width=25%> Title </th> 36<th width=5%> Review </th> 37</tr> 38<?php 39 while ($row=$result->fetchRow()) { 40 $paperId = $row[0]; 41 $title = $row[1]; 42 print "<tr> <td> $paperId </td>"; 43 print "<td> $title </td> \n"; 44 45 $count = $Conf->retCount("SELECT Count(finalized) " 46 . " FROM PaperReview " 47 . " WHERE PaperReview.paperId='$paperId'" 48 . " AND PaperReview.finalized=1 " 49 ); 50 51 $done = $Conf->retCount("SELECT finalized " 52 . " FROM PaperReview " 53 . " WHERE PaperReview.paperId='$paperId' " 54 . " AND PaperReview.reviewer='" . $_SESSION[Me]->contactId. "'" 55 ); 56 57?> 58 <td> <b> 59<?php 60 if ($done) { 61 62 $Conf->linkWithPaperId("See the $count finalized reviews", 63 "PCAllAnonReviewsForPaper.php", 64 $paperId); 65 66 } else { 67 print "You haven't finished your review, so you can't see the other reviews"; 68 } 69 print "</b> </td>"; 70 print "<tr> \n"; 71 } 72?> 73</table> 74 75<p> </p> 76 77<?php 78$Conf->infoMsg("You can view any reviews for papers for which you're a secondary reviewer."); 79?> 80 81 82<table border=1> 83<tr bgcolor=<?php echo $Conf->contrastColorOne?>> 84<th colspan=3> Secondary Papers Papers </th> </tr> 85 86<tr> 87<th width=1%> Paper # </th> 88<th width=25%> Title </th> 89<th width=5%> Review </th> 90</tr> 91<?php 92 93$result=$Conf->qe("SELECT Paper.paperId, Paper.title " 94 . " FROM Paper, SecondaryReviewer " 95 . " WHERE SecondaryReviewer.reviewer='" . $_SESSION[Me]->contactId. "' " 96 . " AND Paper.paperId=SecondaryReviewer.paperId " 97 . " ORDER BY Paper.paperId"); 98 99if (DB::isError($result)) { 100 $Conf->errorMsg("Error in sql " . $result->getMessage()); 101 exit(); 102} 103 while ($row=$result->fetchRow()) { 104 $paperId = $row[0]; 105 $title = $row[1]; 106 print "<tr> <td> $paperId </td>"; 107 print "<td> $title </td> \n "; 108 109 $count = $Conf->retCount("SELECT Count(finalized) " 110 . " FROM PaperReview " 111 . " WHERE PaperReview.paperId='$paperId'" 112 . " AND PaperReview.finalized=1" 113 ); 114 115?> 116 <td> <b> 117 118 <?php 119 $Conf->linkWithPaperId("See the $count finalized reviews", 120 "PCAllAnonReviewsForPaper.php", 121 $paperId); 122 123 ?> 124 125 </b> </td> 126<?php 127 print "<tr> \n"; 128 129 } 130?> 131</table> 132 133</body> 134<?php $Conf->footer() ?> 135</html> 136 137