source: branches/dev/data/class/SC_CampaignSession.php @ 17

Revision 17, 1.6 KB checked in by uehara, 16 years ago (diff)
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8/* ¥­¥ã¥ó¥Ú¡¼¥ó´ÉÍý¥¯¥é¥¹ */
9class SC_CampaignSession {
10    var $key;
11    var $campaign_id;
12    var $campaign_dir;
13    var $campaign_id = 'campaign_id';
14    var $is_campaign = 'is_campaign';
15    var $campaign_dir = 'campaign_dir';
16   
17    /* ¥³¥ó¥¹¥È¥é¥¯¥¿ */
18    function SC_CampaignSession($key = "campaign") {
19        sfDomainSessionStart();
20        $this->key = $key;
21    }
22
23    /* ¥­¥ã¥ó¥Ú¡¼¥óID¤ò¥»¥Ã¥È */
24    function setCampaignId($campaign_id) {
25        $_SESSION[$this->key][$this->campaign_id] = $campaign_id;
26    }
27   
28    /* ¥­¥ã¥ó¥Ú¡¼¥óID¤ò¼èÆÀ */
29    function getCampaignId() {
30        return $_SESSION[$this->key][$this->campaign_id];
31    }
32           
33    /* ¥­¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤«¤é¤ÎÁ«°Ü¾ðÊó¤òÊÝ»ý */
34    function setIsCampaign() {
35        $_SESSION[$this->key][$this->is_campaign] = true;
36    }
37
38    /* ¥­¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤«¤é¤ÎÁ«°Ü¾ðÊó¤ò¼èÆÀ */
39    function getIsCampaign() {
40        return $_SESSION[$this->key][$this->is_campaign];
41    }
42
43    /* ¥­¥ã¥ó¥Ú¡¼¥ó¾ðÊó¤òºï½ü */
44    function delCampaign() {
45        unset($_SESSION[$this->key]);
46    }
47
48    /* ¥­¥ã¥ó¥Ú¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¥»¥Ã¥È */
49    function setCampaignDir($campaign_dir) {
50        $_SESSION[$this->key][$this->campaign_dir] = $campaign_dir;
51    }
52   
53    /* ¥­¥ã¥ó¥Ú¡¼¥ó¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¼èÆÀ */
54    function getCampaignDir() {
55        return $_SESSION[$this->key][$this->campaign_dir];
56    }
57   
58    /* ¥­¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤Ê¤é¥Õ¥ì¡¼¥à¤òÊѹ¹ */
59    function pageView($objView, $site_frame = SITE_FRAME) {
60        if($this->getIsCampaign()) {
61            $objView->display(CAMPAIGN_TEMPLATE_PATH . $this->getCampaignDir()  . "/active/site_frame.tpl");
62        } else {
63            $objView->display($site_frame);
64        }
65    }
66}
67?>
Note: See TracBrowser for help on using the repository browser.