| 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 | require_once($include_dir . "/define.php"); |
|---|
| 26 | if (!defined("CLASS_PATH")) { |
|---|
| 27 | /** クラスパス */ |
|---|
| 28 | define("CLASS_PATH", $include_dir . HTML2DATA_DIR . "class/"); |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | if (!defined("CLASS_EX_PATH")) { |
|---|
| 32 | /** クラスパス */ |
|---|
| 33 | define("CLASS_EX_PATH", $include_dir . HTML2DATA_DIR . "class_extends/"); |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | if (!defined("CACHE_PATH")) { |
|---|
| 37 | /** キャッシュ生成ディレクトリ */ |
|---|
| 38 | define("CACHE_PATH", $include_dir . HTML2DATA_DIR . "cache/"); |
|---|
| 39 | } |
|---|
| 40 | require_once(CLASS_EX_PATH . "SC_Initial_Ex.php"); |
|---|
| 41 | // アプリケーション初期化処理 |
|---|
| 42 | $objInit = new SC_Initial_Ex(); |
|---|
| 43 | $objInit->init(); |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | require_once($include_dir . HTML2DATA_DIR . "include/module.inc"); |
|---|
| 47 | require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php"); |
|---|
| 48 | require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php"); |
|---|
| 49 | require_once(CLASS_EX_PATH . "db_extends/SC_DB_MasterData_Ex.php"); |
|---|
| 50 | require_once(CLASS_EX_PATH . "db_extends/SC_DB_DBFactory_Ex.php"); |
|---|
| 51 | require_once(CLASS_PATH . "SC_View.php"); |
|---|
| 52 | require_once(CLASS_PATH . "SC_DbConn.php"); |
|---|
| 53 | require_once(CLASS_PATH . "SC_Session.php"); |
|---|
| 54 | require_once(CLASS_PATH . "SC_Query.php"); |
|---|
| 55 | require_once(CLASS_PATH . "SC_SelectSql.php"); |
|---|
| 56 | require_once(CLASS_PATH . "SC_CheckError.php"); |
|---|
| 57 | require_once(CLASS_PATH . "SC_PageNavi.php"); |
|---|
| 58 | require_once(CLASS_PATH . "SC_Date.php"); |
|---|
| 59 | require_once(CLASS_PATH . "SC_Image.php"); |
|---|
| 60 | require_once(CLASS_PATH . "SC_UploadFile.php"); |
|---|
| 61 | require_once(CLASS_PATH . "SC_SiteInfo.php"); |
|---|
| 62 | require_once(CLASS_EX_PATH . "SC_SendMail_Ex.php"); |
|---|
| 63 | require_once(CLASS_PATH . "SC_FormParam.php"); |
|---|
| 64 | require_once(CLASS_PATH . "SC_CartSession.php"); |
|---|
| 65 | require_once(CLASS_PATH . "SC_SiteSession.php"); |
|---|
| 66 | require_once(CLASS_PATH . "SC_CampaignSession.php"); |
|---|
| 67 | require_once(CLASS_PATH . "SC_Customer.php"); |
|---|
| 68 | require_once(CLASS_PATH . "SC_CustomerList.php"); |
|---|
| 69 | require_once(CLASS_PATH . "SC_Cookie.php"); |
|---|
| 70 | require_once(CLASS_PATH . "SC_Pdf.php"); |
|---|
| 71 | require_once(CLASS_PATH . "SC_MobileUserAgent.php"); |
|---|
| 72 | require_once(CLASS_PATH . "SC_MobileEmoji.php"); |
|---|
| 73 | require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_PageLayout_Ex.php"); |
|---|
| 74 | require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_DB_Ex.php"); |
|---|
| 75 | require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Session_Ex.php"); |
|---|
| 76 | require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mail_Ex.php"); |
|---|
| 77 | require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mobile_Ex.php"); |
|---|
| 78 | include_once($include_dir . "/require_plugin.php"); |
|---|
| 79 |
|
|---|
| 80 | // セッションハンドラ開始
|
|---|
| 81 | $objSession = new SC_Helper_Session_Ex();
|
|---|
| 82 | |
|---|
| 83 | // インストールチェック |
|---|
| 84 | SC_Utils_Ex::sfInitInstall(); |
|---|
| 85 | |
|---|
| 86 | // 携帯端末の場合は mobile 以下へリダイレクトする。 |
|---|
| 87 | if (SC_MobileUserAgent::isMobile()) { |
|---|
| 88 | if (preg_match('|^' . URL_DIR . '(.*)$|', $_SERVER['REQUEST_URI'], $matches)) { |
|---|
| 89 | $path = $matches[1]; |
|---|
| 90 | } else { |
|---|
| 91 | $path = ''; |
|---|
| 92 | } |
|---|
| 93 | |
|---|
| 94 | $url = ""; |
|---|
| 95 | if (SC_Utils_Ex::sfIsHTTPS()) { |
|---|
| 96 | $url = SSL_URL; |
|---|
| 97 | } else { |
|---|
| 98 | $url = SITE_URL; |
|---|
| 99 | } |
|---|
| 100 | header("Location: " |
|---|
| 101 | . SC_Utils_Ex::sfRmDupSlash($url . URL_DIR . "mobile/" . $path)); |
|---|
| 102 | exit; |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | // 絵文字変換 (除去) フィルターを組み込む。 |
|---|
| 106 | ob_start(array('SC_MobileEmoji', 'handler')); |
|---|
| 107 | ?> |
|---|