goIfInvalid("../index.php"); $Me -> goIfNotAuthor("../index.php"); $Conf -> goIfInvalidActivity("updatePaperSubmission", "../index.php"); $Conf -> connect(); ?> header("Upload New Content For Paper #$paperId") ?> errorMsg("No paper was selected for uploading?" ); exit; } if ( ! $Me -> amPaperAuthor($paperId, $Conf) ) { $Conf -> errorMsg("Only the submitting paper author can modify the " . "paper information."); exit; } $query = "SELECT Paper.title, Paper.abstract, Paper.authorInformation, " . " Paper.withdrawn, Paper.acknowledged " . " FROM Paper WHERE " . " Paper.contactId='$Me->contactId' " . " AND Paper.paperId=$paperId " // . " AND PaperStorage.paperId=$paperId" ; $result = $Conf->qe($query); if ( DB::isError($result) ) { $Conf->errorMsg("SQL error - " . $result->getMessage()); exit(); } if ($result -> numRows() != 1) { $Conf->errorMsg("There appears to be a problem retrieving your paper information."); } $row = $result->fetchRow(DB_FETCHMODE_ASSOC); $title = $Conf->safeHtml($row['title']); $abstract = $Conf->safeHtml($row['abstract']); $authorInfo = $Conf->safeHtml($row['authorInformation']); $withdrawn = $row['withdrawn']; $finalized = $row['acknowledged']; if ($withdrawn) { $Conf->infoMsg("This paper has been WITHDRAWN " . " -- you can't do anything here"); // exit; } if ($finalized) { $Conf->infoMsg("This paper has been FINALIZED " . " -- you can't do anything here"); exit; } // // Now check for a paper in paper storage - we do // this w/o a join for robustness in case somehow the paper // went away. // $result = $Conf->qe("SELECT mimetype from PaperStorage " . " WHERE paperId='$paperId'"); if ( DB::isError($result) ) { $Conf->errorMsg("SQL error - " . $result->getMessage()); exit(); } if ($result -> numRows() != 1) { $mimetype="application/txt"; $Conf->errorMsg("There appears to be a problem retrieving some of " . "the information about your paper, but you should " . "be able to upload a new copy anyway. "); } else { $row = $result->fetchRow(DB_FETCHMODE_ASSOC); $mimetype = $row['mimetype']; } // // Now actually replace the paper // if (IsSet($submit)) { if ( ! IsSet($uploadedFile) || $uploadedFile == "none" ) { $Conf->errorMsg("Did NOT change the paper itself"); } else { $fn = fopen($uploadedFile, "r"); if ( ! $fn ) { $Conf->errorMsg("There was an error opening the file to store your paper." . "Please press BACK and try again."); } else { $result = $Conf -> storePaper($uploadedFile, $uploadedFile_type, $paperId); if ($result == 0 || DB::isError($result)) { $Conf->errorMsg("There was an error when trying to update your paper. " . " Please try again."); if ( DB::isError($result) ) { $Conf->errorMsg("msg is " . $result->getMessage()); } } else { $Conf->infoMsg("Looks like paper #$paperId was updated, but " . "you may want to confirm this by downloading " . "your paper "); $Conf->log("Replace paper $paperId", $Me); } } } } print "
"; $Conf->textButton("Click here to go to the paper list", "../Author/PaperActions.php"); print "
"; ?>
Paper #
Title:
Author Information:
Abstract:
Indicated Topics listTopicsForPaper($paperId) ?>


infoMsg("If you wish to upload a new version of your paper, " . " enter the file name here and click 'Update Paper Contents'. "); ?>
Location of PDF or PostScript File
>
footer() ?>