//get POST variables based on options array $lobjConfig->setNewConfigValues(); //check whether new values are acceptable $lstrMessage = $lobjConfig->checkDBConnection(); if ($lstrMessage != '') { //display error message on top of page $lobjConfig->displayMessage(_($lstrMessage)); //display edit HTML form $lobjConfig->displaySetupDBConfigForm('new'); } else { //if no error to connect to database, set path to new config //file and do not set the values again and then write the config //file $lobjConfig->setConfigPath($lstrConfigFilePath, FALSE); $lobjConfig->setChangeSalt(TRUE); $lobjConfig->setChangeAPIKey(TRUE); $lobjReturn = $lobjConfig->writeConfigFile(); //if no error display complete. Otherwise, display error if ($lobjReturn) { $lobjConfig->displayMessage(_("Configuration Setup Complete.")); if (!isInstalled()) { ?> <div class="install-pluslet">Please make sure you are not currently logged in on any installation of SubjectsPlus on current server.<br /><a href="install.php">Run the install!</a></div> <?php } else { ?> <div class="install-pluslet"><a href="update.php">Update SubjectsPlus!</a></div> <?php } } else { //error message $lobjConfig->displayMessage(_("Something went wrong and could not save configurations.")); //display edit HTML form