#!/usr/bin/perl use CGI; $query = new CGI; $user = $query->remote_user(); $file = $query->param('filename'); $from_name = $query->param('from-name'); $from_mail = $query->param('from-mail'); $from_phone = $query->param('from-phone'); $from_fax = $query->param('from-fax'); $to_name = $query->param('to-name'); $to_fax = $query->param('to-fax'); $to_firm = $query->param('to-firm'); $regarding = $query->param('regarding'); $text = $query->param('text'); $destination = join ("", $to_name,"@",$to_fax); $mail = $from_name." <".$from_mail.">"; $text =~ s/\\/\\\\/g; $text =~ s/\'/\`/g; $text =~ s/\\/\\\\/g; $text =~ s/\"/\\"/g; $text =~ s/\t/\ \ \ \ \ \ \ \ /g; $text =~ s/Ä/Ae/g; $text =~ s/Ö/Oe/g; $text =~ s/Ü/Ue/g; $text =~ s/ä/ae/g; $text =~ s/ö/oe/g; $text =~ s/ü/ue/g; $text =~ s/ß/ss/g; $text =~ s/^M//g; if ($from_name eq "") { $error.="
\n"; print "Von Name: " ,$from_name,"\n"; print " Tel.-Nr.: " ,$from_phone,"\n"; print " Fax-Nr.: " ,$from_fax,"\n\n"; print "An Name: " ,$to_name,"\n"; print " Fax-Nr.: " ,$to_fax,"\n"; print " Firma: " ,$to_firm,"\n\n"; print "Betrifft: " ,$regarding,"\n\n"; print "File: " ,$file,"\n\n"; print "\n"; print "
\n"; print `/usr/local/bin/sendfax -h fax.chemnitz.debis-sfi.de -c '$text' -s a4 -r '$regarding' -x '$to_firm' -D -R -f '$mail' -d '$destination' -X '$from_fax' -F '$from_phone' 2>&1 /tmp/fax-$$.raw`; print "\n
"; print "