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 .= "
  • Enter a submission title
  • "; } // Check that we have a valid contact author & email if (!preg_match("/^[1-5]$/",$_POST['contact'])) { $err .= "
  • Contact author invalid
  • "; } else { $contactemail = $_POST['email'.$_POST['contact']]; if (!preg_match("/\w/",$_POST['name_last'.$_POST['contact']]) || !preg_match("/\w/",$_POST['name_first'.$_POST['contact']])) { $err .= "
  • Fill in both the first & last name of the contact author
  • "; } if (!validEmail($contactemail)) { $err .= "
  • Contact author email does not seem valid
  • "; } } // Check author countries for ($c=1; $c<=4; $c++) { if ((!isset($_POST['country'.$c]) || empty($_POST['country'.$c])) && isset($_POST['isocountry'.$c]) && !empty($_POST['isocountry'.$c])) { $isoUpper = oc_strtoupper($_POST['isocountry'.$c]); if (!in_array($isoUpper, array_keys($OC_countryAR))) { $err .= "
  • Author #" . $c . " (2-letter) ISO country code is not valid
  • "; } else { $_POST['country'.$c] = $OC_countryAR[$isoUpper]; } } } // Check that we have alternate contact info for contact author if (!validEmail($_POST['contactaltemail']) && !preg_match("/\d/",$_POST['contactphone'])) { $err .= "
  • Enter a valid alternate email or phone number for contact author
  • "; } // Check student if (!preg_match("/^[FT]$/", $_POST['student'])) { $err .= "
  • Student selection invalid
  • "; } // Check topics if (($chair || $OC_statusAR['OC_submissions_open'] || !in_array('topics', $nonEditFieldsAR)) && empty($_POST['topic'])) { $err .= "
  • Select at least one topic area
  • "; } if (oc_hookSet('author-edit-validate')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-validate'] as $hook) { require_once $hook; } } // Check password if ($_POST['password1'] != $_POST['password2']) { $err .= "
  • Passwords entered do not match
  • "; } // errors? if ($err) { print '

    Please go back and check the following:

    '; } else { // process edits $q = "UPDATE " . OCC_TABLE_PAPER . " SET "; if (!empty($_POST['password1'])) { $q .= "password='" . hashPassword(stripslashes($_POST['password1'])) . "',"; } if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('title', $nonEditFieldsAR)) { $q .= "title='" . safeSQLstr($_POST['title'])."',"; } if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('student', $nonEditFieldsAR)) { $q .= "student='" . $_POST['student'] . "',"; } $q .= "contactid='" . $_POST['contact'] . "',". "contactemail='" . safeSQLstr(oc_strtolower($_POST['contactaltemail'])) . "',". "contactphone='" . safeSQLstr($_POST['contactphone']) . "',". "lastupdate='" . date("Y-m-d") . "',". "otherauthors='" . safeSQLstr($_POST['otherauthors']) . "',". "keywords='" . safeSQLstr($_POST['keywords']) . "',". "comments='" . safeSQLstr($_POST['comments']) . "',". "abstract='" . safeSQLstr($_POST['abstract']) . "'". " WHERE paperid='" . $_POST['pid'] . "'"; $r = ocsql_query($q) or err("unable to update submission ".mysql_errno()); $q = "DELETE FROM " . OCC_TABLE_AUTHOR . " WHERE paperid='" . $_POST['pid'] . "'"; $r = ocsql_query($q) or err("Unable to update authors (2) - ".mysql_errno()); for ($i=1;$i<=5;$i++) { if (!empty($_POST["name_last$i"])) { $q = "INSERT INTO " . OCC_TABLE_AUTHOR . " (paperid,position,name_last,name_first,organization,country,email) VALUES (". "'" . $_POST['pid'] . "',". "'$i',". "'" . safeSQLstr($_POST["name_last$i"]) . "',". "'" . safeSQLstr($_POST["name_first$i"]) . "',". "'" . safeSQLstr($_POST["org$i"]) . "',". "'" . safeSQLstr($_POST["country$i"]) . "',". "'" . safeSQLstr($_POST["email$i"]) . "'". ")"; $r = ocsql_query($q) or err("unable to update authors or topics".mysql_errno()); } } if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('topics', $nonEditFieldsAR)) { $q = "DELETE FROM " . OCC_TABLE_PAPERTOPIC . " WHERE paperid='".$_POST['pid']."'"; $r = ocsql_query($q) or err("unable to update topics"); foreach ($_POST['topic'] as $t) { if (is_numeric($t)) { $q = "INSERT INTO " . OCC_TABLE_PAPERTOPIC . " (paperid,topicid) VALUES (" . $_POST['pid'] . ",$t)"; $r = ocsql_query($q) or err("unable to update topic ".mysql_errno()); } else { err("invalid submission topic - ..$t.."); } } } if (oc_hookSet('author-edit-save')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-save'] as $hook) { require_once $hook; } } $confirmmsg = ' Submission ID: ' . $_POST['pid'] . ' Title: '.stripslashes($_POST['title']).' '; if (($OC_configAR['OC_trackStudent'] == 1) && ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('student', $nonEditFieldsAR))) { $confirmmsg .= 'Student: ' . $_POST['student']; } for ($i=1;$i<=5;$i++) { $confirmmsg .= ' Author ' . $i; if ($i == $_POST['contact']) { $confirmmsg .= " (CONTACT AUTHOR)"; } $confirmmsg .= ' Name: ' . stripslashes($_POST["name_first$i"] . " " . $_POST["name_last$i"]) . ' Org: ' . stripslashes($_POST["org$i"]) . ' Country: ' . $_POST["country$i"] . ' Email:' . $_POST["email$i"]; } $confirmmsg .= ' Other Authors: ' . stripslashes($_POST['otherauthors']) . ' Contact Alt Email: ' . $_POST['contactaltemail'] . ' Contact Phone: ' . $_POST['contactphone'] . ' Keywords: ' . stripslashes($_POST['keywords']) . ' Abstract: ' . stripslashes($_POST['abstract']) . ' Comments: ' . stripslashes($_POST['comments']) . ' '; if (oc_hookSet('author-edit-confirm')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-confirm'] as $hook) { require_once $hook; } } //confirm it print '

    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 '
    '; if ($chair) { print ' '; } print ' \n"; if ($OC_configAR['OC_trackStudent'] == 1) { print ' '; } else { // not tracking students print ''; } if (oc_hookSet('author-edit-general')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-general'] as $hook) { require_once $hook; } } print ' '; $colar = array(1,3,5); for ($i=1;$i<=5;$i++) { if (in_array($i,$colar)) { $it = "item2"; } else { $it = "item"; } print ' '; } // foreach author print ' '; if (oc_hookSet('author-edit-authors')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-authors'] as $hook) { require_once $hook; } } print ' '; if (oc_hookSet('author-edit-contact')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-contact'] as $hook) { require_once $hook; } } print ' '; if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('topics', $nonEditFieldsAR)) { print ' \n"; } print ' '; if (oc_hookSet('author-edit-topics')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-topics'] as $hook) { require_once $hook; } } print ' '; if (oc_hookSet('author-edit-content')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-content'] as $hook) { require_once $hook; } } print ' '; if (oc_hookSet('author-edit-comments')) { foreach ($GLOBALS['OC_hooksAR']['author-edit-comments'] as $hook) { require_once $hook; } } print ' '; if (! $chair) { print ' '; } print '
    General Information
    Submission ID:'.$el['paperid'].'
    '; if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('title', $nonEditFieldsAR)) { print ''; } else { print safeHTMLstr($el['title']); print ''; } print "
    Student? '; if ($chair || $OC_statusAR['OC_submissions_open'] || !in_array('student', $nonEditFieldsAR)) { $studoptions = '     '; if ($el['student'] == "T") { print preg_replace("/(value=\"T\")/", "$1 checked", $studoptions); } else { print preg_replace("/(value=\"F\")/", "$1 checked", $studoptions); } print '
    ' . $OC_configAR['OC_studentNote'] . ' '; } else { if ($el['student'] == "T") { print 'Yes'; } else { print 'No'; } print ''; } print '
     
     
    Author(s) Information
    Author #' . $i . ' Name: '; if ($i==1) { print '

       
    '; } else { print '     '; } print '
    '; if ($i==1) { print "
    NOTE: Organization should be your company, university, or similar. Please do not use your department or division, unless it is part of your organization's name such as Interior Department."; } print '
    '; if ($i == 1) { print '
    Enter the 2-letter ISO country code above or select country name from drop-down menu.'; } print '
    If you have more than 5 authors, please enter the additional information here:
     
     
    Contact Author
    The contact author is the person responsible for correspondence with the program chair. We ask for additional information for the contact author, so that we can ensure timely communication and make the program accurate. We will only contact authors other than the contact author if we are unable to reach the contact author (e.g., because of a bad email address). Please notify us of any changes in names, affiliations, etc. in the contact author\'s information

    Note: If you have more than one email address, please put the second address under "Alternate Email". We will only use that address if there is a problem with the primary email.

     
     
    Topic Areas
    To help match submissions to reviewers and sessions, please select '; if ($OC_configAR['OC_multipleSubmissionTopics']) { print 'one or more area(s)'; } else { print 'one area'; } print ' most applicable to your submission:
    '; $i=1; if ($OC_configAR['OC_multipleSubmissionTopics']) { $type = 'checkbox'; } else { $type = 'radio'; } foreach ($topicAR as $tid => $topic) { print ''; if (($OC_configAR['OC_topicColumns'] == 2) && ($i++ == $half)) { print "         "; } else { print "
    \n"; } } print '
    '; } else { print "
      \n"; $q = "SELECT topicname FROM " . OCC_TABLE_TOPIC . ", " . OCC_TABLE_PAPERTOPIC . " WHERE " . OCC_TABLE_PAPERTOPIC . ".paperid='".$_POST['pid']."' AND " . OCC_TABLE_PAPERTOPIC . ".topicid=" . OCC_TABLE_TOPIC . ".topicid"; $r = ocsql_query($q) or err("unable to retrieve topic names"); while ($l=mysql_fetch_array($r)) { print "
    • " . safeHTMLstr($l['topicname']) . "
    • \n"; } print "
     
     
    Content
     
     
    Change Password
    Leave these fields blank if you do not want to change your password
     
     

    (optional)
     
     
    Submission
    Please enter your current password and click on the Submit Changes button.
    '; printFooter(); exit; } // elseif Edit Submission } // if Submission // display login form by default print '
    Submission ID: ( forgot ID? )
    Password: ( forgot password? )

    '; printFooter(); exit; ?>