% use FV; use CGI qw(:standard); my $cgi = new CGI(); for($cgi->param()) { @{$cgi->{param}{$_}}[0] =~ s/\'|\"|\)|\(|\;|\-|\||\<|\>|\!|\.|\#//g; } my $debug = 0; # set 0 in production my @debugInfo; my $RefID = FV::GetCookie('RefID'); # Do an initial check for an existing RefID cookie if($RefID !~ /^[aA0-9]\d{4}$/) { $RefID = ''; } # first test of the RefID, test again before set if(!$RefID) { # If we still have no RefID then lets do a domain to refID translation $RefID = FV->TrakkerTran(); if($RefID) { if($RefID =~ /^[aA0-9]\d{4}$/) { FV::PrintCookie('RefID',$RefID,1); } else { $RefID = ''; } push(@debugInfo, "REFID by DTR: $RefID"); } else { # if there is still no RefID lets look for one on the URI if(!$RefID) { if($ENV{REQUEST_URI} =~ /.*\b\d{5}\/?$/) { $URI =~ s/^(.*)(\d{5})\/{0,1}$//; $RefID = $2; } elsif($ENV{REQUEST_URI} =~ /.*a\d{4}\/{0,1}$/i) { $ENV{REQUEST_URI} =~ s/^(.*)(a\d{4})\/{0,1}$//i; $RefID = $2; } if($RefID) { if($RefID =~ /^[aA0-9]\d{4}$/) { FV::PrintCookie('RefID',$RefID,1); } else { $RefID = ''; } push(@debugInfo, "REFID by URI: $RefID"); } else { # If still no cookie was found with a RefID start hunting for one via CGI $RefID = $cgi->param('RefID'); if($RefID) { if($RefID =~ /^[aA0-9]\d{4}$/) { FV::PrintCookie('RefID',$RefID,1); } else { $RefID = ''; } push(@debugInfo, "REFID by CGI: $RefID"); } } } } } # Dump the debug data. if($debug) { print "\n"; } %>
|
We understand that time is precious to a new business. So let FreedomVoice save you time by setting up your system for you! Follow these simple steps:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||