|< 1 2 >| | 14 Einträge, 2 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
foreach my $ele (@documentlist){
if(@{$ele->child()}){
if(!@{$ele->parent()}){
my $file = ${$ele->name()}.'.html';
open(my $fh,'>',$file) or die $!;+
my $string = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'.$file.'</title></head><body>'.
'<a href="'.${$ele->name()}.".html".'">Zurück</a><br/><br/><br/> <table border>';
}else{
my $file = ${$ele->name()}.'.html';
open(my $fh,'>',$file) or die $!;+
my $string = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'.$file.'</title></head><body>'.
'<a href="'.@{$ele->parent()}[0].".html".'">Zurück</a><br/><br/><br/> <table border>';
}
my $header = ${$ele->child()}[0];
# erzeuge headerzeile
foreach my $ele2 (@documentlist){
if($header eq ${$ele2->name()}){
my %hash = %{$ele2->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
$string .= '<th>'.$key.'</th>';
}
$string .= '</tr>';
last;
}
}
# erzeuge spalteninformationszeilen
foreach my $child (@{$ele->child()}){
foreach my $ele3 (@documentlist){
if($child eq ${$ele3->name()}){
# Wenn keine Blätter
if(@{$ele3->child()}){
my %hash = %{$ele3->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
if($key eq "Titel"){
$string .= '<td><a href="'.${$ele3->name()}.".html".'">'.$hash{$key}.'</a></td>';
}else{
$string .= '<td>'.$hash{$key}.'</td>';
}
}
$string .= '</tr>';
}else{
# Wenn Blätter
my %hash = %{$ele3->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
if($key eq "Titel"){
$string .= '<td><a href="'.${$ele3->name()}.".".${$ele->doc_format()}.'">'.$hash{$key}.'</a></td>';
}else{
$string .= '<td>'.$hash{$key}.'</td>';
}
}
$string .= '</tr>';
}
}
}
}
$string .= '</table></body></html>';
#########Problem print $fh $string;
close $fh or die $!;
}
}
open(my $fh,'>',$file) or die $!;
1
2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd><html><head><title>P009358336.html</title></head><body><a href="P009358336.html">Zurück</a><br/><br/><br/> <table border><tr><th>Datum</th><th>Recht</th><th>Stichwort für SAP und ZA</th><th>Titel</th><th>Verfasser</th><th>logischer Aktenschrank</th><th>logischer Ordner</th><th>logisches Register</th></tr><tr><td>01.03.2005</td><td>00AB</td><td>Test</td><td><a href="P009401923.html">8.1 Test</a></td><td>Lüdtke</td><td>DA</td><td>Verf. d.3</td><td>Test</td></tr><tr><td>01.03.2005</td><td>00AB</td><td>Abnahme</td><td><a href="P009401926.html">8.2 Abnahme</a></td><td>Lüdtke</td><td>DA</td><td>Verf. d.3</td><td>Test</td></tr></table></body></html>
1
2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd><html><head><title>index.html</title></head><body><h3 align=center>Startseite</h3><br/><br/><br/> <table border><tr><th>Name</th><tr><tr><td><a href="P009358336.html">P009358336</a></td></tr></table></body></html><tr><th>Datum</th><th>Recht</th><th>Stichwort für SAP und ZA</th><th>Titel</th><th>Verfasser</th><th>logischer Aktenschrank</th><th>logischer Ordner</th><th>logisches Register</th></tr><tr><td>01.03.2005</td><td>00AB</td><td>Test</td><td><a href="P009401923.html">8.1 Test</a></td><td>Lüdtke</td><td>DA</td><td>Verf. d.3</td><td>Test</td></tr><tr><td>01.03.2005</td><td>00AB</td><td>Abnahme</td><td><a href="P009401926.html">8.2 Abnahme</a></td><td>Lüdtke</td><td>DA</td><td>Verf. d.3</td><td>Test</td></tr></table></body></html>
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
133
134
135
136
137
138
139
140
141
142
143
my $file = "index.html";
open(my $fh,'>',$file) or die $!;+
my $string = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'.$file.'</title></head><body>'.
'<h[3] align=center>Startseite</h[3]><br/><br/><br/> <table border><tr><th>Name</th><tr>';
foreach my $ele (@rootlist){
$string .= '<tr><td><a href="'.${$ele->name()}.".html".'">'.${$ele->name()}.'</a></td></tr>';
}
$string .= '</table></body></html>';
# print = Ausgabe
# $fh in den Filehandle
# $string das was geschrieben werden soll
print $fh $string;
close $fh or die $!;
# Erzeuge alle HTML-Seiten aus Documentlist mit parents
my @doneele;
foreach my $ele (@documentlist){
if(@{$ele->child()}){
if(!@{$ele->parent()}){
my $file = ${$ele->name()}.'.html';
open($fh,'>',$file) or die $!;+
my $string = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'.$file.'</title></head><body>'.
'<a href="'.${$ele->name()}.".html".'">Zurück</a><br/><br/><br/> <table border>';
}else{
my $file = ${$ele->name()}.'.html';
open($fh,'>',$file) or die $!;+
my $string = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'.$file.'</title></head><body>'.
'<a href="'.@{$ele->parent()}[0].".html".'">Zurück</a><br/><br/><br/> <table border>';
}
my $header = ${$ele->child()}[0];
# erzeuge headerzeile
foreach my $ele2 (@documentlist){
if($header eq ${$ele2->name()}){
my %hash = %{$ele2->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
$string .= '<th>'.$key.'</th>';
}
$string .= '</tr>';
last;
}
}
# erzeuge spalteninformationszeilen
foreach my $child (@{$ele->child()}){
foreach my $ele3 (@documentlist){
if($child eq ${$ele3->name()}){
# Wenn keine Blätter
if(@{$ele3->child()}){
my %hash = %{$ele3->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
if($key eq "Titel"){
$string .= '<td><a href="'.${$ele3->name()}.".html".'">'.$hash{$key}.'</a></td>';
}else{
$string .= '<td>'.$hash{$key}.'</td>';
}
}
$string .= '</tr>';
}else{
# Wenn Blätter
my %hash = %{$ele3->spalteninfo()};
my @sorted = sort keys %hash;
$string .= '<tr>';
for my $key(@sorted){
if($key eq "Titel"){
$string .= '<td><a href="'.${$ele3->name()}.".".${$ele->doc_format()}.'">'.$hash{$key}.'</a></td>';
}else{
$string .= '<td>'.$hash{$key}.'</td>';
}
}
$string .= '</tr>';
}
}
}
}
$string .= '</table></body></html>';
print $fh $string;
close $fh or die $!;
}
}
|< 1 2 >| | 14 Einträge, 2 Seiten |