示例#1
0
define('DIR_LANG', DIR_AJAX_ROOT . 'langs' . DIRECTORY_SEPARATOR);
//Class Declarations
define('CLASS_FILE', DIR_AJAX_INC . 'class.file.php');
define("CLASS_UPLOAD", DIR_AJAX_INC . 'class.upload.php');
define('CLASS_MANAGER', DIR_AJAX_INC . 'class.manager.php');
define('CLASS_IMAGE', DIR_AJAX_INC . "class.image.php");
define('CLASS_HISTORY', DIR_AJAX_INC . "class.history.php");
define('CLASS_SESSION_ACTION', DIR_AJAX_INC . "class.sessionaction.php");
define('CLASS_PAGINATION', DIR_AJAX_INC . 'class.pagination.php');
define('CLASS_SEARCH', DIR_AJAX_INC . "class.search.php");
//SCRIPT FILES declarations
define('SPT_FUNCTION_BASE', DIR_AJAX_INC . 'function.base.php');
//include different config base file according to query string "config"
$configBaseFileName = 'config.base.php';
if (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['config']) && file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'config.' . secureFileName($_GET['config']) . ".php") {
    $configBaseFileName = 'config.' . secureFileName($_GET['config']) . ".php";
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . $configBaseFileName;
require_once DIR_AJAX_LANGS . CONFIG_LANG_DEFAULT . ".php";
require_once DIR_AJAX_INC . "function.base.php";
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.session.php";
$session = new Session();
$auth = new Auth();
if (CONFIG_ACCESS_CONTROL_MODE == 1) {
    //access control enabled
    if (!$auth->isLoggedIn() && strtolower(basename($_SERVER['PHP_SELF']) != strtolower(basename(CONFIG_LOGIN_PAGE)))) {
        //
        header('Location: ' . appendQueryString(CONFIG_LOGIN_PAGE, makeQueryString()));
        exit;
    }
}
 * 				echo dirname(__FILE__);
 * 			?>
 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that 
 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 *   6. enjoy it
 * 		
 */
define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
//theme related setting
/*
*	options avaialbe for CONFIG_EDITOR_NAME are:
		stand_alone
		tinymce
		fckeditor
*/
//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8
define('CONFIG_EDITOR_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor']) ? secureFileName($_GET['editor']) : 'stand_alone');
define('CONFIG_THEME_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme']) ? secureFileName($_GET['theme']) : 'default');
//change the theme to your custom theme rather than default
define('CONFIG_DEFAULT_VIEW', CONFIG_SYS_THUMBNAIL_VIEW_ENABLE ? 'detail' : 'detail');
//thumnail or detail
define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
define('CONFIG_LOAD_DOC_LATTER', false);
//all documents will be loaded up after the template has been loaded to the client
//General Option Declarations
//LANGAUGAE DECLARATIONNS
define('CONFIG_LANG_INDEX', 'language');
//the index in the session
define('CONFIG_LANG_DEFAULT', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language'] . '.php')) ? secureFileName($_GET['language']) : 'en');
//change it to be your language file base name, such en
示例#3
0
		 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
		 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that 
		 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
		 *   6. enjoy it

		        
		 * 		
		 */
		

	define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');	
	//theme related setting
			/*
			*	options avaialbe for CONFIG_EDITOR_NAME are:
					stand_alone
					tinymce
					fckeditor
			*/
	//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8			
	define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'tinymce')); 
	define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default'));  //change the theme to your custom theme rather than default
	define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
	define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
	define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client 
	
	//General Option Declarations
	//LANGAUGAE DECLARATIONNS

	define('CONFIG_LANG_INDEX', 'language'); //the index in the session
	define('CONFIG_LANG_DEFAULT', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language']) . '.php')?secureFileName($_GET['language']):'en')); //change it to be your language file base name, such en
?>
示例#4
0
 *   1. create a php script file (let's call it document_root.php)
 *   2. add the following codes in in 
 * 			<?php
 * 				echo dirname(__FILE__);
 * 			?>
 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that 
 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 *   6. enjoy it
 */
define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
//theme related setting
/**
 * options avaialbe for CONFIG_EDITOR_NAME are:
 * stand_alone
 * tinymce
 * fckeditor
 */
//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8
define('CONFIG_EDITOR_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor']) ? secureFileName($_GET['editor']) : 'tinymce3');
define('CONFIG_THEME_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme']) ? secureFileName($_GET['theme']) : 'default');
//change the theme to your custom theme rather than default
define('CONFIG_DEFAULT_VIEW', 'thumbnail');
//thumnail or detail
define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
//General Option Declarations
//LANGAUGAE DECLARATIONNS
define('CONFIG_LANG_INDEX', 'language');
//the index in the session
define('CONFIG_LANG_DEFAULT', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) ? secureFileName($_GET['language']) : 'hu');
//change it to be your language file base name, such en
示例#5
0
define('CONFIG_WEBSITE_DOCUMENT_ROOT', rtrim(api_get_path(SYS_SERVER_ROOT_PATH), '/'));
//theme related setting
/*
*	options avaialbe for CONFIG_EDITOR_NAME are:
stand_alone
tinymce
fckeditor
*/
//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8
define('CONFIG_EDITOR_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($editor) ? secureFileName($editor) : 'fckeditor');
// run mode fckeditor (Chamilo editor)
define('CONFIG_THEME_NAME', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme']) ? secureFileName($_GET['theme']) : 'default');
//change the theme to your custom theme rather than default
define('CONFIG_DEFAULT_VIEW', CONFIG_SYS_THUMBNAIL_VIEW_ENABLE ? 'thumbnail' : 'detail');
//thumbnail or detail
define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10000);
//change 10 by 10000 while pagination is deactivated on Chamilo
define('CONFIG_LOAD_DOC_LATTER', false);
//all documents will be loaded up after the template has been loaded to the client
//General Option Declarations
//LANGAUGAE DECLARATIONNS
$ajaxfilemanager_code_translation_table = array('' => 'en', 'pt' => 'pt_pt', 'sr' => 'sr_latn');
$langajaxfilemanager = strtolower(str_replace('-', '_', api_get_language_isocode()));
$langajaxfilemanager = isset($ajaxfilemanager_code_translation_table[$langajaxfilemanager]) ? $ajaxfilemanager_code_translation_table[$langajaxfilemanager] : $langajaxfilemanager;
$langajaxfilemanager = file_exists(api_get_path(SYS_PATH) . 'main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/' . $langajaxfilemanager . '.php') ? $langajaxfilemanager : 'en';
define('CONFIG_LANG_INDEX', 'language');
//the index in the session
define('CONFIG_LANG_DEFAULT', CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language']) . '.php') ? secureFileName($_GET['language']) : $langajaxfilemanager);
//change it to be your language file base name, such en
// Language text direction.
define('CONFIG_LANG_TEXT_DIRECTION_DEFAULT', in_array(CONFIG_LANG_DEFAULT, array('ar', 'prs', 'he', 'ps', 'fa')) ? 'rtl' : 'ltr');