source: branches/comu-ver2/html/require.php @ 17477

Revision 17477, 4.2 KB checked in by Seasoft, 16 years ago (diff)

定数「HTML2DATA_DIR」と「DATA_PATH」が別々に定義されているのを常に「HTML2DATA_DIR」から生成するように変更。ディレクトリ構成の変更に柔軟に対応できることを目論む。

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24$include_dir = realpath(dirname( __FILE__)) . '/';
25
26if (!defined("HTML_PATH")) {
27    define("HTML_PATH", realpath($include_dir) . '/');
28}
29
30require_once(HTML_PATH . "define.php");
31
32if (!defined("DATA_PATH")) {
33    define("DATA_PATH", HTML_PATH . HTML2DATA_DIR);
34}
35
36if (!defined("CLASS_PATH")) {
37    /** クラスパス */
38    define("CLASS_PATH", DATA_PATH . "class/");
39}
40
41if (!defined("CLASS_EX_PATH")) {
42    /** クラスパス */
43    define("CLASS_EX_PATH", DATA_PATH . "class_extends/");
44}
45
46if (!defined("CACHE_PATH")) {
47    /** キャッシュ生成ディレクトリ */
48    define("CACHE_PATH", DATA_PATH . "cache/");
49}
50require_once(CLASS_EX_PATH . "SC_Initial_Ex.php");
51// アプリケーション初期化処理
52$objInit = new SC_Initial_Ex();
53$objInit->init();
54
55
56require_once(DATA_PATH . "include/module.inc");
57require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php");
58require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php");
59require_once(CLASS_EX_PATH . "db_extends/SC_DB_MasterData_Ex.php");
60require_once(CLASS_EX_PATH . "db_extends/SC_DB_DBFactory_Ex.php");
61require_once(CLASS_PATH . "SC_View.php");
62require_once(CLASS_PATH . "SC_DbConn.php");
63require_once(CLASS_PATH . "SC_Session.php");
64require_once(CLASS_PATH . "SC_Query.php");
65require_once(CLASS_PATH . "SC_SelectSql.php");
66require_once(CLASS_PATH . "SC_CheckError.php");
67require_once(CLASS_PATH . "SC_PageNavi.php");
68require_once(CLASS_PATH . "SC_Date.php");
69require_once(CLASS_PATH . "SC_Image.php");
70require_once(CLASS_PATH . "SC_UploadFile.php");
71require_once(CLASS_PATH . "SC_SiteInfo.php");
72require_once(CLASS_EX_PATH . "SC_SendMail_Ex.php");
73require_once(CLASS_PATH . "SC_FormParam.php");
74require_once(CLASS_PATH . "SC_CartSession.php");
75require_once(CLASS_PATH . "SC_SiteSession.php");
76require_once(CLASS_PATH . "SC_CampaignSession.php");
77require_once(CLASS_PATH . "SC_Customer.php");
78require_once(CLASS_PATH . "SC_CustomerList.php");
79require_once(CLASS_PATH . "SC_Cookie.php");
80require_once(CLASS_PATH . "SC_Pdf.php");
81require_once(CLASS_PATH . "SC_MobileUserAgent.php");
82require_once(CLASS_PATH . "SC_MobileEmoji.php");
83require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_PageLayout_Ex.php");
84require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_DB_Ex.php");
85require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Session_Ex.php");
86require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mail_Ex.php");
87require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mobile_Ex.php");
88include_once($include_dir . "require_plugin.php");
89
90// セッションハンドラ開始
91$objSession = new SC_Helper_Session_Ex();
92
93// インストールチェック
94SC_Utils_Ex::sfInitInstall();
95
96// 携帯端末の場合は mobile 以下へリダイレクトする。
97if (SC_MobileUserAgent::isMobile()) {
98    $url = "";
99    if (SC_Utils_Ex::sfIsHTTPS()) {
100        $url = MOBILE_SSL_URL;
101    } else {
102        $url = MOBILE_SITE_URL;
103    }
104
105    if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) {
106        $path = $matches[1];
107    } else {
108        $path = '';
109    }
110
111    header("Location: ". SC_Utils_Ex::sfRmDupSlash($url . $path));
112    exit;
113}
114
115// セッション初期化・開始
116require_once CLASS_PATH . 'session/SC_SessionFactory.php';
117$sessionFactory = SC_SessionFactory::getInstance();
118$sessionFactory->initSession();
119
120// 絵文字変換 (除去) フィルターを組み込む。
121ob_start(array('SC_MobileEmoji', 'handler'));
122?>
Note: See TracBrowser for help on using the repository browser.