62 |
my $output = new IO::File(">$filename"); |
my $output = new IO::File(">$filename"); |
63 |
my $writer = new XML::Writer(OUTPUT=>$output, NEWLINES => 1); |
my $writer = new XML::Writer(OUTPUT=>$output, NEWLINES => 1); |
64 |
|
|
65 |
|
$writer->pi('xml-stylesheet', 'href="archive.css" type="text/css"'); |
66 |
|
|
67 |
my $files_sql = q{ |
my $files_sql = q{ |
68 |
SELECT |
SELECT |
69 |
files.path AS path, |
files.path AS path, |
118 |
$sth_files->execute($row->{'backup_id'}); |
$sth_files->execute($row->{'backup_id'}); |
119 |
|
|
120 |
delete($row->{'backup_id'}); |
delete($row->{'backup_id'}); |
121 |
|
$row->{'date'} = strftime($t_fmt,gmtime($row->{'date'})); |
122 |
|
|
123 |
$writer->startTag( "backup", %{$row} ); |
$writer->startTag( "backup", %{$row} ); |
124 |
|
|
125 |
while (my $row = $sth_files->fetchrow_hashref()) { |
while (my $row = $sth_files->fetchrow_hashref()) { |
126 |
# convert filetype to string |
# convert filetype to string |
127 |
$row->{'type'} = BackupPC::Attrib::fileType2Text(undef, $row->{'type'}); |
$row->{'type'} = BackupPC::Attrib::fileType2Text(undef, $row->{'type'}); |
128 |
|
$row->{'date'} = strftime($t_fmt,gmtime($row->{'date'})); |
129 |
my $path = $row->{'path'}; delete $row->{'path'}; |
my $path = $row->{'path'}; delete $row->{'path'}; |
130 |
|
|
131 |
$writer->startTag("file", %{$row}); |
$writer->startTag("file", %{$row}); |
273 |
|
|
274 |
} |
} |
275 |
|
|
276 |
# FIXME add file list in xml and txt and note file |
# add file list and note in xml |
|
|
|
277 |
dumpArchive2XML($dbh, $dvd_nr, $xml_file); |
dumpArchive2XML($dbh, $dvd_nr, $xml_file); |
278 |
print $list "$xml_file\n"; |
print $list "$xml_file\n"; |
279 |
|
|
280 |
|
# add css file for archive |
281 |
|
my $css_file = $Conf{CgiImageDir} . '/archive.css'; |
282 |
|
if (-r $css_file) { |
283 |
|
print $list "$css_file\n"; |
284 |
|
} else { |
285 |
|
print "WARNING: missing $css_file, not added to iso image!\n"; |
286 |
|
} |
287 |
|
|
288 |
close($list); |
close($list); |
289 |
|
|
290 |
print "Running mkisofs now for $inc increments...\n"; |
print "Running mkisofs now for $inc increments...\n"; |