|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/www/shopsite-images/en-EU/javascript/ |
Upload File : |
function set_cookie(name, value, expirationDays) {
let cookie = name + "=" + value + ";SameSite=Lax;";
if(document.location.protocol == 'https:') cookie += 'Secure;';
cookie += "Max-Age="+(expirationDays*86400);
document.cookie = cookie;
}
function get_cookie(c_name) {
if (document.cookie.length>0)
{
var c_start=document.cookie.indexOf(c_name+"=");
if (c_start != -1)
{
c_start=c_start + c_name.length+1;
var c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1)
c_end=document.cookie.length;
var cookie = unescape(document.cookie.substring(c_start,c_end));
return cookie;
}
}
return null;
}