input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); } } // -------------------------------------------------------------------- /** * Fetch an item from the COOKIE array * * @access public * @param string * @param bool * @return mixed */ if ( ! function_exists('get_cookie')) { function get_cookie($index = '', $xss_clean = FALSE) { $CI =& get_instance(); $prefix = (isset($_COOKIE[$index])) ? '' : config_item('cookie_prefix'); return $CI->input->cookie($prefix.$index, $xss_clean); } } // -------------------------------------------------------------------- /** * Delete a COOKIE * * @param mixed * @param string the cookie domain. Usually: .yourdomain.com * @param string the cookie path * @param string the cookie prefix * @return void */ if ( ! function_exists('delete_cookie')) { function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') { set_cookie($name, '', '', $domain, $path, $prefix); } } /* End of file cookie_helper.php */ /* Location: ./system/helpers/cookie_helper.php */