source: branches/feature-module-paygent/data/class/SC_Cookie.php @ 17

Revision 17, 482 bytes checked in by uehara, 14 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_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.