Ejemplo n.º 1
0
 /**
  * Parse all post values 
  */
 public function parsePostData()
 {
     if ($_POST['name'] != SessionAccountHandler::getName()) {
         DB::getInstance()->update('account', SessionAccountHandler::getId(), 'name', $_POST['name']);
     }
     if ($_POST['allow_mails'] != SessionAccountHandler::getAllowMails()) {
         DB::getInstance()->update('account', SessionAccountHandler::getId(), 'allow_mails', $_POST['allow_mails']);
     }
     if ($_POST['language'] != SessionAccountHandler::getLanguage()) {
         DB::getInstance()->update('account', SessionAccountHandler::getId(), 'language', $_POST['language']);
         Language::setLanguage($_POST['language']);
         echo Ajax::wrapJS('document.cookie = "lang=" + encodeURIComponent("' . addslashes($_POST['language']) . '");');
         Ajax::setReloadFlag(Ajax::$RELOAD_PAGE);
     }
     if ($_POST['new_pw'] != '') {
         $this->tryToChangePassword();
     }
 }