![]() |
|< 1 2 3 4 5 6 7 ... 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
my @produkte;
while (my @row = $sth_suchen->fetchrow_array()) {
my %hash;
$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];
push @produkte, \%hash;
}
1
2
3
4
5
6
7
my %hash_docs;
while(my ($doc) = $sth_docnames->fetchrow_array()){
$hash_docs{$doc}++;
}
if(scalar(keys(%hash_docs)) > 1){
doc_vorhanden(%hash_docs);
}
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
sub doc_vorhanden {
print "<html>\n";
print "<head><title>FORMULAR</title></head>\n";
print "<body>";
print '<span style="font-size:20pt"><center><b>Bestellhinweis</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.'> ';
print '<input name="suchen" TYPE="submit" VALUE="Suchen">';
print '<p>';
print '<table border="1" rules="groups">
<colgroup>
<col width="50">
<col width="80">
<col width="300">
<col width="50">
</colgroup>
<thead>
<tr>
<th>doc_typ</th>
<th>doc_name</th>
<th>headline</th>
</tr></thead>
<tbody>
<tr> ## Für jeden verschiedenen docnamen neue Zeile
<td>'.$doctyp.'</td>
<td>'.$docname.'</td>
<td>'.$head_de.'</td>
<td><input type="button" value="Auswahl" onClick=""></td>
</tr></tbody></table>';
print '<p><p><input type="button" value="Zurück" onClick="history.back()">';
print "</form>
</body>
</html>";
}
1
2
3
4
5
6
7
my %hash_docs; # jetzt ist %hash_docs leer!
while(my ($doc) = $sth_docnames->fetchrow_array()){
$hash_docs{$doc}++; # jetzt wird die Value zum Key "$doc" (was ist das!? um eins hochgezählt.
}
if(scalar(keys(%hash_docs)) > 1){ # Wenn mehr als ein Key in %hash_docs ist
doc_vorhanden(%hash_docs); Wird der Hash %hash_docs an doc_vorhanden() übergeben, aber doc_vorhanden interessiert sich nicht für die Übergabeparameter. Wenn bis hierhin nicht schon grosses Chaos ausgebrochen ist, jetzt geht schon gar nix mehr.
}
![]() |
|< 1 2 3 4 5 6 7 ... 13 >| | ![]() |
125 Einträge, 13 Seiten |