|< 1 2 3 4 ... 13 >| | 125 Einträge, 13 Seiten |
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
sub suchen {
my $db="DBI:mysql:produkte";
my $user="";
my $pass="";
my $dbh = DBI->connect($db,$user,$pass) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM tbl0011990 where ident_nr = '$identnr'";
my $sth_suchen=$dbh->prepare($statement_suchen) or die $DBI::errstr;
$sth_suchen->execute;
my %hash;
while (my @row = $sth_suchen->fetchrow_array()) {
$hash{identnr} = $row[0];
$hash{doctyp} = $row[2];
$hash{docname} = $row[3];
$hash{head_de} = $row[4] if ($row[1] eq 'DE');
$hash{head_en} = $row[4] if ($row[1] eq 'EN');
$hash{head_fr} = $row[4] if ($row[1] eq 'FR');
$hash{deutsch} = $row[5] if ($row[1] eq 'DE');
$hash{englisch} = $row[5] if ($row[1] eq 'EN');
$hash{franz} = $row[5] if ($row[1] eq 'FR');
$hash{ersteller}= $row[7];
$hash{werk} = $row[8];
$hash{check1} = $row[9];
$hash{check2} = $row[10];
$hash{check3} = $row[11];
$hash{check4} = $row[12];
}
such_eintr(\%hash);
$sth_suchen->finish();
$dbh->disconnect();
}
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
sub suchen {
my $db="DBI:mysql:produkte";
my $user="";
my $pass="";
my $dbh = DBI->connect($db,$user,$pass) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM tbl0011990 where ident_nr = '$identnr'";
my $sth_suchen=$dbh->prepare($statement_suchen) or die $DBI::errstr;
$sth_suchen->execute;
my %hash;
while (my @row = $sth_suchen->fetchrow_array()) {
$hash{identnr} = $row[0];
$hash{doctyp} = $row[2];
$hash{docname} = $row[3];
$hash{head_de} = $row[4] if ($row[1] eq 'DE');
$hash{head_en} = $row[4] if ($row[1] eq 'EN');
$hash{head_fr} = $row[4] if ($row[1] eq 'FR');
$hash{deutsch} = $row[5] if ($row[1] eq 'DE');
$hash{englisch} = $row[5] if ($row[1] eq 'EN');
$hash{franz} = $row[5] if ($row[1] eq 'FR');
$hash{ersteller}= $row[7];
$hash{werk} = $row[8];
$hash{check1} = $row[9];
$hash{check2} = $row[10];
$hash{check3} = $row[11];
$hash{check4} = $row[12];
}
my $stmt_docnames = "SELECT docnames FROM tbl0011990 WHERE ident_nr = ?";
my $sth_docnames = $dbh->prepare($stmt_docnames) or die $dbh->errstr();
$sth_docnames->execute() or die $dbh->errstr();
my %hash_docs;
while(my ($doc) = $sth_docnames->fetchrow_array()){
$hash_docs{$doc}++;
}
if(scalar(keys(%hash_docs)) > 1){
doc_vorhanden(%hash_docs);
}
else{
such_eintr(\%hash);
}
$sth_suchen->finish();
$dbh->disconnect();
}
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
sub such_eintr {
my ($param)=@_;
print "<HTML>\n";
print "<HEAD><TITLE>FORMULAR</TITLE>";
print "</HEAD>\n<BODY>\n";
if ($suchen){ #### Zeile 225
print '<span style="font-size:20pt"><center><b>Dokumententyp:'.$param->{doctyp}.'</
b></center></span>';
}
elsif ($eintragen) {
print '<span style="font-size:20pt"><center><b>Dokumententyp: '.$doctyp.'</b></center></span>';
}
print '<form method="POST" action="/cgi-bin/frontl.cgi">';
print "<p>Ident-Nummer:";
print '<INPUT name="identnr" size="20" maxlength="15" value='.$identnr.'> ';
if ($suchen) {
print '<INPUT name="suchen" TYPE="submit" VALUE="Suchen">';
}
print "<p>DE:<br>";
print '<input name="head_de" type="text" size="50" value='.$param->{head_de}.'><br>';
if ($doctyp eq 'EI') {
print '<textarea name="deutsch" cols="50" rows="5">'.$param->{deutsch}.'</textarea>';
}
print "<p>EN:<br>";
print '<input name="head_en" type="text" size="50" value='.$param->{head_en}.'><br>';
if ($doctyp eq 'EI') {
print '<textarea name="englisch" cols="50" rows="5">'.$param->{englisch}.'</textarea>';
}
print "<p>FR:<br>";
print '<input name="head_fr" type="text" size="50" value='.$param->{head_fr}.'><br>';
if ($doctyp eq 'EI') {
print '<textarea name="franz" cols="50" rows="5">'.$param->{franz}.'</textarea>'; ###$franz
}
1
2
print '<span style="font-size:20pt"><center><b>Dokumententyp:'.$param->{doctyp}.'</
b></center></span>';
print qq~<span style="font-size:20pt"><center><b>Dokumententyp:$param->{doctyp}</b></center></span>~;
Quotees gehen auch andere, z.B. qq(...) qq{...} qq|...| qq<...> qq#...# qq/.../ (das trennzeichen darf halt nicht im text vorkommen)
|< 1 2 3 4 ... 13 >| | 125 Einträge, 13 Seiten |