bludit/bl-kernel/helpers/cookie.class.php

26 lines
390 B
PHP
Raw Normal View History

2015-08-03 02:49:12 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
2015-03-08 18:02:59 +01:00
class Cookie {
public static function get($name)
{
if(isset($_COOKIE[$name]))
{
return($_COOKIE[$name]);
}
return(false);
}
public static function add($name, $value, $expire = 525600)
{
setcookie($name, $value, time() + ($expire * 60));
}
2015-08-03 02:49:12 +02:00
public static function isSet($name)
2015-03-08 18:02:59 +01:00
{
return(isset($_COOKIE[$name]));
}
}