-
session_start(); function inStr ($needle, $haystack) { $needlechars = strlen($needle); //gets the number of characters in our needle $i = 0; for($i=0; $i < strlen($haystack); $i++) //creates a loop for the number of characters in our haystack { if(substr($haystack, $i, $needlechars) == $needle) //checks to see if the needle is in this segment of the haystack { return TRUE; //if it is return true } } return FALSE; //if not, return false } if (isset($_SESSION['cl'])) { $_SESSION['cl'] = $_SESSION['cl']; } elseif (isset($_GET['lc'])) { $_SESSION['cl'] = $_GET['lc']; } else { if (inStr("aktivcolournorway", $_SERVER['HTTP_REFERER'])) { $_SESSION['cl']= "no"; } } include("lang/lang.php"); ?>