|< 1 2 3 >| | 21 Einträge, 3 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
sub main {
print $cgi->header(-type => 'text/html');
if ($suchen) {
if ($identnr =~m/^\d{6,9}[AB]?$/) {
suchen()
}
elsif ($identnr =~ /^\d+\*$/) {
$identnr =~ s/\*//g;
suchen_wild()
}
}
.............
elsif ($auswahl) {
&suchen_doc();
}
}
sub suchen_wild {
my $dbh = DBI->connect($DBN,$DBUSER,$DBPASS) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM $TABELLE where ident_nr like '$identnr%' order by docname";
my $sth_suchen=$dbh->prepare($statement_suchen) or die $DBI::errstr;
$sth_suchen->execute;
my @daten=();
my @order= qw/identnr langtyp doctyp docname head langtxt datum ersteller werk check1 check2 check3 check4/;
while (my @row = $sth_suchen->fetchrow_array()) {
my %hash;
for (my $i=0; $i < scalar @order; $i++)
{
$hash{$order[$i]} = $row[$i];
}
push @daten, \%hash;
}
&wild_vorhanden(\@daten);
$sth_suchen->finish();
$dbh->disconnect();
}
sub wild_vorhanden {
my ($daten) = @_;
print "<html>\n";
print "<head><title>FORMULAR</title></head>\n";
print "<body>";
print '<span style="color:#FF0000;font-size:20pt"><center><b>LIDOS Zusatzinformation</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="80">
<col width="50">
<col width="80">
<col width="50">
</colgroup>
<thead>
<tr>
<th>Identnummer</th>
<th>doc_typ</th>
<th>doc_name</th>
<th> </th>
</tr></thead>
<tbody>';
foreach my $ptr (@{$daten})
{
print qq~<tr>
<td>$ptr->{identnr}</td>
<td>$ptr->{doctyp}</td>
<td>$ptr->{docname}</td>
<td><a href="/cgi-bin/frontl.cgi?auswahl=1;
identnr = $ptr->{identnr};
docname = $ptr->{docname};
ersteller= $ptr->{ersteller};
check1 = $ptr->{check1};
check2 = $ptr->{check2};
check3 = $ptr->{check3};
check4 = $ptr->{check4};
werk = $ptr->{werk};
doctyp = $ptr->{doctyp} ">Auswählen</a></td>
</tr>~;
}
print '</tbody></table>';
print '<p><p><input type="button" value="Home" onClick=location.href="http://127.0.0.1/">';
print "</form>
</body>
</html>";
}
sub suchen_doc {
my $dbh = DBI->connect($DBN,$DBUSER,$DBPASS) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM $TABELLE where ident_nr='$identnr' and docname = '$docname'";
my $sth_suchen=$dbh->prepare($statement_suchen) or die $DBI::errstr;
$sth_suchen->execute;
my %hash;
while (my @row = $sth_suchen->fetchrow_array()) {
$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{date} = $row[6];
}
&test(%hash);
$sth_suchen->finish();
$dbh->disconnect();
}
sub test {
my (%param) = @_;
my $param = \%param;
print qq~<html>
<head></head>
<body>
check1: $check1
check2: $check2
check3: $check3
check4: $check4
head_de: $param->{head_de}
head_en: $param->{head_en}
identnr: $identnr
docname: $docname
ersteller: $ersteller
$werk $doctyp
</body>
</html>~;
}
1
2
3
4
5
6
7
8
9
10
<a href="/cgi-bin/frontl.cgi?auswahl=1;\
identnr=$ptr->{identnr};\
docname=$ptr->{docname};\
ersteller=$ptr->{ersteller};\
check1=$ptr->{check1};\
check2=$ptr->{check2};\
check3=$ptr->{check3};\
check4=$ptr->{check4};\
werk=$ptr->{werk};\
doctyp=$ptr->{doctyp}">Auswählen</a></td>
1
2
3
4
5
6
7
8
sub suchen {
my $dbh = DBI->connect($DBN,$DBUSER,$DBPASS) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM $TABELLE where ident_nr = '$identnr' order by docname";
.......
&doc_vorhanden(\@daten);
...
}
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
sub doc_vorhanden {
............
print '<table border="1" rules="groups">
<colgroup>
<col width="50">
<col width="80">
<col width="20">
<col width="300">
<col width="50">
</colgroup>
<thead>
<tr>
<th>doc_typ</th>
<th>doc_name</th>
<th>Sprache</th>
<th>headline</th>
<th> </th>
</tr></thead>
<tbody>';
foreach my $ptr (@{$daten}) {
print qq~<tr>
<td>$ptr->{doctyp}</td>
<td>$ptr->{docname}</td>
<td>$ptr->{langtyp}</td>
<td>$ptr->{head}</td>
<td><a href="/cgi-bin/frontl.cgi?auswahl=1;
identnr=$identnr;
docname=$ptr->{docname};
ersteller=$ptr->{ersteller};
check1=$ptr->{check1};
check2=$ptr->{check2};
check3=$ptr->{check3};
check4=$ptr->{check4};
werk=$ptr->{werk};
doctyp=$ptr->{doctyp} ">Auswählen</a></td>
</tr>~;
}
print '</tbody></table>';
print '<p><p><input type="button" value="Home" onClick=location.href="http://127.0.0.1/">';
print "</form>
</body>
</html>";
}
1
2
3
4
sub suchen_wild {
my $dbh = DBI->connect($DBN,$DBUSER,$DBPASS) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM $TABELLE where ident_nr like '$identnr%' order by docname";
1
2
3
4
sub suchen_wild {
my $dbh = DBI->connect($DBN,$DBUSER,$DBPASS) or die $DBI::errstr;
my $statement_suchen="SELECT * FROM $TABELLE where ident_nr like '$identnr\%' order by docname";
|< 1 2 3 >| | 21 Einträge, 3 Seiten |