source: branches/version-2_5-dev/data/class/SC_CampaignSession.php @ 19547

Revision 19547, 3.1 KB checked in by Seasoft, 11 years ago (diff)

#628(未使用処理・定義などの削除)

  • SC_Utils#sfDomainSessionStart
  • Property svn:eol-style set to LF
  • 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-2010 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/* キャンペーン管理クラス
25 *
26 * @deprecated キャンペーン機能は廃止のため使用しない.
27 *             このクラスに依存している実装を改修後, このクラスを削除する.
28 */
29class SC_CampaignSession {
30    var $key;
31    var $campaign_id = 'campaign_id';
32    var $is_campaign = 'is_campaign';
33    var $campaign_dir = 'campaign_dir';
34
35    /* コンストラクタ */
36    function SC_CampaignSession($key = "campaign") {
37        $this->key = $key;
38    }
39
40    /* キャンペーンIDをセット */
41    function setCampaignId($campaign_id) {
42        $_SESSION[$this->key][$this->campaign_id] = $campaign_id;
43    }
44
45    /* キャンペーンIDを取得 */
46    function getCampaignId() {
47        return $_SESSION[$this->key][$this->campaign_id];
48    }
49
50    /* キャンペーンページからの遷移情報を保持 */
51    function setIsCampaign() {
52        $_SESSION[$this->key][$this->is_campaign] = true;
53    }
54
55    /* キャンペーンページからの遷移情報を取得 */
56    function getIsCampaign() {
57        return isset($_SESSION[$this->key][$this->is_campaign]) ? $_SESSION[$this->key][$this->is_campaign] : false;
58    }
59
60    /* キャンペーン情報を削除 */
61    function delCampaign() {
62        unset($_SESSION[$this->key]);
63    }
64
65    /* キャンペーンディレクトリ名をセット */
66    function setCampaignDir($campaign_dir) {
67        $_SESSION[$this->key][$this->campaign_dir] = $campaign_dir;
68    }
69
70    /* キャンペーンディレクトリ名を取得 */
71    function getCampaignDir() {
72        return isset($_SESSION[$this->key][$this->campaign_dir])
73                ? $_SESSION[$this->key][$this->campaign_dir] : "";
74    }
75
76    /* キャンペーンページならフレームを変更 */
77    function pageView($objView, $site_frame = SITE_FRAME) {
78        // XXX キャンペーン削除で不具合があったので、応急処置をしています。(テスト不十分)
79        if ($this->getIsCampaign()) {
80            $site_frame_campaign = CAMPAIGN_TEMPLATE_PATH . $this->getCampaignDir()  . "/active/site_frame.tpl";
81            if (file_exists($site_frame_campaign)) {
82                $site_frame = $site_frame_campaign;
83            }
84        }
85        $objView->display($site_frame);
86    }
87}
88?>
Note: See TracBrowser for help on using the repository browser.