AssignFile(Datei, (ExtractFilePath(ParamStr(0)) + '
\monitor\vplan_'+wts+'
_'+IntToStr(l_count)+'
.htm'));
Rewrite(Datei);
a:='
<html>'+sLineBreak+'
<head>'+sLineBreak+'
<title>Vertretungsplan '+schule+'
</title>'+sLineBreak+'
<meta http-equiv="expires" content="0">'+sLineBreak+'
<link rel="stylesheet" href="vplan.css" type="text/css">'+sLineBreak+'
</head>'+sLineBreak+'
<body>'+sLineBreak+'
<div class="vplan">';
WriteLn(Datei, a);
b:=sLineBreak+'
<table cellpadding=2 cellspacing=1 border=0 width="98%" bgcolor="#000000">';
WriteLn(Datei, b);
if order_mon='
KLASSEN'
then
ba:=sLineBreak+'
<tr>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tklasse+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tstunde+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tfehlt+'
</font></td>'
else
ba:=sLineBreak+'
<tr>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tstunde+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tklasse+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tfehlt+'
</font></td>';
WriteLn(Datei, ba);
c:=sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tvertritt+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tfach+'
</font></td>'+sLineBreak+'
<td width=37% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+tbemerkung+'
</font></td>'+sLineBreak+'
<td width=9% class="tblhead">'+sLineBreak+'
<font class="font_tblhead">'+traum+'
</font></td>'+sLineBreak+'
</tr>';
WriteLn(Datei, c);
//Ab hier die Datensätze
Query1.First;
if Pred(Query1.RecordCount)=-1
then begin
hcode:='
<tr bgcolor="'+tdc1+'
">'+sLineBreak+'
<td colspan="7"><font color="'+fc1+'
"> [b]Für '+wochentag+'
, den '+today+'
ist kein Eintrag vorhanden![/b]</font></td>'+sLineBreak+'
</tr>';
WriteLn(Datei, hcode);
end
else begin
while not Query1.EOF
do begin
for count := 0
to Pred(Query1.RecordCount)
do begin
if count
mod 2 = 0
then begin
tdcolor:=tdc1;
fccolor:=fc1;
end
else begin
fccolor:=fc2;
tdcolor:=tdc2;
end;
if ((Query1.FieldByName('
FUER').AsString='
')
AND (Query1.FieldByName('
WERT').AsString='
M')
AND (Query1.FieldByName('
ANZAHL').AsString='
1'))
then begin
if (pos('
fällt aus', Query1.FieldByName('
BEMER_SCH').AsString)<>0)
then begin
fehlt1:='
<font class="fehlt">'+Query1.FieldByName('
WER').AsString+'
</font>';
fach1:='
<font class="fehlt">'+Query1.FieldByName('
FACH').AsString+'
</font>';
vertritt1:='
';
end
else begin
fehlt1:=Query1.FieldByName('
WER').AsString;
fach1:=Query1.FieldByName('
FACH').AsString;
vertritt1:=Query1.FieldByName('
WER').AsString;
end;
end
else begin
if (pos('
fällt aus', Query1.FieldByName('
BEMER_SCH').AsString)<>0)
then begin
fehlt1:='
<font class="fehlt">'+Query1.FieldByName('
FUER').AsString+'
</font>';
vertritt1:='
<font class="fehlt">'+Query1.FieldByName('
WER').AsString+'
</font>';
fach1:='
<font class="fehlt">'+Query1.FieldByName('
FACH').AsString+'
</font>';
end
else begin
fehlt1:=Query1.FieldByName('
FUER').AsString;
vertritt1:=Query1.FieldByName('
WER').AsString;
fach1:=Query1.FieldByName('
FACH').AsString;
end;
end;
if order_mon='
KLASSEN'
then begin
if Query1.FieldByName(sklassen).AsString=Label13.Caption
then klasse:='
'
else klasse:='
[b]'+Query1.FieldByName(sklassen).AsString+'
[/b]';
Label13.Caption:=Query1.FieldByName(sklassen).AsString;
stunde:=Query1.FieldByName('
S').AsString+'
.';
if NOT baender
then
klasse:=Compress(klasse);
end
else begin
if Query1.FieldByName('
S').AsString=Label13.Caption
then klasse:='
'
else klasse:=Query1.FieldByName('
S').AsString+'
.';
Label13.Caption:=Query1.FieldByName('
S').AsString;
stunde:='
[b]'+Query1.FieldByName(sklassen).AsString+'
[/b]';
if NOT baender
then
stunde:=Compress(stunde);
end;
if (
NOT (vlehrer)
AND NOT (vertritt1='
<font class="fehlt"></font>')
AND NOT (vertritt1='
'))
then
vertritt1:='
???';
if NOT (raeume)
AND NOT (Length(Query1.FieldByName('
Raum').AsString)=0)
then
raum1:='
?'
else
raum1:=Query1.FieldByName('
Raum').AsString;
hcode:='
<tr bgcolor="'+tdcolor+'
">'+sLineBreak+'
<td width=9%><font color="'+fccolor+'
" class="font_tblrow"> '+klasse+'
</font></td>'+sLineBreak+'
<td width=9%><font color="'+fccolor+'
" class="font_tblrow"> '+stunde+'
</font></td>'+sLineBreak+'
<td width=9%><font color="'+fccolor+'
" class="font_tblrow"> '+fehlt1+'
</font></td>';
WriteLn(Datei, hcode);
hcode2:='
<td width=9%><font color="'+fccolor+'
" class="font_tblrow"> '+vertritt1+'
</font></td>'+sLineBreak+'
<td width=9%><font color="'+fccolor+'
" class="font_tblrow"> '+fach1+'
</font></td>'+sLineBreak+'
<td width=37%><font color="'+fccolor+'
" class="font_tblrow"> '+Query1.FieldByName('
BEMER_SCH').AsString+'
</font></td>'+sLineBreak+'
<td width=9% bgcolor="'+tdcolor+'
"><font color="'+fccolor+'
" class="font_tblrow"> '+raum1+'
</font></td>'+sLineBreak+'
</tr>';
WriteLn(Datei, hcode2);
Query1.Next;
end;
end;
end;
f:='
</table>'+sLineBreak+'
</div>'+sLineBreak+'
</body>'+sLineBreak+'
</html>';
WriteLn(Datei, f);
CloseFile(Datei);