#!/usr/bin/perl
#############################################################
##            ExchangeVisits    Version  3.00              ##
##            February 2003  Ust-Nera  Russia              ##
##            All rights  ScriptZaWM&RuScript              ##
##            Web  http://www.script.zawm.biz              ##
##            Support scripts script@zawm.biz              ##
#############################################################
require "config.pl";
if($ENV{'REQUEST_METHOD'} eq 'GET'){$query=$ENV{'QUERY_STRING'}}
elsif($ENV{'REQUEST_METHOD'} eq 'POST'){sysread(STDIN,$query,$ENV{'CONTENT_LENGTH'})}
@formfields=split(/&/,$query);
sub urldecode{
local($val)=@_;
$val=~s/\+/ /g;
$val=~s/%([0-9a-hA-H]{2})/pack('C',hex($1))/ge;
return $val;}
foreach (@formfields){chomp($_);
($f_n,$f_v)=split(/=/,$_);
$f_n=&urldecode($f_n);
$f_v=&urldecode($f_v);
$in{$f_n}=$f_v;}
print "Content-Type: text/html\n\n";
print qq~
<html><head><title>Серфинг пользователя $in{'user'} </title></head>
<frameset framespacing="0" border="0" rows="60,*" frameborder="0">
<frame name="header" scrolling="no" target="main" src="auto.cgi?user=$in{'user'}" noresize>
<frame name="main" src="$htmlurl/wait.htm" scrolling="auto">
<noframes><body topmargin="0" leftmargin="0"></body></noframes></frameset></html>
~;

