123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- if ( ! function_exists('set_cookie'))
- {
-
- function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL)
- {
-
- get_instance()->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly);
- }
- }
- if ( ! function_exists('get_cookie'))
- {
-
- function get_cookie($index, $xss_clean = NULL)
- {
- is_bool($xss_clean) OR $xss_clean = (config_item('global_xss_filtering') === TRUE);
- $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix');
- return get_instance()->input->cookie($prefix.$index, $xss_clean);
- }
- }
- if ( ! function_exists('delete_cookie'))
- {
-
- function delete_cookie($name, $domain = '', $path = '/', $prefix = '')
- {
- set_cookie($name, '', '', $domain, $path, $prefix);
- }
- }
|