unit suncgi; interface uses Windows; procedure Main ; implementation var InParams :string ; procedure InitParams ; var SS:string ; begin SetLength(SS,10000); GetEnvironmentVariable('QUERY_STRING',@SS[1],2000); InParams:=PChar(@SS[1]); end; function HexToInt(CH: char): integer; begin Result:=0; case CH of '0'..'9': Result:=Ord(CH)-Ord('0'); 'A'..'F': Result:=Ord(CH)-Ord('A')+10; 'a'..'f': Result:=Ord(CH)-Ord('a')+10; end; end; function Decode(Value: string): string; var I, L: integer; begin Result:=''; L:=0; for I:=1 to Length(Value) do begin if(Value[I]<>'%') and (Value[I]<>'+') and (L<1) then begin Result:=Result+Value[I]; end else begin if(Value[I]='+') then Result:=Result+' ' else if(Value[I]='%') then begin L:=2; if(I0 do begin K:=Pos('&',SS); if(K<>0) then begin ST:=Copy(SS,1,K-1); SS:=Copy(SS,K+1,10000); end else begin ST:=SS; SS:=''; end; K:=Pos('=',ST); if(K<>0) then begin if(Name=Copy(ST,1,K-1)) then begin Result:=Decode(Copy(ST,K+1,6000)); end; end; end; end; procedure Main; var firstName,LastName,MiddleName,Age,Sex,EMail:string; begin InitParams; LastName:=ParamByName ('LastName'); firstName:=ParamByName('FirstName'); MiddleName:=ParamByName('MiddleName'); Age:=ParamByName('Age'); Sex:=ParamByName('Sex'); Email:=ParamByName('EMail'); WriteLn('Content-Type: text/html'); WriteLn; WriteLn(''); WriteLn(''); WriteLn('Информация которую вы ввели в поля формы'); WriteLn('
') ; WriteLn(' Фамилия: '+LastName+''); WriteLn ('

'); WriteLn(' Имя: '+firstName+''); WriteLn ('

'); WriteLn(' Отчество: '+MiddleName+'' ); WriteLn ('

'); WriteLn(' Возраст: '+Age+''); WriteLn ('

'); WriteLn(' Пол: '+Sex+''); WriteLn ('

') ; WriteLn(' E-Mail adress: '+Email+''); WriteLn(''); WriteLn(''); end; end.