Location: PHPKode > projects > Knowledge Box > knowledgebox/wizard/execute_config.php
<?php

  /*
   * Free IT Foundation
   * Free Technology Serving Knowledge
   * http://www.free-it-foundation.org
   * 
   * This file is part of Knowledge Box.
   * 
   * Knowledge Box is free software: you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
   * 
   * Knowledge Box is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU General Public License for more details.
   * 
   * You should have received a copy of the GNU General Public License
   * along with Knowledge Box.  If not, see <http://www.gnu.org/licenses/>.
   */


  // restrict access
  if (!KB_IS_ADMINISTRATOR)
    $AppUI->redirect (KB_ACCESS_DENIED);

  // instanciate
  $configResultsPerPage = KBModuleConfig::getConfig (KB_BASE, KB_CONFIG_PROPERTY_RESULTS);
  $configLastEntries = KBModuleConfig::getConfig (KB_BASE, KB_CONFIG_PROPERTY_LASTENTRIES);
  $configDateFormat = KBModuleConfig::getConfig (KB_BASE, KB_CONFIG_PROPERTY_DATEFORMAT);
  $configDateSeparator = KBModuleConfig::getConfig (KB_BASE, KB_CONFIG_PROPERTY_DATESEPARATOR);
  $configWYSIWYGFormat = KBModuleConfig::getConfig (KB_BASE, KB_CONFIG_PROPERTY_WYSIWYG);
  
  // store
  $configResultsPerPage->setIntValue ($_POST ['results_per_page']);
  $configResultsPerPage->store ();
  
  // store
  $configLastEntries->setIntValue ($_POST ['last_entries']);
  $configLastEntries->store ();
  
  // store
  $configDateFormat->setStringValue ($_POST ['date_format']);
  $configDateFormat->store ();
  
  // store
  $configDateSeparator->setStringValue ($_POST ['date_separator']);
  $configDateSeparator->store ();
  
  // store
  $configWYSIWYGFormat->setStringValue ($_POST ['wysiwyg_format']);
  $configWYSIWYGFormat->store ();
  
  // ui message
  $AppUI->setMsg (utf8_encode (html_entity_decode ($AppUI->_('uiConfigurationResource'))) . ' ' . utf8_encode (html_entity_decode ($AppUI->_('uiResourceUpdated'))), UI_MSG_OK);

  // redirect
  $AppUI->redirect ('m=' . KB_MODULE);

?>
Return current item: Knowledge Box