<?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/>.
*/
// external view
require_once ('require/constants.php');
require_once ('require/sessions.php');
// dotproject
require_once ('../../../base.php');
require_once ('../../../includes/main_functions.php');
require_once ('../../../includes/config.php');
require_once ('../../../includes/db_adodb.php');
require_once ('../../../includes/db_connect.php');
require_once ('../../../includes/session.php');
// helpers
$AppUI = new CAppUI ();
// constants
require_once ('../require/constants.php');
// classes
require_once ('../knowledgebox.class.php');
// get base
$base = new KBModuleBase ();
$base->load (KBEV_BASE);
// base error
if (strlen ($base->getName ()) == 0)
require_once ('errors/inexistant.php');
// no entries
if (!KBModuleEntry::hasEntriesInBase (KBEV_BASE))
require_once ('errors/empty.php');
// language error
if (!file_exists ('../locales/' . KBEV_LANG . '.inc'))
require_once ('errors/locale.php');
// language
$translation = array ();
$language = file_get_contents ('../locales/' . KBEV_LANG . '.inc');
$chunks = explode ("\n", $language);
// translation
foreach ($chunks as $chunk) {
if (strlen ($chunk) > 0) {
$chunk = explode ("' => '", $chunk);
$translation [substr (trim ($chunk [0]), 1)] = substr (trim ($chunk [1]), 0, -2);
}
}
?>