'; if (!OCC_INSTALL_COMPLETE && isset($_REQUEST['install']) && ($_REQUEST['install'] == 1)) { require_once "install-include.php"; $token = ''; } else { beginChairSession(); printHeader("Configuration", 1); $token = $_SESSION[OCC_SESSION_VAR_NAME]['chairtoken']; // Display active modules config if (isset($OC_activeModulesAR) && !empty($OC_activeModulesAR)) { $modules = array(); foreach ($OC_activeModulesAR as $module) { if (is_file('../modules/' . $module . '/settings.inc')) { $modules[$module] = $OC_modulesAR[$module]['name']; } } asort($modules); $moduleOptions = ''; foreach ($modules as $mid => $mname) { $moduleOptions .= ''; } if (!empty($moduleOptions)) { print '

Config Module:

'; } } } // YesNo fields $yesNoFieldsAR = array('OC_notifyIncludeIP', 'OC_reviewerReadPapers', 'OC_reviewerSeeAssignedReviews', 'OC_reviewerCompleteBeforeSAR', 'OC_reviewerSeeOtherReviews', 'OC_reviewerSeeDecision', 'OC_reviewerSeeOtherReviewers', 'OC_reviewerSeeAuthors', 'OC_reviewerUnassignReviews', 'OC_reviewerSeeAdvocate', 'OC_advocateReadPapers', 'OC_advocateSeeOtherReviews', 'OC_advocateSeeAuthors', 'OC_advocateSeeDecision', 'OC_paperAdvocates', 'OC_editAcceptedOnly', 'OC_authorOneContact', 'OC_authorViewSubIfEditClosed'); // Notification array $notifyAR = array( 'OC_notifyAuthorSubmit' => OCC_WORD_AUTHOR . ' makes a submission', 'OC_notifyAuthorEdit' => OCC_WORD_AUTHOR . ' updates (edits) submission', 'OC_notifyAuthorEmailPapers' => OCC_WORD_AUTHOR . ' requests own submission list emailed', 'OC_notifyAuthorUpload' => OCC_WORD_AUTHOR . ' uploads a file', 'OC_notifyAuthorReset' => OCC_WORD_AUTHOR . ' requests password reset', 'OC_notifyAuthorWithdraw' => OCC_WORD_AUTHOR . ' withdraws submission', 'OC_notifyReviewerSignup' => 'Committee member signs up for account', 'OC_notifyReviewerProfileUpdate' => 'Committee member updates profile', 'OC_notifyReviewerReset' => 'Committee member resets password', 'OC_notifyReviewerEmailUsername' => 'Committee member requests username emailed' ); // Fields that may be updated through this form $settingsAR = array_merge($yesNoFieldsAR, array_keys($notifyAR), array( 'OC_confNameFull', 'OC_confName', 'OC_confURL', 'OC_headerImage', 'OC_homePageNotice', 'OC_pcemail', 'OC_confirmmail', 'OC_keycode_reviewer', 'OC_reviewerSignUpNotice', 'OC_committeeFooter', 'OC_keycode_program', 'OC_programSignUpNotice', 'startid', 'OC_paperSubNote', 'OC_subConfirmNotice', 'OC_authorsMinDisplay', 'OC_authorsMax', 'OC_extar', 'OC_locales', 'OC_localeDefault', 'OC_timeZone', 'OC_wordForAuthor', 'OC_wordForChair' )); if (OCC_ADVANCED_CONFIG) { $emailAuthorRecipientsAR = array( 1 => 'All', 0 => 'Contact Only' ); $settingsAR[] = 'OC_emailAuthorRecipients'; } // Allow submission start ID to change? if (($air = ocsql_query("SELECT COUNT(`paperid`) AS `count` FROM `" . OCC_TABLE_PAPER . "`")) && ($ail = ocsql_fetch_assoc($air)) && ($ail['count'] == 0) && ($air = ocsql_query("SHOW TABLE STATUS WHERE `name`='" . OCC_TABLE_PAPER . "'")) && (ocsql_num_rows($air) == 1) && ($ail = ocsql_fetch_assoc($air)) ) { $startid = $ail['Auto_increment']; } // Submission? $e = array(); if (isset($_POST['submit']) && ($_POST['submit'] == "Save Settings")) { // Check for valid submission if (OCC_INSTALL_COMPLETE && !validToken('chair')) { warn('Invalid submission', $hdr, $hdrfn); } // Check input if (!isset($_POST['OC_confName']) || !preg_match("/\p{L}/u", $_POST['OC_confName'])) { $e[] = 'Entity Short Name must include at least one alphanumeric character'; } elseif (preg_match("/\"/", $_POST['OC_confName'])) { $e[] = 'Entity Short Name must not contain quotes'; } if (!isset($_POST['OC_confNameFull']) || !preg_match("/\p{L}/u", $_POST['OC_confNameFull'])) { $e[] = 'Entity Full Name must include at least one alphanumeric character'; } if (isset($_POST['OC_confURL']) && !empty($_POST['OC_confURL']) && !preg_match("/^(?:https?:\/\/|\/)/i", $_POST['OC_confURL'])) { $e[] = 'Entity Web Address should start with https:// (if on another server) or / (for local server)'; } if (isset($_POST['OC_headerImage']) && !empty($_POST['OC_headerImage']) && !preg_match("/^(?:https?:\/\/|\/)/i", $_POST['OC_headerImage'])) { $e[] = 'Header Image should start with https:// (if on another server) or / (if on local server)'; } if (!isset($_POST['OC_pcemail'])) { $e[] = OCC_WORD_CHAIR . ' Email address invalid.'; } elseif (preg_match("/,/", $_POST['OC_pcemail'])) { // Multiple addresses $cmAR = explode(",", $_POST['OC_pcemail']); foreach ($cmAR as $cm) { $cm = trim($cm); if (!validEmail($cm)) { $e[] = OCC_WORD_CHAIR . ' Email does not appear to be valid'; break; } } } elseif (!validEmail($_POST['OC_pcemail'])) { // Single address $e[] = OCC_WORD_CHAIR . ' Email does not appear to be valid'; } if (!isset($_POST['OC_confirmmail'])) { $e[] = 'Notification Email address invalid. Try setting it the same as the ' . OCC_WORD_CHAIR . ' Email'; } elseif (preg_match("/,/", $_POST['OC_confirmmail'])) { // Multiple addresses $cmAR = explode(",", $_POST['OC_confirmmail']); foreach ($cmAR as $cm) { $cm = trim($cm); if (!validEmail($cm)) { $e[] = 'Notification Email does not appear to be valid'; break; } } } elseif (!validEmail($_POST['OC_confirmmail'])) { // Single address $e[] = 'Notification Email does not appear to be valid'; } if (isset($_POST['startid']) && ! preg_match("/^[1-9]\d*$/", $_POST['startid'])) { $e[] = 'Submission Starting ID invalid'; } if (isset($_POST['OC_authorsMinDisplay'])) { if (! preg_match("/^[1-9][0-9]?$/", $_POST['OC_authorsMinDisplay'])) { $e[] = 'Min Authors to Display must be a number between 1-99'; } elseif (isset($_POST['OC_authorsMax']) && ($_POST['OC_authorsMinDisplay'] > $_POST['OC_authorsMax'] )) { $e[] = 'Min Authors must be less than or equal to the Max Authors Allowed value'; } } if (isset($_POST['OC_authorsMax']) && ! preg_match("/^[1-9][0-9]?$/", $_POST['OC_authorsMax'])) { $e[] = 'Max Authors Allowed must be a number between 1-99'; } if (!isset($_POST['OC_extar']) || count($_POST['OC_extar']) == 0) { $e[] = 'Select at least one file format'; } else { // check formats are valid foreach ($_POST['OC_extar'] as $fmat) { if (!isset($OC_formatAR[$fmat])) { $e[] = 'Invalid format selected'; continue; } } } $notifyKeysAR = array_keys($notifyAR); foreach ($notifyKeysAR as $nk) { if (!isset($_POST[$nk])) { $_POST[$nk] = 0; } elseif (!preg_match("/^[01]$/", $_POST[$nk])) { $e[] = 'Invalid notification selection'; continue; } } foreach ($yesNoFieldsAR as $ynf) { if (!isset($_POST[$ynf]) || ($_POST[$ynf] != 1)) { // catch case where checkbox used (e.g., rev/adv permissions) $_POST[$ynf] = 0; } } if (isset($_POST['OC_wordForAuthor']) && !in_array($_POST['OC_wordForAuthor'], $OC_wordForAuthorAR)) { $e[] = 'Word for Author is invalid'; } if (isset($_POST['OC_wordForChair']) && !in_array($_POST['OC_wordForChair'], $OC_wordForChairAR)) { $e[] = 'Word for Chair is invalid'; } if (!isset($_POST['OC_timeZone']) || !oc_validateTimeZone($_POST['OC_timeZone'])) { $e[] = 'Time Zone is invalid'; } if (!isset($_POST['OC_locales']) || empty($_POST['OC_locales']) || !is_array($_POST['OC_locales'])) { $e[] = 'At least one language must be selected'; $_POST['OC_locales'] = array(); } else { if (!isset($_POST['OC_localeDefault']) || !isset($OC_languageAR[$_POST['OC_localeDefault']])) { $e[] = 'Default Language is invalid'; } elseif (!in_array($_POST['OC_localeDefault'], $_POST['OC_locales'])) { $_POST['OC_locales'][] = $_POST['OC_localeDefault']; // auto-select default language } foreach ($_POST['OC_locales'] as $locale) { if (!isset($OC_languageAR[$locale])) { $e[] = 'Invalid locale selected: ' . safeHTMLstr($locale); } } } if (empty($e)) { // Update form's OC_ fields $_POST['OC_extar'] = implode(',', $_POST['OC_extar']); $_POST['OC_locales'] = implode(',', $_POST['OC_locales']); foreach (array_keys($_POST) as $p) { if (preg_match("/^OC_[\w-]+$/", $p) && in_array($p, $settingsAR) && isset($OC_configAR[$p]) && ($OC_configAR[$p] != $_POST[$p])) { updateConfigSetting($p, $_POST[$p], 'OC'); $OC_configAR[$p] = $_POST[$p]; } } // Auto increment? if (isset($startid) && ($startid != $_POST['startid'])) { ocsql_query("ALTER TABLE `" . OCC_TABLE_PAPER . "` AUTO_INCREMENT=" . (int) $_POST['startid']); } // if install, redirect if (isset($_REQUEST['install']) && ($_REQUEST['install'] == 1)) { header("Location: set_topics.php?install=1"); exit; } print '

Configuration successfully updated

'; // reset special vars to array $_POST['OC_extar'] = explode(',', $OC_configAR['OC_extar']); $_POST['OC_locales'] = explode(',', $OC_configAR['OC_locales']); } } else { // not submit; init POST with config values $_POST = $OC_configAR; $_POST['OC_locales'] = explode(',', $OC_configAR['OC_locales']); // Allow submission auto increment to be set? if (isset($startid)) { $_POST['startid'] = $startid; } } if ((!OCC_INSTALL_COMPLETE) && isset($_REQUEST['install']) && ($_REQUEST['install'] == 1)) { printHeader($hdr,$hdrfn); print '

Step 3 of 5: Tailor Configuration Settings

'; } if (!empty($e)) { print '
Please correct the following:
'; } if (!preg_match("/^OpenConf/", $OC_configAR['OC_confNameFull']) && (OCC_LICENSE != 'Public')) { $checkName = true; print ' '; } else { $checkName = false; } print '
'; if ((!OCC_INSTALL_COMPLETE) && isset($_REQUEST['install'])) { print ' '; } print ' '; if (!isset($_POST['submit'])) { print '

Make desired changes, then click any Save Settings button

'; } print '
General Info (collapse)
'; if ((OCC_LICENSE != 'Public') && defined('OCC_LICENSE_EVENT') && !defined('OCHS')) { print '
' . safeHTMLstr(OCC_LICENSE_EVENT) . '
For an entity or year other than the one listed above, please purchase and install a new OpenConf license.
Each license permits a single installation of the OpenConf software.
'; } print '
Full name of event/journal for use on Web pages and in email messages
Abbreviated name, primarily used in email from and subject lines. Quotes not permitted.
Complete website address (including https:// )
Complete web address (including https:// ) for image to display atop every page. Leave blank to display Full Name.
' . safeHTMLstr(OCC_WORD_CHAIR) . ' Email & Notification (collapse)
Used for the From header of outgoing messages, as the general contact email address, and in case of errors or other follow-up. Although a comma-delimited list of addresses (without spaces) is permitted, this is not recommended as mail servers may reject messages with more than one. For any email issues, see the troubleshooting guide.
Receives a copy of confirmation emails sent to ' . oc_strtolower(OCC_WORD_AUTHOR) . 's and committee members; see options below. A comma-delimited list of addresses (without spaces) is permitted.
'; foreach ($notifyAR as $nk => $nv) { print '
'; } print '

Include IP address in notifications?

' . generateRadioOptions('OC_notifyIncludeIP', $yesNoAR, $_POST['OC_notifyIncludeIP']) . '

Reviewers (collapse)
Keycode for signing up as a review committee member. May enter a comma-delimited list (no spaces).


'; if ($OC_configAR['OC_paperAdvocates']) { print '
'; } print '





Advocates (Program Committee) (collapse)
' . generateRadioOptions('OC_paperAdvocates', $yesNoAR, $_POST['OC_paperAdvocates'], 1, 'onclick="oc_showHideDiv(\'OC_paperAdvocates1\', \'advocates\')"') . '
Select whether to make use of Advocates
Keycode for signing up as a program committee member. May enter a comma-delimited list (no spaces).




NOTE: Reviewer permissions are evaluated before advocate\'s

Submissions (collapse)
'; // Allow submission ID auto increment value? if (isset($_POST['startid'])) { print '
Starting ID for submissions. Available only if there are no submissions in the system.
'; } print '
Minimum number of ' . oc_strtolower(OCC_WORD_AUTHOR) . 's to display on submission form
Maximum number of ' . oc_strtolower(OCC_WORD_AUTHOR) . 's allowed per submission (max: 99)
' . generateRadioOptions('OC_authorOneContact', $yesNoAR, $_POST['OC_authorOneContact']) . '
Auto set ' . OCC_WORD_AUTHOR . ' 1 as contact and hide Contact ID field on submission form
'; if (OCC_ADVANCED_CONFIG) { print '
' . generateRadioOptions('OC_emailAuthorRecipients', $emailAuthorRecipientsAR, $_POST['OC_emailAuthorRecipients']) . '
' . OCC_WORD_AUTHOR . '(s) to receive notices and ' . OCC_WORD_CHAIR . ' emails
'; } print '
' . generateRadioOptions('OC_editAcceptedOnly', $yesNoAR, $_POST['OC_editAcceptedOnly']) . '
Restrict Edit Submission to accepted submissions only
' . generateRadioOptions('OC_authorViewSubIfEditClosed', $yesNoAR, $_POST['OC_authorViewSubIfEditClosed']) . '
Allow ' . oc_strtolower(OCC_WORD_AUTHOR) . ' to view submission if editing is closed
'; if (oc_hookSet('set-config-fileupload')) { foreach ($GLOBALS['OC_hooksAR']['set-config-fileupload'] as $hook) { require_once $hook; } } else { print '
Files (collapse)
'; } print '
Localization (collapse)
Selecting multiple languages will enable a menu on the main OpenConf page to select one\'s language choice. Both ' . oc_strtolower(OCC_WORD_AUTHOR) . ' and reviewer pages are then displayed in the selected language. For additional information, or to assist with translations, visit www.OpenConf.com/translate/.' . (function_exists('gettext') ? '' : ' PHP must have gettext enabled.') . '
'; $wordUse = false; if (in_array(OCC_WORD_AUTHOR, $OC_wordForAuthorAR)) { $wordUse = true; print '
***
'; } if (in_array(OCC_WORD_CHAIR, $OC_wordForChairAR)) { $wordUse = true; print '
***
'; } print '
'; if ($wordUse) { print '

*** Used for English (US) only. Some Chair features will still show Author/Chair.'; if (oc_moduleValid('oc_customforms')) { print ' If Custom Forms module in use, form fields may need to be manually updated to reflect desired Author/Chair words.'; } print '

'; } print '
'; oc_replaceCKEditor(array('OC_homePageNotice', 'OC_reviewerSignUpNotice', 'OC_committeeFooter', 'OC_programSignUpNotice', 'OC_paperSubNote', 'OC_subConfirmNotice')); printFooter(); ?>