2 Einträge, 1 Seite |
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
#!/usr/bin/perl
read(STDIN, $Daten, $ENV{'CONTENT_LENGTH'});
open(COMMENTS, ">>data.txt"); # HTML-Datei zum Schreiben öffnen
$Daten =~ tr/&=+/| -/;
$Daten =~ s/Name/\ \;/g;
$Daten =~ s/Firstname/\ \;/g;
$Daten =~ s/Street/\ \;/g;
$Daten =~ s/Nr/\ \;/g;
$Daten =~ s/%2F/\/\;/g;
$Daten =~ s/Code/\ \;/g;
$Daten =~ s/City/\ \;/g;
$Daten =~ s/Tel/\ \;/g;
$Daten =~ s/eMail/\ \;/g;
$Daten =~ tr/;/ /;
$Daten =~ s/[ ]| //gi;
#$Daten =~ s/+/\-\;/g;
print COMMENTS "$Daten\n";
close(COMMENTS);
print "Content-type: text/html\n\n";
print "<html><head><TITLE>visualVIBES bioNET</TITLE></head>\n";
print "<body bgColor=#dcd299>\n";
print "<i style=color:#FF6633 style=font-family:Arial style=font-weight:bold style=font-size:50pt style=filter:Glow(color=#FF5522, strength=10)>your entry has been saved </a></i>";
print "<p><hr noshade size=1><p>";
print "<i style=color:#FF6633 style=font-family:Arial style=font-size:50pt><a href=\"http://localhost/index.html\>back</a></i>....";
print "</body>\n";
print "</html>\n";
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
#! /usr/bin/perl
use strict;
use diagnostics;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $cgi = CGI->new();
my %params = $cgi->Vars();
print $cgi->header(-type => 'text/html');
my $file = './data.txt';
open(R_FILE,"<$file") or die($!);
my @entries = <R_FILE>;
close R_FILE;
foreach(@entries){
if($_ =~ /^$params{input_text_name}/){
$_ = "";
}
}
open(W_TXT,">$file") or die($!);
print $_ for(@entries);
close W_TXT;
print "Der Eintrag $params{input_text_name} wurde gelöscht";
2 Einträge, 1 Seite |