<?php
//This code is copyright (c) ViciSoft SL, all rights reserved.
//The contents of this file are protected under law as the intellectual property 
//of ViciSoft SL. Any use, reproduction, disclosure or copying of any kind 
//without the express and written permission of ViciSoft SL is forbidden.
//Author: Vince Reid, vincereid@gmail.com
if(trim(@$_GET['id1'])!='' && trim(@$_GET['id2'])!=''){
	setcookie('id1',@$_GET['id1'],time()+16000000,'/','',@$_SERVER['HTTPS']=='on');
	setcookie('id2',@$_GET['id2'],time()+16000000,'/','',@$_SERVER['HTTPS']=='on');
}elseif(trim(@$_GET['PARTNER'])!=''){
	setcookie('PARTNER',trim(@$_GET['PARTNER']),time()+(60*60*24*(int)@$_GET['EXPIRES']),'/');
}elseif(trim(@$_GET['DELCK'])=='yes'){
	setcookie('WRITECKL','',time()-2592000,'/','',@$_SERVER['HTTPS']=='on');
	setcookie('WRITECKP','',time()-2592000,'/','',@$_SERVER['HTTPS']=='on');
}elseif(trim(@$_GET['WRITECLL'])!=''){
	$thetimelim=trim(@$_GET['permanent'])=='Y'?time()+(60*60*24*365):0;
	setcookie('WRITECLL',trim(@$_GET['WRITECLL']),$thetimelim,'/','',@$_SERVER['HTTPS']=='on');
	setcookie('WRITECLP',trim(@$_GET['WRITECLP']),$thetimelim,'/','',@$_SERVER['HTTPS']=='on');
}elseif(trim(@$_GET['DELCLL'])!=''){
	setcookie('WRITECLL','',time()-2592000,'/','',@$_SERVER['HTTPS']=='on');
	setcookie('WRITECLP','',time()-2592000,'/','',@$_SERVER['HTTPS']=='on');
}
flush();
?>
