Hallo Rosti,
danke für deinen Einsatz :-). Ich hab jetzt nochmal größere Textstellen aus dem Code rauskopiert und sie in der richtigen Reihenfolge zusammengestellt.
Die Zeile
habe ich eben erst eingefügt. Seitdem wird der Screen nach dem Submit zwar nicht mehr weiß und die Mail wird wieder versendet, aber leider wird für $et immer noch nix mitgesendet.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/perl
use CGI qw(:standard);
# /snip/
sub notify{
my ($aa, $ab, $ac, $ad, $ae)=@_;
my ($et)=param("et");
if ($EMAILPROG and $EMAIL{$aa}){
if ($aa eq 'w'){$ad=" ... $ad"}
$_=$ae; s/<[^>]*>/ /g; s/\s+/ /g; s/(^ | $)//g; # strip out html
$ae=$_?qq! "$_"!:'';
if (open (MAIL, "|$EMAILPROG $EMAIL{$aa}")){
print MAIL "Subject: [$ab]message: $ac. $ad\n";
print MAIL "texttesxttext $ab$ae:\n\n";
print MAIL "\n$et\n";
print MAIL "\n-----------------------------------------\nnoch mehr text-----------------------------------------\n";
close (MAIL);
$err="Your move has been e-mailed to $NAME{$aa}. $err"
}
else{ $err="Warning: had problems e-mailing $NAME{$aa}. $err" }
}
}
# /snip/
sub notify{
my ($plyr, $bd, $mvno, $mv, $title)=@_;
my ($et)=param("et");
if ($EMAILPROG and $EMAIL{$plyr}){
if ($plyr eq 'w'){$mv=" ... $mv"}
$_=$title; s/<[^>]*>/ /g; s/\s+/ /g; s/(^ | $)//g; # strip out html
$title=$_?qq! "$_"!:'';
if (open (MAIL, "|$EMAILPROG $EMAIL{$plyr}")){
print MAIL "Subject: [$bd]Chess: $mvno. $mv\n";
print MAIL "Your opponent (".$COLOUR{other($plyr)}.") just moved on board $bd$title:\n\n";
foreach (@moves){ print MAIL "$_\n" }
print MAIL "\n$et\n";
print MAIL "\n\n$URL/$CGIPATH/$SCRIPT?dj=1&bd=$bd\n";
print MAIL "\n-----------------------------------------\nYou have been notified automatically by\nthe BeholderBoard Virtual Chess-set $VER\n-----------------------------------------\n";
close (MAIL);
$err="Your move has been e-mailed to $COLOUR{$plyr}. $err"
}
else{ $err="Warning: had problems e-mailing $COLOUR{$plyr}. $err" }
}
}
# /snip/
sub printBoard{
my $bd=shift;
my ($y,$x,$isz,$timelapse,$t,$hlch,$hcch,$hmch,$fbch,$form,$status);
my $onUnload='';
# /snip/
if ($plyr){
# /snip/
$emailtextLabel='your text';
$emailtextBox='<input name="et" type="text" size=24 maxlength=255>';
}
else{
# /snip/
}
$form=<<HTML_Form
<table border=0 cellpadding=2 cellspacing=2>
<tr>
# /snip/
<td align=right valign=top><font size=2>$emailtextLabel</font></td>
<td valign=top>$emailtextBox</td>
</tr>
</table>
</td>
</tr>
</table>