|
Returns the value of a variable that has been stored in the client machine. |
|
VarName |
Name of the Cookie variable |
|
global
function string 10 ToolWebNGGetCountry()
begin
transaction string 60 gCountryCode;
string 255 country;
country = gCountryCode;
if (blank(country)) then begin
country = GetCookie("country");
end;
if (blank(country)) then begin
country = WebGetArg("cc");
end;
if (blank(country)) then begin
//figure out from logged in customer's enabler country
if (LoginState) then begin
country = FindCountryFromHMCompany;
end;
if (blank(country)) then begin
country = FindCountryByHostname;
end;
if (blank(country)) then begin
country = "unknown";
country = "global"; //temporary fix - dont show world map to new visitors
end;
UpdateWebCountry(country);
end;
if (country=="unknown") then begin
country = "";
end;
//for testing
if (nonblank(WebGetArg("test"))) then begin
country = WebGetArg("cc");
end;
ToolWebNGGetCountry = country;
return;
end;
««