Ejemplo n.º 1
0
function reject($PaperID)
{
    // 		echo "rejecting $PaperID<br>"; return;
    remove_paper_presentation($PaperID);
    update_PaperStatus($PaperID, "Rejected");
}
$arrAttachmentInfo =& $_SESSION["arrAttachmentInfo"];
$arrContent =& $_SESSION["content"];
//get the conference info to get the contact mail
$conferenceInfo = get_conference_info();
//Get the paper information
$paperInfo = get_paper_info($_POST["paperID"]);
if (update_PaperStatus($arrPostInfo["paperID"], $arrPostInfo["status"])) {
    if ($_POST["status"] == "Accepted") {
        // Remove any previous record
        remove_paper_presentation($_POST["paperID"]);
        // Add to scheduling system as an unscheduled paper
        assign_paper_presentation_type($_POST["paperID"], $_POST["type"]);
        // If all is well, then it will get autoscheduled
        autoschedule_waiting_papers();
    } else {
        remove_paper_presentation($_POST["paperID"]);
    }
    //Now using pear SMTP mail instead of libmail
    //Send Email to user
    //~ $mail = new Mail();
    //~ $mail -> Organization($conferenceInfo -> ConferenceCodeName);
    //~ $mail -> ReplyTo($conferenceInfo -> ConferenceContact);
    //~ $mail -> From($conferenceInfo -> ConferenceContact);
    //~ $mail -> To($arrPostInfo["email"]);
    //~ $mail -> Subject($arrContent["subject"]);
    //~ $mail -> Body($arrContent["content"]);
    //~ if ($arrPostInfo["cc"] != "")
    //~ $mail -> Cc($arrPostInfo["cc"]);
    //~ if(!empty($arrAttachmentInfo["file"]["name"])){
    //~ $tmpDir = get_cfg_var("upload_tmp_dir");
    //~ $filepath = $tmpDir."/".$arrAttachmentInfo["file"]["name"];
            // assign paper to SessionTrack, too
            $url .= "&SessionTrackID=" . $_POST["SessionTrackID"];
        }
        header($url);
        exit;
    }
}
//Get the paper information
$paperInfo = get_paper_info($_POST["paperID"]);
if ($_POST["Submit"] == "Back") {
    $url = "Location: evaluate_paper_status.php?paperID=" . $_POST["paperID"];
    $url .= "&status=" . $_POST["status"];
    header($url);
    exit;
}
if ($_POST["Submit"] == "Confirm" && ($paperInfo->PaperStatusName == "Accepted" ? remove_paper_presentation($_POST["paperID"]) : true)) {
    //Update the paper status
    if (update_PaperStatus($_POST["paperID"], $_POST["status"])) {
        do_html_header("Successful Update");
        echo "<p>The following paper is set to <strong>" . $_POST["status"] . "</strong> status.<br><br>";
        echo "<strong>PaperID:</strong> #" . $_POST["paperID"] . "<br>";
        echo "<strong>Previous Status:</strong> " . $paperInfo->PaperStatusName . "<br>";
        echo "<strong>Now:</strong> " . $_POST["status"] . "<br><br>";
        $sort = $_SESSION["sort"];
        // retrieve current sort and showing setings
        $showing = $_SESSION["showing"];
        echo "<br>Go back to <a href='view_all_papers.php?sort=" . $sort . "&showing=" . $showing . "'>View All Papers</a> page.<br><br>";
        //echo "Go back to <a href=\"view_all_papers.php\">view all papers</a></p>";
        do_html_footer();
        exit;
    }