Leser: 3
3 Einträge, 1 Seite |
1
2
3
4
<select class="select" name="tag">
<option selected="selected">Tag</option>
<option>01 ... bis ... 31 </option>
</select>
1
2
3
4
<select class="select" name="monat">
<option value="0" selected="selected">Monat</option>
<option value="01">Januar ... bis ... Dezember</option>
</select>
1
2
3
4
<select class="select" name="jahr" size="1">
<option selected="selected">Jahr</option>
<option>2009 ... bis ... 2013</option>
</select>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if (($INPUT{Name} eq "") ||
($INPUT{tag} !~ /^[0-9]*$/) ||
($INPUT{monat} !~ /^[0-9]*$/) ||
($INPUT{jahr} !~ /^[0-9]*$/) ||
($INPUT{Email} eq "") )
{
print "Location: $msg_errmiss\n\n";
exit;
}
if (($INPUT{Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/) ||
($INPUT{Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/))
{
print "Location: $msg_badmail\n\n";
exit;
}
1
2
3
print MAIL "Name: $INPUT{Name}\n";
print MAIL "Datum: $INPUT{tag}.$INPUT{monat}.$INPUT{jahr}\n";
print MAIL "E-Mail-Adresse: $INPUT{Email}\n";
1 2 3 4 5 6 7 8
use Date::Calc qw( check_date ); if ( check_date( $jahr, $monat, $tag ) { # korrektes Datum } else { # inkorrektes Datum, hau dem User was um die Ohren }
1 2 3 4 5 6 7 8 9
$day1 = $INPUT{antag}; $month1 = $INPUT{anmonat}; $year1 = $INPUT{anjahr}; $day2 = $INPUT{abtag}; $month2 = $INPUT{abmonat}; $year2 = $INPUT{abjahr}; ($year,$month,$day) = System_Clock();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use Date::Calc qw( check_date ); if ( check_date( $year1, $month1, $day1 ) { print "Location: $msg_ok\n\n"; exit; } else { print "Location: $msg_badmail\n\n"; exit; } if ( check_date( $year2, $month2, $day2 ) { print "Location: $msg_ok\n\n"; exit; } else { print "Location: $msg_badmail\n\n"; exit; }
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
use Date::Calc qw( Date_to_Days ); if (Date_to_Days($year3,$month3,$day3) <= Date_to_Days($year1,$month1,$day1)) { print "Location: $msg_ok\n\n"; exit; } else { print "Location: $msg_badmail\n\n"; exit; } if (Date_to_Days($year1,$month1,$day1) < Date_to_Days($year2,$month2,$day2)) { print "Location: $msg_ok\n\n"; exit; } else { print "Location: $msg_badmail\n\n"; exit; }
3 Einträge, 1 Seite |