| 1 | <?php |
|---|
| 2 | // $Id: mainfile.dist.php,v 1.3 2006/05/01 02:37:26 onokazu Exp $ |
|---|
| 3 | // ------------------------------------------------------------------------ // |
|---|
| 4 | // XOOPS - PHP Content Management System // |
|---|
| 5 | // Copyright (c) 2000 XOOPS.org // |
|---|
| 6 | // <http://www.xoops.org/> // |
|---|
| 7 | // ------------------------------------------------------------------------ // |
|---|
| 8 | // This program is free software; you can redistribute it and/or modify // |
|---|
| 9 | // it under the terms of the GNU General Public License as published by // |
|---|
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
|---|
| 11 | // (at your option) any later version. // |
|---|
| 12 | // // |
|---|
| 13 | // You may not change or alter any portion of this comment or credits // |
|---|
| 14 | // of supporting developers from this source code or any supporting // |
|---|
| 15 | // source code which is considered copyrighted (c) material of the // |
|---|
| 16 | // original comment or credit authors. // |
|---|
| 17 | // // |
|---|
| 18 | // This program is distributed in the hope that it will be useful, // |
|---|
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|---|
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|---|
| 21 | // GNU General Public License for more details. // |
|---|
| 22 | // // |
|---|
| 23 | // You should have received a copy of the GNU General Public License // |
|---|
| 24 | // along with this program; if not, write to the Free Software // |
|---|
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
|---|
| 26 | // ------------------------------------------------------------------------ // |
|---|
| 27 | |
|---|
| 28 | if ( !defined("XOOPS_MAINFILE_INCLUDED") ) { |
|---|
| 29 | define("XOOPS_MAINFILE_INCLUDED",1); |
|---|
| 30 | |
|---|
| 31 | // XOOPS Physical Path |
|---|
| 32 | // Physical path to your main XOOPS directory WITHOUT trailing slash |
|---|
| 33 | // Example: define('XOOPS_ROOT_PATH', '/home/web/xoops.ec-cube.net/html'); |
|---|
| 34 | define('XOOPS_ROOT_PATH', '/home/web/test-xoops.ec-cube.net/html'); |
|---|
| 35 | |
|---|
| 36 | // XOOPS Virtual Path (URL) |
|---|
| 37 | // Virtual path to your main XOOPS directory WITHOUT trailing slash |
|---|
| 38 | // Example: define('XOOPS_URL', 'http://xoops.ec-cube.net'); |
|---|
| 39 | define('XOOPS_URL', 'http://test-xoops.ec-cube.net'); |
|---|
| 40 | |
|---|
| 41 | define('XOOPS_CHECK_PATH', 0); |
|---|
| 42 | // Protect against external scripts execution if safe mode is not enabled |
|---|
| 43 | if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) { |
|---|
| 44 | if ( function_exists('debug_backtrace') ) { |
|---|
| 45 | $xoopsScriptPath = debug_backtrace(); |
|---|
| 46 | if ( !count($xoopsScriptPath) ) { |
|---|
| 47 | die("XOOPS path check: this file cannot be requested directly"); |
|---|
| 48 | } |
|---|
| 49 | $xoopsScriptPath = $xoopsScriptPath[0]['file']; |
|---|
| 50 | } else { |
|---|
| 51 | $xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME']; |
|---|
| 52 | } |
|---|
| 53 | if ( DIRECTORY_SEPARATOR != '/' ) { |
|---|
| 54 | // IIS6 may double the \ chars |
|---|
| 55 | $xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath); |
|---|
| 56 | } |
|---|
| 57 | if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) { |
|---|
| 58 | exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); |
|---|
| 59 | } |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | // Database |
|---|
| 63 | // Choose the database to be used |
|---|
| 64 | define('XOOPS_DB_TYPE', 'mysql'); |
|---|
| 65 | |
|---|
| 66 | // Table Prefix |
|---|
| 67 | // This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'. |
|---|
| 68 | define('XOOPS_DB_PREFIX', 'xoops'); |
|---|
| 69 | |
|---|
| 70 | // Database Hostname |
|---|
| 71 | // Hostname of the database server. If you are unsure, 'localhost' works in most cases. |
|---|
| 72 | define('XOOPS_DB_HOST', 'localhost'); |
|---|
| 73 | |
|---|
| 74 | // Database Username |
|---|
| 75 | // Your database user account on the host |
|---|
| 76 | define('XOOPS_DB_USER', 'xoops'); |
|---|
| 77 | |
|---|
| 78 | // Database Password |
|---|
| 79 | // Password for your database user account |
|---|
| 80 | define('XOOPS_DB_PASS', 'password'); |
|---|
| 81 | |
|---|
| 82 | // Database Name |
|---|
| 83 | // The name of database on the host. The installer will attempt to create the database if not exist |
|---|
| 84 | define('XOOPS_DB_NAME', 'xoops_db_test'); |
|---|
| 85 | |
|---|
| 86 | // Use persistent connection? (Yes=1 No=0) |
|---|
| 87 | // Default is 'No'. Choose 'No' if you are unsure. |
|---|
| 88 | define('XOOPS_DB_PCONNECT', 0); |
|---|
| 89 | define('XOOPS_GROUP_ADMIN', '1'); |
|---|
| 90 | define('XOOPS_GROUP_USERS', '2'); |
|---|
| 91 | define('XOOPS_GROUP_ANONYMOUS', '3'); |
|---|
| 92 | |
|---|
| 93 | // ¥ª¡¼¥È¥í¥°¥¤¥ó¥»¥Ã¥·¥ç¥óÊݸ´ü´Ö |
|---|
| 94 | define('XOOPS_AUTOLOGIN_LIFETIME',7257600); |
|---|
| 95 | |
|---|
| 96 | if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') { |
|---|
| 97 | include XOOPS_ROOT_PATH."/include/common.php"; |
|---|
| 98 | } |
|---|
| 99 | } |
|---|
| 100 | ?> |
|---|