#!/usr/bin/perl use CGI; $query = new CGI; $user = $query->remote_user(); $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/\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; $out_text = $text; $text =~ s/\"/\\"/g; $text =~ s/\\/\\\\/g; $text =~ s/ //g; print $query->header; print "\n
\n"; print "| \n"; print " | \n";
if ($from_name eq "") { $error.="Fax wird gesendet:\n"; print "\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 "Text: \n" ,$out_text,"\n\n"; print "\n"; print " Die Ausgabe des Programms sendfax:\n\n"; print `/usr/local/bin/faxcover -C /usr/local/lib/fax/single-page.ps -s a4 -c '$text' -f '$from_name' -n '$to_fax' -p 1 -r '$regarding' -t '$to_name' -F '$from_phone' -P '$from_fax' -x '$to_firm' | /usr/local/bin/sendfax -h fax.chemnitz.debis-sfi.de -s a4 -R -n -f '$mail' -d '$to_fax' 2>&1`; print "\n "; print " Wenn die Übertragung des Faxes aus irgendwelchen Gründen nicht gelingen sollte werden Sie per Email automatisch informiert, aber auch bei erfolgter Übertragung (deswegen ist auch die Angabe der Email-Adresse so wichtig)\n "; print " \n\nChemnitz FaxServer; ",`date`,"\n\n"; print " |