Submission edits are no longer available.
'; printFooter(); exit; } // Get topics $topq = "SELECT * FROM `" . OCC_TABLE_TOPIC . "`"; $topr = ocsql_query($topq) or err('unable to retrieve topics'); if (($tnum = mysql_num_rows($topr)) < 1) { warn('We are still waiting for the Program Chair to finalize the list of topics before opening up for submissions. Please check back later.'); } else { $half = ceil($tnum / 2); $topicAR = array(); while ($topl = mysql_fetch_assoc($topr)) { $topicAR[$topl['topicid']] = $topl['topicname']; } } // Get non-editable fields array $nonEditFieldsAR = preg_split("/[\s,]+/", $OC_configAR['OC_subNonEditFields'], -1, PREG_SPLIT_NO_EMPTY); // Is this a post? if (isset($_POST['submit'])) { // Check for paper ID & password if (! isset($_POST['pid']) || ! preg_match("/^\d+$/", $_POST['pid']) || (! $chair && (! isset($_POST['pwd']) || empty($_POST['pwd']))) ) { warn('Please go back and check the submission ID and password'); printFooter(); exit; } if ($chair) { // display back links print '
View This Submission | View All Submissions
'; } else { // check pwd $pq = "SELECT password FROM " . OCC_TABLE_PAPER . " WHERE paperid='".$_POST['pid']."'"; $pr = ocsql_query($pq) or err("Unable to retrieve submission ".mysql_errno()); if (mysql_num_rows($pr) != 1) { err("Unable to find submission id ".$_POST['pid']); } $pl = mysql_fetch_array($pr); if ((hashPassword($_POST['pwd'], $pl['password']) != $pl['password']) && (md5($_POST['pwd']) != $pl['password']) && (!OCC_CHAIR_PWD_TRUMPS || (hashPassword($_POST['pwd'], $OC_configAR['OC_chair_pwd']) != $OC_configAR['OC_chair_pwd'])) && (!defined('OCC_SUPERCHAIR_PASSWORD') || (hashPassword($_POST['pwd'], OCC_SUPERCHAIR_PASSWORD) != OCC_SUPERCHAIR_PASSWORD))) { warn('Password entered is not valid for submission id ' . safeHTMLstr($_POST['pid'])); printFooter(); exit; } } // Check whether we're submitting changes if ($_POST['submit'] == "Submit Changes") { if ($chair && !validToken('chair')) { warn('Invalid submission'); } $err = ''; // Check title if (($chair || $OC_statusAR['OC_submissions_open'] || !in_array('title', $nonEditFieldsAR)) && !preg_match("/\w+/",$_POST['title'])) { $err .= "Please go back and check the following:' . $err . '
The submission has been updated. Below is the information submitted.
' . safeHTMLstr($confirmmsg) . ''; if (! $chair) { print '
A copy has also been emailed to the contact author. If you notice any problems or do not receive the email within 24 hours, please contact the Program Chair.
'; sendEmail($contactemail, "Submission Update ID " . $_POST['pid'], $confirmmsg, $OC_configAR['OC_notifyAuthorEdit']); } } // else no $err printFooter(); exit; } // if Submit Changes // Check whether we're retrieving a submission and if so, display filled out form elseif ($_POST['submit'] == "Edit Submission") { // get paper info $eq = "SELECT * FROM " . OCC_TABLE_PAPER . " WHERE paperid='".$_POST['pid']."'"; $er = ocsql_query($eq) or err("Unable to retrieve submission info - ".mysql_errno()); $el = mysql_fetch_array($er) or err("Unable to retrieve submission data - ".mysql_errno()); // get paper authors $aq = "SELECT * FROM " . OCC_TABLE_AUTHOR . " WHERE paperid='".$_POST['pid']."'"; $ar = ocsql_query($aq) or err("Unable to retrieve author info - ".mysql_errno()); while ($al = mysql_fetch_array($ar)) { $authorar[$al['position']]['name_last'] = $al['name_last']; $authorar[$al['position']]['name_first'] = $al['name_first']; $authorar[$al['position']]['organization'] = $al['organization']; $authorar[$al['position']]['country'] = $al['country']; $authorar[$al['position']]['email'] = $al['email']; } // get paper topics $ptq = "SELECT * FROM `" . OCC_TABLE_PAPERTOPIC . "` WHERE paperid='" . $_POST['pid'] . "'"; $ptr = ocsql_query($ptq) or err("Unable to retrieve topic info - " . mysql_errno()); $papertopicar = array(); while ($ptl = mysql_fetch_array($ptr)) { $papertopicar[] = $ptl['topicid']; } print ' '; printFooter(); exit; } // elseif Edit Submission } // if Submission // display login form by default print ''; printFooter(); exit; ?>