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("Remove People from Your Requested Review Paper list") ?>
11
12<body>
13<?php
14if (IsSet($_REQUEST[removePaperId]) && IsSet($_REQUEST[removeReview])) {
15  $query= "DELETE FROM ReviewRequest WHERE "
16    . "requestedBy=" . $_SESSION[Me]->contactId. " AND reviewRequestId=$_REQUEST[removeReview] "
17    . " AND paperId='$_REQUEST[removePaperId]'";
18
19  $result = $Conf->qe($query);
20
21  if ( !DB::isError($result) ) {
22    $Conf->log("Remove review request #$_REQUEST[removeReview] for $_REQUEST[removePaperId]", $_SESSION[Me]);
23  } else {
24    $Conf->errorMsg("There was an error removing the reviewers: " . $result->getMessage());
25  }
26
27  //
28  // Remove any unfinished reviews
29  //
30  $query="DELETE FROM PaperReview "
31    . " WHERE paperId=$_REQUEST[removePaperId] "
32    . " AND reviewer=$_REQUEST[removeReviewer] "
33    . " AND finalized=0 ";
34  $Conf->qe($query);
35}
36?>
37
38<p>
39Click on the email of the person you want to remove from reviewing
40a specific paper.
41</p>
42
43<?php
44
45$Conf->warnMsg("<b> There is no confirmation step! </b>
46Once you remove someone from reviewing a specific paper, any reviews they've
47already submitted for that paper will remain in the database;
48however, they will not be able to submit a review if they haven't already started the review.");
49
50
51$result=$Conf->qe("SELECT Paper.paperId, Paper.Title, "
52		  . " ContactInfo.email, ContactInfo.contactId, "
53		  . " ReviewRequest.reviewRequestId "
54		  . "FROM Paper, ContactInfo, ReviewRequest "
55		  . "WHERE (ReviewRequest.paperId=Paper.paperId "
56		  . "  AND ReviewRequest.asked=ContactInfo.contactId "
57		  . "  AND ReviewRequest.requestedBy=" . $_SESSION[Me]->contactId . ") "
58		  . " ORDER BY Paper.paperId ");
59
60if (DB::isError($result)) {
61  $Conf->errorMsg("Error in retrieving list of reviews: " . $result->getMessage());
62} else {
63  ?>
64 <table border=1>
65    <tr> <th width=5%> Paper # </th>
66    <th width=15%> Asked </th>
67    <th> Title </th>
68    </tr>
69    <?php
70    while ($row=$result->fetchRow()) {
71      $email = $row[2];
72      $rev = $row[3];
73      $reqId = $row[4];
74      print "<tr> <td> $row[0] </td>";
75      print "<td> <a href=\"$_SERVER[PHP_SELF]?removePaperId=$row[0]&removeReviewer=$rev&removeReview=$reqId\"> Reviewer $email </a> </td>";
76      print "<td> $row[1] </td>";
77      print "</tr>\n";
78    }
79 ?>
80    </table>
81	<?php
82	}
83?>
84
85</body>
86<?php  $Conf->footer() ?>
87</html>
88
89
90
91
92