#!/usr/bin/perl # # Version vom 10.12.03 # # perl V 5.6.1 oder groesser notwendig # # use strict; use CGI qw(:standart); use CGI::Carp qw(fatalsToBrowser); use Fcntl qw(:DEFAULT); use vars qw($lastError); my $q = CGI->new(); print "Content-Type: text/html\n\n"; #read input parameters my $username = $q->param("username"); my $firstname = $q->param("firstname"); my $telephone = $q->param("telephone"); my $zipcode = $q->param("zipcode"); my $areacode = $q->param("areacode"); my $country = $q->param("country"); my $street = $q->param("street"); my $town = $q->param("town"); my $email = $q->param("email"); my $fax = $q->param("fax"); my $link = $q->param("link"); my $category = $q->param("category"); my $subcategory = $q->param("subcategory"); my $categoryID = $q->param("categoryID"); my $subcategoryID = $q->param("subcategoryID"); my $adverttype = $q->param("adverttype"); my $busitype = $q->param("busitype"); my $advertheader = $q->param("advertheader"); my $advertbody = $q->param("advertbody"); my $adults_only = $q->param("adults_only"); my $advertID = $q->param("advertID"); my $action = $q->param("action"); my $xml = $q->param("xml"); # Get the current time. my($date) = scalar(localtime()); # Append the data to a file. open(F, ">>tester.txt"); print F "From $0 at $date\n"; #for $key (keys %CGI) { # print F "$key => $CGI{$key}\n"; #} print F "Name: $username \n"; print F "Vorname: $firstname \n"; print F "Telefon: $telephone \n"; print F "PLZ: $zipcode \n"; print F "Vorwahl: $areacode \n"; print F "Land-Vorwahl: $country \n"; print F "Strasse: $street \n"; print F "Stadt: $town \n"; print F "Email: $email \n"; print F "Fax: $fax \n"; print F "URL: $link \n"; print F "Kategorie: $category \n"; print F "Unterkategorie: $subcategory \n"; print F "KategorieID: $categoryID \n"; print F "SubkategorieID: $subcategoryID \n"; print F "Suchen-Bieten: $adverttype \n"; print F "Privat-Gesch: $busitype \n"; print F "Anzeigenkopf: $advertheader \n"; print F "Anzeigentext: $advertbody \n"; print F "Nur für Erwachsene: $adults_only \n"; print F "ID der Anzeige: $advertID \n"; print F "Action: $action \n"; print F "XML-String: $xml \n"; close(F); #print "
\n"; receiveAdsImage($q) or die ("FATAL: receiveAdsImage fatal error: ".defined($lastError)?$lastError:$!."\n"); my $resHash; $resHash->{'duration'} = escapeString('30'); $resHash->{'link'} = escapeString('http://www.test.de'); $resHash->{'comment'} = escapeString('Anzeigenschleuder - Test: dieses Skript erhalten die Maerkte im Mitglied-Bereich unter: cgi-submission -> test.cgi'); printXMLResponce($resHash); #print "\n"; exit; #recieve and store advert image file if exist sub receiveAdsImage { my($query) = @_; $lastError = undef; unless (defined($query->param('asimage')) && ($query->param('asimage') !~ /^\w*$/)) { return 1; } else { #T print $query->param('asimage')."