} else { echo 'FAILED<br>'; } } if ($_POST["addReviewer2Paper"] == "true" && $pref == 1) { // add the current reviewer to all papers which are in his 1st preference $sql = " SELECT P.PaperID FROM " . $GLOBALS["DB_PREFIX"] . "Paper P," . $GLOBALS["DB_PREFIX"] . "PaperStatus PS WHERE P.PaperStatusID = PS.PaperStatusID AND Withdraw = 'false' AND P.TrackID = {$t_id}"; //echo "<pre>$sql</pre>"; $paperResult = $db->Execute($sql); if (!$paperResult) { echo "Could not retrieve the papers' information - please try again later"; exit; } while ($paperInfo = $paperResult->FetchNextObj()) { $paperID = $paperInfo->PaperID; $reviewers = get_Reviewers_Of_Paper($paperID); if (!is_array($reviewers)) { // up to now, no reviewers present for this paper assign_paper($paperID, array($Reviewer[$r_value])); } else { // add current reviewer $reviewers[] = $Reviewer[$r_value]; edit_Assigned_Reviewers($paperID, $reviewers); } } } } } ?>
if ($_POST["edit"] == "true") { $str = "Location: edit_assign_reviewers.php?paperID=" . $paperID; header($str); exit; } else { //The previous page was display assign papers $str = "Location: display_assign_paper.php?back=true&paperID=" . $paperID; header($str); exit; } } //Check whether previous page is edit or normal display if ($_POST["edit"] == "true") { //Previous page was edit //Get Reviewer of the papers $arrEditReviewers = get_Reviewers_Of_Paper($paperID); //Call the function to edit the reviewers $result = edit_Assigned_Reviewers($paperID, $arrReviewers); } else { //Previous page was not edit //Call the function to insert the information to database $result = assign_paper($paperID, $arrReviewers); } if ($result === true) { //Check whether previous page is edit or normal display if ($_POST["edit"] == "true") { do_html_header("Successful Assignment"); echo "<br><br>The following paper was successfully edited.<br><br>"; //Get the paper information $paperInfo = get_paper_info($paperID); echo "Paper #" . $paperInfo->PaperID . " - " . stripslashes($paperInfo->Title) . "<br><br>";
$loop = MAX_TAGS; } elseif ($showing / MAX_TAGS + 1 == $quotient) { $loop = $remainder; } else { $loop = MAX_TAGS; } //not showing last page for ($j = 0; $j < $loop; $j++) { // $t=getdate(); echo "Time 1 " . $t['seconds'] . "<br>"; //Debug BL //Get the information $paperInfo = $papersResult->FetchNextObj(); //Get the lastest file of the paper //$FileIDData = get_latestFile($paperInfo->PaperID , &$err_message ); $FileIDData = get_latestFileID($paperInfo->PaperID, &$err_message); //Get reviewer of the paper and format into string $arrReviewers = get_Reviewers_Of_Paper($paperInfo->PaperID); $strReviewers = ""; for ($i = 0; $i < count($arrReviewers); $i++) { if ($i == count($arrReviewers) - 1) { $strReviewers .= "<a href=\"#\" onClick=\"JavaScript:window.open('view_reviewer_info.php?name=" . $arrReviewers[$i] . "',null,'height=200,width=500,status=yes,toolbar=no,menubar=no,scrollbars=yes,location=no')\">" . getMemberFullName($arrReviewers[$i]) . "</a>"; } else { $strReviewers .= "<a href=\"#\" onClick=\"JavaScript:window.open('view_reviewer_info.php?name=" . $arrReviewers[$i] . "',null,'height=200,width=500,status=yes,toolbar=no,menubar=no,scrollbars=yes,location=no')\">" . getMemberFullName($arrReviewers[$i]) . "</a>, "; } } ?> <tr> <td colspan=4><hr> </td> </tr> <tr> <td align="center" valign="top"> </td>