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 | // {{{ requires |
---|
25 | require_once(CLASS_PATH . "pages/error/LC_Page_Error.php"); |
---|
26 | |
---|
27 | /** |
---|
28 | * エラー表示のページクラス |
---|
29 | * SC_DbConnでエラーが発生した場合の表示ページ |
---|
30 | * |
---|
31 | * @package Page |
---|
32 | * @author LOCKON CO.,LTD. |
---|
33 | * @version $Id$ |
---|
34 | */ |
---|
35 | class LC_Page_Error_SystemError extends LC_Page_Error { |
---|
36 | |
---|
37 | // }}} |
---|
38 | // {{{ functions |
---|
39 | |
---|
40 | /** |
---|
41 | * Page を初期化する. |
---|
42 | * |
---|
43 | * @return void |
---|
44 | */ |
---|
45 | function init() { |
---|
46 | parent::init(); |
---|
47 | |
---|
48 | $this->tpl_title = 'システムエラー'; |
---|
49 | $this->adminPage = $this->isAdminPage(); |
---|
50 | |
---|
51 | if ($this->adminPage) { |
---|
52 | $this->tpl_mainpage = 'login_error.tpl'; |
---|
53 | $this->flame = LOGIN_FRAME; |
---|
54 | } else { |
---|
55 | $this->flame = SITE_FRAME; |
---|
56 | } |
---|
57 | } |
---|
58 | |
---|
59 | /** |
---|
60 | * Page のプロセス。 |
---|
61 | * |
---|
62 | * @return void |
---|
63 | */ |
---|
64 | function process() { |
---|
65 | require_once CLASS_PATH . 'SC_MobileUserAgent.php'; |
---|
66 | |
---|
67 | $objView = null; |
---|
68 | if (SC_MobileUserAgent::isMobile() && $this->adminPage == false) { |
---|
69 | $objView = new SC_InstallView(MOBILE_TEMPLATE_DIR, MOBILE_COMPILE_DIR); |
---|
70 | } elseif($this->adminPage) { |
---|
71 | $objView = new SC_InstallView(TEMPLATE_ADMIN_DIR, COMPILE_ADMIN_DIR); |
---|
72 | } else { |
---|
73 | $objView = new SC_InstallView(TEMPLATE_DIR, COMPILE_DIR); |
---|
74 | } |
---|
75 | |
---|
76 | $this->tpl_error = "システムエラーが発生しました。<br />大変お手数ですが、サイト管理者までご連絡ください。"; |
---|
77 | |
---|
78 | $objView->assignobj($this); |
---|
79 | $objView->display($this->flame); |
---|
80 | } |
---|
81 | |
---|
82 | /** |
---|
83 | * デストラクタ. |
---|
84 | * |
---|
85 | * @return void |
---|
86 | */ |
---|
87 | function destroy() { |
---|
88 | parent::destroy(); |
---|
89 | } |
---|
90 | |
---|
91 | /** |
---|
92 | * 管理機能かどうかを判定する. |
---|
93 | * |
---|
94 | * @return boolean |
---|
95 | */ |
---|
96 | function isAdminPage() { |
---|
97 | return preg_match('|/admin/|', $_SERVER['PHP_SELF']); |
---|
98 | } |
---|
99 | } |
---|
100 | ?> |
---|