OpenSencillo
2015.009
Long live the simplicity of PHP
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
All
Data Structures
Namespaces
Files
Functions
Pages
cookies.manager.cksman.php
1
<?php
2
/*~ cookies.php
3
.---------------------------------------------------------------------------.
4
| Software: Sencillo Cookies |
5
| Version: 2015.003 |
6
| Contact:
[email protected]
|
7
| ------------------------------------------------------------------------- |
8
| Author: Bc. Peter Horváth (original founder) |
9
| Copyright (c) 2015, Bc. Peter Horváth. All Rights Reserved. |
10
| ------------------------------------------------------------------------- |
11
| License: Distributed under the General Public License (GPL) |
12
| http://www.gnu.org/licenses/gpl-3.0.html |
13
| This program is distributed in the hope that it will be useful - WITHOUT |
14
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15
| FITNESS FOR A PARTICULAR PURPOSE. |
16
'---------------------------------------------------------------------------'
17
~*/
27
class
getCookies
28
{
29
private
$name;
30
private
$expiration;
31
private
$data;
32
36
public
function
__construct
()
37
{
38
$this->expiration = time()+3600;
39
}
40
45
public
function
setExpiration
($time)
46
{
47
$this->expiration = time()+($time*60);
48
}
49
55
public
function
addCookie
($name,$data)
56
{
57
$this->name = $name;
58
59
$this->data = $data;
60
setcookie($this->name,$this->data,$this->expiration);
61
}
62
67
public
function
removeCookie
($name)
68
{
69
$this->name = $name;
70
71
setcookie($this->name,
""
,time()-3600);
72
}
73
79
public
function
getCookie($name)
80
{
81
$this->name = $name;
82
83
return
$_COOKIE[$this->name];
84
}
85
}
86
?>
fw_libraries
cookies.manager.cksman.php
Generated on Mon Apr 11 2016 20:51:40 for OpenSencillo by
1.8.3