source: branches/feature-module-update/data/class/SC_Cookie.php @ 15532

Revision 15532, 516 bytes checked in by nanasess, 17 years ago (diff)

svn:mime-type 修正

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
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_Cookie {
10   
11    var $expire;
12   
13    // コンストラクタ
14    function SC_Cookie($day = 365) {
15        // 有効期限
16        $this->expire = time() + ($day * 24 * 3600);
17    }
18   
19    // クッキー書き込み
20    function setCookie($key, $val) {
21        setcookie($key, $val, $this->expire, "/", DOMAIN_NAME);
22    }
23   
24    // クッキー取得
25    function getCookie($key) {
26        return $_COOKIE[$key];
27    }
28}
29?>
Note: See TracBrowser for help on using the repository browser.