* Copyright (c) 2001-2008 Platon Group, http://platon.sk/ * All rights reserved. * * See README file for more information about this software. * See COPYING file for license information. * * Download the latest version from * http://platon.sk/projects/Metafox/ */ /* $Platon: Metafox/cfgldr.inc.php,v 1.40 2019/11/03 17:31:23 nepto Exp $ */ /* * WARNING! Do not edit this file! Edit rather config/db-config.inc.php file. */ /* * Error reporting, magic quotes, etc. */ error_reporting(E_ALL); //set_magic_quotes_runtime(0); // <-- This function has been DEPRECATED as of PHP 5.3.0 ini_set('magic_quotes_runtime', 0); /* * Directory configuration */ $ezin_sys = array( /* {{{ */ 'dir' => array( 'root' => dirname(__FILE__), 'admin' => 'admin', 'config' => 'config', 'themes' => 'themes', 'upload' => 'upload', 'apps' => 'lib2', )); /* }}} */ if (strlen($ezin_sys['dir']['root']) > 0) { $ezin_sys['dir']['root'] .= '/'; } /* * Include path stuff */ ini_set('include_path', join(strncmp(php_uname(), 'Windows', 7) ? ':' : ';', array('.', $ezin_sys['dir']['root'] . 'lib/'))); if (! strncmp(php_uname(), 'Windows', 7)) { ini_set('include_path', str_replace('/', '\\', ini_get('include_path'))); } /* * Basic inclusion and timer initialization */ @require_once 'Platon.php'; $ezin_sys['time']['start'] = @Platon::get_mtime(); /* * Database connection constants */ $ezin_db_config_file = $ezin_sys['dir']['root'].'config/db-config.inc.php'; if (! @file_exists($ezin_db_config_file)) { die('cannot locate config file'); } require_once $ezin_db_config_file; /* * Error reporting by config */ error_reporting(!empty($ezin_sys['error_reporting']) ? $ezin_sys['error_reporting'] : E_ALL); /* * Table constats */ $ezin_sys['db']['tables'] = array( /* {{{ */ 'authors' => 'ezin_authors', 'articles' => 'ezin_articles', 'sections' => 'ezin_sections', 'editorials' => 'ezin_editorials', 'messages' => 'ezin_messages', 'sessions' => 'ezin_sessions', 'config_data' => 'ezin_config', 'config_info' => 'ezin_config_info', 'users' => 'ezin_users', 'roles' => 'ezin_roles', 'counts_temp' => 'ezin_counts_temp', 'polls' => 'ezin_polls', 'poll_answers' => 'ezin_poll_answers', 'feedbacks' => 'ezin_feedbacks', 'feedback_data' => 'ezin_feedback_data', 'nl_emails' => 'ezin_nl_emails', 'nl_messages' => 'ezin_nl_messages', 'nl_msg_emails' => 'ezin_nl_message_emails', 'cache' => 'ezin_cache', 'sources' => 'ezin_sources', 'boxes' => 'ezin_boxes', 'redirects' => 'ezin_redirects' ); /* }}} */ /* * Template engine configuration */ $ezin_sys['tmpl'] = array( /* {{{ */ // Templates functions issues 'fnc_file' => 'functions.php', 'fnc_prefix' => 'ezin_tmpl_', // Template deliminator and file extension 'delim' => '.', 'ext' => 'tmpl', 'delimext' => '.tmpl', ### sync this with two above ### // Main templates 'error' => 'error', 'notfound' => 'notfound', 'admin' => 'admin', 'author' => 'author', 'author_edit' => 'author_edit', 'section' => 'section', 'article' => 'article', 'article_print' => 'article_print', 'message' => 'message', 'message_edit' => 'message_edit', 'box' => 'box', // Item templates 'article_item' => 'article_item', 'section_item' => 'section_item', 'message_item' => 'message_item', 'message_full_item' => 'message_full_item', 'poll_answer_item' => 'poll_answer_item', 'featured_articles_item' => 'featured_articles_item', // E-mail templates 'e-mail' => array( 'error' => 'e-mail-error', 'feedback' => 'e-mail-feedback', 'author' => 'e-mail-author' ) ); /* }}} */ /* * File create & upload constants * * $ezin_sys['mode']['dir'] must be set; set $ezin_sys['mode']['file'] to 0 * if you want to create it with default premissions */ $ezin_sys['mode'] = array( /* {{{ */ 'file' => 0, 'dir' => 0777 ); /* }}} */ /* * Software information */ $ezin_sys['software'] = array( /* {{{ */ 'name' => 'Metafox', 'version' => '0.9.3 (production stable)', 'description' => 'flexible content management system', 'motto' => 'database content driven by enterprise', 'url' => 'http://www.metafox.com/' ); /* }}} */ /* * Auth options */ $ezin_sys['db']['dsn'] = 'mysqli://'.$ezin_sys['db']['user'].':'.$ezin_sys['db']['pass'] .'@'.$ezin_sys['db']['host'].':'.$ezin_sys['db']['port'].'/'.$ezin_sys['db']['name']; $ezin_auth_options = array( /* {{{ */ 'dsn' => $ezin_sys['db']['dsn'], 'timeout' => 1800, /* default value, will be overwritten after configuration will be loaded from DB */ 'expired' => 0, /* turned off */ 'var' => array( 'username' => 'ezin_username', 'password' => 'ezin_password'), 'cookie' => array( 'name' => $ezin_sys['software']['name'].'-AuthDB', /* default value; changed later */ 'path' => Platon::append_slash( Platon::str_replace_postfix('admin', '', dirname($_SERVER['PHP_SELF']))), 'domain' => @$_SERVER['HTTP_HOST'] ), 'sessions' => array( 'table' => $ezin_sys['db']['tables']['sessions'], 'prefix' => 'session_', 'info_cols' => array('*')), 'users' => array( 'table' => $ezin_sys['db']['tables']['users'], 'prefix' => '', 'info_cols' => array('*'), 'cols' => array( 'username' => 'username', 'password' => 'password', 'group_id' => 'role_id')), 'groups' => array( 'table' => $ezin_sys['db']['tables']['roles'], 'prefix' => 'role_', 'info_cols' => array('*'), 'cols' => array('id' => 'id')) ); /* }}} */ $ezin_auth = false; // must be here! IMPORTANT! $ezin_user = array(); /* * Rewrite actions */ $ezin_sys['rewrite'] = array( 'author' => array( 'en' => 'author', 'sk' => 'autor' ), 'print' => array( 'en' => 'print', 'sk' => 'tlac' ), 'message' => array( 'en' => 'message', 'sk' => 'sprava' ), ); /* * CGI variables */ $ezin_cgi = array( /* {{{ */ 'query_string' => @explode('&', $_SERVER['QUERY_STRING']), /* Input method. Possibilities: index, section, article, message, admin, feedback */ 'input' => 'index', /* Output method. Possibilities: author, author_edit, section, article, article_print, message/message_edit, message_full_list, message_selected_list, feedback, feedback_thanks, admin, error, notfound */ 'output' => 'section' ); /* }}} */ /* * Antispam Texts */ $ezin_cgi['antispam_texts'] = array( 'en' => array( 'title' => 'ANTI SPAM', 'description' => 'Please rotate the image into horizontal position.', 'submit' => 'Submit', 'cancel' => 'Cancel' ), 'sk' => array( 'title' => 'ANTI SPAM', 'description' => 'Otočte obrázok do vodorovnej polohy.', 'submit' => 'Odoslať', 'cancel' => 'Zrušiť' ) ); /* * Version & config load from database */ require_once 'error.inc.php'; require_once 'db-core/db-core.inc.php'; require_once 'db.inc.php'; ezin_check_db_handle(); // the same principle as 'atodo' (see subst.inc.php:133) $last_ver = ezin_cache_load_content('version'); if ($last_ver === false) { ezin_cache_save('version', $ezin_sys['software']['version']); } elseif ($last_ver != $ezin_sys['software']['version']) { ezin_cache_clear(''); ezin_cache_save('version', $ezin_sys['software']['version'], 0, 0); } $ezin_cfg = ezin_get_config(); ezin_set_db_encoding($ezin_cfg['encoding']); Platon::htmlspecialchars_encoding($ezin_cfg['encoding']); if ($ezin_cfg['encoding'] == 'utf-8') { ini_set('default_charset', 'utf-8'); } else { // every other charset including iso-8859-2 ini_set('default_charset', ''); } $ezin_auth_options['timeout'] = $ezin_cfg['admin_session_timeout']; $ezin_auth_options['cookie']['name'] = sprintf('%s-%s-%s', $ezin_sys['software']['name'], $ezin_cfg['abbreviation'], 'AuthDB'); $ezin_cfg['theme'] = array( 'name' => $ezin_cfg['theme'], 'dir' => $ezin_sys['dir']['themes'].'/'.$ezin_cfg['theme'], 'url' => $ezin_cfg['url'].$ezin_sys['dir']['themes'].'/'.$ezin_cfg['theme'] ); $ezin_cfg['upload'] = array( 'dir' => $ezin_sys['dir']['upload'], 'url' => $ezin_cfg['url'].$ezin_sys['dir']['upload'] ); if (!empty($ezin_cfg['languages'])) { $ezin_cfg['languages'] = preg_split('/(\s+|\xc2\xa0)/', $ezin_cfg['languages']); count($ezin_cfg['languages']) > 0 || $ezin_cfg['languages'] = ''; } if (intval(@$ezin_cfg['debug']) == 0) { error_reporting(!empty($ezin_sys['error_reporting']) ? $ezin_sys['error_reporting'] : (E_ALL & (~ E_NOTICE))); } /* * Redirect test */ Platon::redirect_test(array(basename(__FILE__), 'error.inc.php', 'functions.inc.php', 'subst.inc.php', 'db.inc.php' ), $ezin_cfg['url']); /* Modeline for ViM {{{ * vim: set ts=4: * vim600: fdm=marker fdl=0 fdc=0: * }}} */ ?>