<?php 
ini_set('session.cookie_lifetime', 60 * 60 * 24 * 365);
ini_set('session.gc-maxlifetime', 60 * 60 * 24 * 365);
session_start();?>
<?php 
if (isSet($_SESSION['started'])){
    if((time() - $_SESSION['started'] - 60*60*24) > 0){
     $_SESSION['started'] = time();
     $_SESSION['old_inquiry_token'] = $_SESSION['inquiry_token'];
	 $_SESSION['form_count'] = 'true';
	 $inquiry_token = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
     $_SESSION['inquiry_token'] = $inquiry_token;
    }
}
else {
	if(isset($_SESSION['old_inquiry_token'])){
		$_SESSION['old_inquiry_token'] = $_SESSION['inquiry_token'];
	} else {$_SESSION['old_inquiry_token'] = '';}
    $_SESSION['started'] = time();
	$inquiry_token = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
    $_SESSION['inquiry_token'] = $inquiry_token;
	$_SESSION['form_count'] = 'true';
};
if (isSet($_SESSION['started_c'])){
    if((time() - $_SESSION['started_c'] - 60*60*24) > 0){
     $_SESSION['started_c'] = time();
     $_SESSION['old_inquiry_token_c'] = $_SESSION['inquiry_token_c'];
	 $_SESSION['form_count_c'] = 'true';
	 $inquiry_token_c = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
     $_SESSION['inquiry_token_c'] = $inquiry_token_c;
    }
}
else {
	if(isset($_SESSION['old_inquiry_token_c'])){
		$_SESSION['old_inquiry_token_c'] = $_SESSION['inquiry_token_c'];
	} else {$_SESSION['old_inquiry_token_c'] = '';}
    $_SESSION['started_c'] = time();
	$inquiry_token_c = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
    $_SESSION['inquiry_token_c'] = $inquiry_token_c;
	$_SESSION['form_count_c'] = 'true';
};
if (isSet($_SESSION['started_f'])){
    if((time() - $_SESSION['started_f'] - 60*60*24) > 0){
     $_SESSION['started_f'] = time();
     $_SESSION['old_inquiry_token_f'] = $_SESSION['inquiry_token_f'];
	 $_SESSION['form_count_f'] = 'true';
	 $inquiry_token_f = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
     $_SESSION['inquiry_token_f'] = $inquiry_token_f;
    }
}
else {
    if(isset($_SESSION['old_inquiry_token_f'])){
		$_SESSION['old_inquiry_token_f'] = $_SESSION['inquiry_token_f'];
	} else {$_SESSION['old_inquiry_token_f'] = '';}
    $_SESSION['started_f'] = time();
	$inquiry_token_f = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@", 55)), 0, 55);
    $_SESSION['inquiry_token_f'] = $inquiry_token_f;
	$_SESSION['form_count_f'] = 'true';
};
?>