Title must be entered'; } if (!isset($_POST['name_last']) || !preg_match("/\w/", $_POST['name_last'])) { $err .= '
  • Last Name must be entered
  • '; } if (!isset($_POST['email']) || !validEmail($_POST['email'])) { $err .= '
  • Email is not valid
  • '; } if (!isset($_POST['password1']) || !isset($_POST['password2']) || empty($_POST['password1'])) { $err .= '
  • ' . oc_('Password must be entered twice') . '
  • '; } elseif ($_POST['password1'] != $_POST['password2']) { $err .= '
  • ' . oc_('Passwords entered do not match') . '
  • '; } if (empty($err)) { $q = "INSERT INTO `" . OCC_TABLE_PAPER . "` SET " . "`title`='" . safeSQLstr($_POST['title']) . "', " . "`password`='" . hashPassword($_POST['password1']) . "', " . "`contactid`=1, " . "`altcontact`=' '," . "`submissiondate`='" . date('Y-m-d') . "'"; $r = ocsql_query($q) or err('Unable to create submission record.'); $pid = mysql_insert_id() or err('unable to get submission ID'); $q = "INSERT INTO `" . OCC_TABLE_AUTHOR . "` SET " . "`paperid`=" . $pid . ", " . "`position`=1, " . "`name_first`='" . safeSQLstr(varValue('name_first', $_POST)) . "', " . "`name_last`='" . safeSQLstr($_POST['name_last']) . "', " . "`email`='" . safeSQLstr($_POST['email']) . "'"; if ($r = ocsql_query($q)) { if (preg_match("/^(.*)\/chair\/create_sub\.php/", $_SERVER['PHP_SELF'], $match)) { $url = 'http' . ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 's' : '') . '://' . safeHTMLstr($_SERVER['SERVER_NAME']) . (ctype_digit($_SERVER['SERVER_PORT']) && (($_SERVER['SERVER_PORT'] != '80')) ? (':' . $_SERVER['SERVER_PORT']) : '') . $match[1] . '/author/edit.php'; } elseif (!empty($OC_configAR['OC_confURL'])) { $url = $OC_configAR['OC_confURL']; } else { $url = ''; } $subject = urlencode($OC_configAR['OC_confName']) . ' Submission Information'; $body = 'A submission entry to ' . $OC_configAR['OC_confName'] . ' has been created for you. Please use the following information to edit your submission' . (empty($url) ? '' : (' at ' . $url)) . '. Submission ID: ' . $pid . ' Password: ' . $_POST['password1']; print '

    Submission ID ' . $pid . ' successfully created.

    Notify author

    '; printFooter(); exit; } else { ocsql_query("DELETE FROM `" . OCC_TABLE_PAPER . "` WHERE `paperid`=" . $pid . " LIMIT 1"); err('Unable to add author to submission'); } } } if (!empty($err)) { print '

    Please correct the following items. Note that the password fields must be re-entered.


    '; } print '

    This form allows you to create a new submission record. It is intended to permit late submissions once New Submissions have been closed. Upon creating the submission record, provide the author with the submission ID and password, and instruct them to edit the submission. An email link will be provided upon submission of this form for contacting the author with this information.

    '; printFooter(); ?>