1<?php 2include('../Code/confHeader.inc'); 3$_SESSION[Me] -> goIfInvalid($Conf->paperSite); 4$_SESSION[Me] -> goIfNotPC($Conf->paperSite); 5$Conf -> connect(); 6 7function Check($var) 8{ 9 if ($var) { 10 print "<img src=\"../images/CheckMark.gif\">"; 11 } else { 12 print " "; 13 } 14} 15 16function Num($var) 17{ 18 if ($var) { 19 print $var; 20 } else { 21 print " "; 22 } 23} 24 25function countPapers($array, $table, $where) 26{ 27 global ${$array}; 28 global $Conf; 29 30 $query = "SELECT $table.paperId, COUNT(*) " 31 . " FROM $table " 32 . $where 33 . " GROUP BY $table.paperId "; 34 35 $result=$Conf->qe($query); 36 if (DB::isError($result)) { 37 $Conf->errorMsg("Error in retrieving $table count " . $result->getMessage()); 38 } else { 39 while ($row = $result->fetchRow()) { 40 $id=$row[0]; 41 ${$array}[$id] = $row[1]; 42 } 43 } 44} 45 46?> 47 48<html> 49 50<?php $Conf->header("See Reviews for All Papers") ?> 51 52<body> 53<?php 54$Conf->infoMsg("If you have the word 'CONFLICT' next to a paper, " 55 . " the program chairs have registered a conflict of " 56 . " interest with you seeing those reviews. If you think " 57 . " this is an error, please contact the program chairs."); 58// 59// Process actions from this form.. 60// 61// 62// Make an array of all the valid paper indicies. 63// 64 65 66 $allPapers=array(); 67 $allPaperTitles=array(); 68 $allPrimary=array(); 69 $allSecondary=array(); 70 $allReviewRequest=array(); 71 $allStartedReviews=array(); 72 $allFinishedReviews=array(); 73 74 75 $result=$Conf->qe("SELECT Paper.paperId, Paper.title, " 76 . " Paper.acknowledged, Paper.withdrawn " 77 . " FROM Paper ORDER BY paperId"); 78 $i = 0; 79 if (DB::isError($result)) { 80 $Conf->errorMsg("Error in retrieving paper list " . $result->getMessage()); 81 } else { 82 while ($row = $result->fetchRow()) { 83 $f = 0; 84 $id = $row[$f++]; 85 $allPapers[$i] = $id; 86 $allPaperTitles[$id] = $Conf->safeHtml($row[$f++]); 87 $allSubmitted[$id] = $row[$f++]; 88 $allWithdrawn[$id] = $row[$f++]; 89 $i++; 90 } 91 } 92 $countpapersforreview = $i; 93 countPapers("allPrimary", "PrimaryReviewer", ""); 94 countPapers("allSecondary", "SecondaryReviewer", ""); 95 countPapers("allReviewRequest", "ReviewRequest", ""); 96 countPapers("allStartedReviews", "PaperReview", "WHERE (PaperReview.finalized!=0)"); 97 countPapers("allFinishedReviews", "PaperReview", "WHERE (PaperReview.finalized=0)"); 98 99 $allConflicts = $Conf->allMyConflicts($_SESSION[Me]->contactId); 100 $pcConflicts = $Conf->allPCConflicts(); 101 102 // 103 // Determine the number of completed and started reviews for all papers 104 // 105 ?> 106 107Found <?php echo $countpapersforreview ?> papers. 108 109 <table border="1" width="100%" cellpadding=0 cellspacing=0> 110 111 <thead> 112 <tr> 113 <th colspan=1 width=5% valign="center" align="center"> Paper #</th> 114 <th colspan=1 width=60% valign="center" align="center"> Title </th> 115 <th colspan=1 width=10% valign="center" align="center"> Reviews </th> 116 </tr> 117<?php 118 for($i = 0; $i < sizeof($allPapers); $i++) { 119 $paperId=$allPapers[$i]; 120 // 121 // All other fields indexed by papers 122 // 123 $title=$allPaperTitles[$paperId]; 124 $primary=$allPrimary[$paperId]; 125 $secondary=$allSecondary[$paperId]; 126 127 // Check to see if there is a conflict 128 $conflict = 0; 129 if ( $allConflicts[$paperId] ) { 130 $conflict = 1; 131 } 132 133 print "<tr>\n"; 134 if ( $conflict ) { 135 print "<td> $paperId </td>"; 136 print "<td> $title </td> "; 137 print "<td> <b> CONFLICT </b> </td>\n"; 138 } else { 139 if ( $Conf->validTimeFor('AtTheMeeting', 0) 140 && $pcConflicts[$paperId] 141 && ( $_SESSION[Me] -> isPC && ! $_SESSION[Me] -> isChair ) ) { 142 // 143 // Don't show anything 144 // 145 } else { 146 print "<td> $paperId </td>\n"; 147 print "<td> "; 148 149 $Conf->linkWithPaperId($title, 150 "PCAllAnonReviewsForPaper.php", 151 $id); 152 153 print "</td>\n"; 154 155 print "<td> <b>"; 156 157 $Conf->linkWithPaperId("See Reviews", 158 "PCAllAnonReviewsForPaper.php", 159 $id); 160 161 print "</td>"; 162 } 163 } 164 print "</tr>\n"; 165 } 166 ?> 167 </table> 168 169</body> 170<?php $Conf->footer() ?> 171</html> 172 173