|< 1 2 >| | 13 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
if (-e $filetoopen) {
open(FILE, "$filetoopen");
@events = <FILE>;
close(FILE);
..
..
..
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', "\n";
print "<html><head><title>$lang{header} $wday $lang{the} $ev_day.$ev_month.$ev_year</title>\n";
print "</head>\n";
@sortevents = sort{ $a <=> $b }@events;
$id = -1;
$a = nein;
foreach (@sortevents) {
($beginn, $name, $veranstalter, $titel, $ort, $location, $am, $art, $mail, $url, $sonstiges) = split(/\|/,$_);
$id++;
if ($a eq nein) {
print "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" class=\"forumline\">
<tr>
<td class=\"catHead\" height=\"25\"><span class=\"genmed\"><b>Events</b></span></td>
</tr>
<tr>
<td class=\"row1\" align=\"left\"><span class=\"gensmall\">
<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"up\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<!-- BEGIN recent_topic_row -->
» <a href=\"$urlcgi/" . "event.cgi?ev_day=$ev_day\&ev_month=$ev_month\&ev_year=$ev_year\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\" target=\" _blank\">$titel</a><br />
by $veranstalter<br /><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<br>
";
$a = ja;
};
};
exit;
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if(-e("$filetoopen")){
open(FILE, "$filetoopen");
my @events = <FILE>;
close(FILE);
# ..
# ..
# ..
print "Content-type: text/html\n\n";
print "here's all the HTML stuff;
my $id = -1;
foreach (sort{ $a <=> $b } @events) {
($beginn, $name, $veranstalter, $titel, $ort, $location, $am, $art, $mail, $url, $sonstiges) = split(/\|/, $_);
$id++;
if($a eq nein){
print "here's HTML stuff, too";
# $a = ja;
# Wenn du hier auf "ja" setzt wird der HTML Code nicht mehr ausgegeben!
}
}
}
exit;
1
2
3
4
5
6
7
unless (open(FILE, $fileToOpen)) {
print "Error: couldn't read from '$fileToOpen': $!\n";
}
else {
...
close (FILE);
} # else
QuoteNa den Code kannst du aber schöner schreiben!
Quotevon woher kommt das $a in $a eq "ja"?
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
#!/usr/bin/perl
use lib '$urlcgi';
use Kal;
use CGI::Carp "fatalsToBrowser";
use CGI qw(:all);
use warnings;
use strict;
use vars qw($Tag $Monat $Jahr $filetoopen @events @sortevents $urlcgi $titel $beginn $name $ort $veranstalter $location $am $art $mail $url $sonstiges);
require "data/info.cgi";
require "data/date.cgi";
require "data/lang.cgi";
my $ev_day = param('ev_day');
my $ev_month = param('ev_month');
my $ev_year = param('ev_year');
if ($ev_day eq "" || $ev_month eq "" || $ev_year eq "") {
if ($Monat < 10) {$Monat = "0" . $Monat};
chdir $Jahr;
chdir $Monat;
$filetoopen = "$Tag.$Monat.$Jahr.thd";
$ev_day = $Tag;
$ev_month = $Monat;
$ev_year = $Jahr;
}else{
chdir $ev_year;
chdir $ev_month;
$filetoopen = "$ev_day.$ev_month.$ev_year.thd";
};
if (-f $filetoopen) {
unless (open(FILE, $filetoopen)) {
print "Error: couldn't read from '$filetoopen': $!\n";
}else {
open(FILE, "$filetoopen");
@events = <FILE>;
close(FILE);
};
}else{
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', "\n";
print "<html><head><title>Error</title>\n";
print "</head>\n";
print "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" class=\"forumline\">
<tr>
<td class=\"catHead\" height=\"25\"><span class=\"genmed\"><b>Events</b></span></td>
</tr>
<tr>
<td class=\"row1\" align=\"left\"><span class=\"gensmall\">
<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"up\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<!-- BEGIN recent_topic_row -->
» <a href=\"$urlcgi/" . "event.cgi?ev_day=$ev_day\&ev_month=$ev_month\&ev_year=$ev_year\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\" target=\" _blank\">Heute sind keine Events 1</a><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table> \n";
exit;
};
if (@events == ""){
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', "\n";
print "<html><head><title>Error</title>\n";
print "</head>\n";
print "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" class=\"forumline\">
<tr>
<td class=\"catHead\" height=\"25\"><span class=\"genmed\"><b>Events</b></span></td>
</tr>
<tr>
<td class=\"row1\" align=\"left\"><span class=\"gensmall\">
<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"up\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<!-- BEGIN recent_topic_row -->
» <a href=\"$urlcgi/" . "event.cgi?ev_day=$ev_day\&ev_month=$ev_month\&ev_year=$ev_year\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\" target=\" _blank\">Heute sind keine Events 2</a><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table> \n";
exit;
}else{
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', "\n";
print "<html><head><title>Titel</title>\n";
print "</head>\n";
@sortevents = sort{ $a <=> $b }@events;
foreach (@sortevents) {
($beginn, $name, $veranstalter, $titel, $ort, $location, $am, $art, $mail, $url, $sonstiges) = split(/\|/,$_);
print "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"1\" border=\"0\" class=\"forumline\">
<tr>
<td class=\"catHead\" height=\"25\"><span class=\"genmed\"><b>Events</b></span></td>
</tr>
<tr>
<td class=\"row1\" align=\"left\"><span class=\"gensmall\">
<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"up\" height=\"200\" scrolldelay=\"100\" scrollamount=\"2\">
<!-- BEGIN recent_topic_row -->
» <a href=\"$urlcgi/" . "event.cgi?ev_day=$ev_day\&ev_month=$ev_month\&ev_year=$ev_year\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\" target=\" _blank\">$titel</a><br />
by $veranstalter<br /><br />
<!-- END recent_topic_row -->
</marquee>
</span></td>
</tr>
</table>
<br>
";
};
exit;
};
print @sortevents;
|< 1 2 >| | 13 Einträge, 2 Seiten |