Example #1
0
             if ($lobjConfig->getChangeSalt()) {
                 $_SESSION['checkit'] = md5($_SESSION['email']) . $lobjReturn[1];
             }
             //display message
             $lobjConfig->displayMessage(_("Thy will be done."));
             //if the base URL of SubjectsPlus changes, log them out and relocate to new BaseURL
             if ($lobjConfig->isNewBaseURL()) {
                 // Unset all of the session variables.
                 $_SESSION = array();
                 // Finally, destroy the session.
                 session_destroy();
                 //echo out javascript to relocate user
                 echo "<script type=\"text/javascript\">window.location = '{$lobjConfig->getNewBaseURL()}control/logout.php';</script>";
             }
             //if the mod_rewrite option changed
             if ($lobjConfig->isNewModRewrite()) {
                 //write the approriate .htaccess file to given path
                 $lobjConfig->wrtieModRewriteFile(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'subjects' . DIRECTORY_SEPARATOR . '.htaccess');
             }
         } else {
             //error message
             $lobjConfig->displayMessage(_("Something went wrong and could not save configurations."));
         }
         //display edit HTML form with new values
         $lobjConfig->displayEditConfigForm('new');
     }
 } else {
     //no message and HTML form with original config values
     $lobjConfig->displayMessage('');
     $lobjConfig->displayEditConfigForm();
 }