#!/usr/bin/perl # Copyright (c) 2000 by C.A.D. Kassler # angefangen: 3.11.2000 # gearbeitet: 3.11; 4.11 # letztes Update: 4.11.2000 $homedir="/pages/b7/09/d0003560/home/htdocs/cgi-bin/"; chdir($homedir); print "Content-type: text/html\n\n"; # Ausgabe des Kopfes... print < EOF #Liste der Dateien lesen, die nicht angezeigt werden sollen @dont=(); if (open(FILE,"){ chomp($_); push(@dont,$_); } close(FILE); } # PAD-Dateien erstmal einlesen und nach Namen sortieren... @namen=(); @fnamen=(); #@pnamen=(); $nr=0; # Alle xml-Dateien durchlaufen... while (defined($_ = <../english/*.xml>)) { #prüfen ob name auf "schwarzer" liste $break=0; foreach $na (@dont) { if ($na eq $_) {$break=1;} } if ($break==0) { $nr=$nr+1; # Datei laden... { local $/; open SLURP, $_ or die "can't open $_: $!"; $xml = ; close SLURP or die "cannot close $_: $!"; } # Daten auslesen... $name=get_value("XML_DIZ_INFO", "Program_Info", "Program_Name"); # Daten speichern... push(@namen,"$name;$_"); } } # gemeinsam sortieren @namen=sort @namen; $pos=0; #in 2 arrays aufspalten ;=Trennzeichen foreach $name (@namen){ for ($i=0;$i EOF $nr=0; # Alle xml-Dateien durchlaufen... #while (defined($_ = <../english/*.xml>)) foreach $_ (@fnamen) { $nr=$nr+1; # Datei laden... { local $/; open SLURP, $_ or die "can't open $_: $!"; $xml = ; close SLURP or die "cannot close $_: $!"; } # Daten auslesen... $name=get_value("XML_DIZ_INFO", "Program_Info", "Program_Name"); $version=get_value("XML_DIZ_INFO", "Program_Info", "Program_Version"); $year=get_value("XML_DIZ_INFO", "Program_Info", "Program_Release_Year"); $month=get_value("XML_DIZ_INFO", "Program_Info", "Program_Release_Month"); $day=get_value("XML_DIZ_INFO", "Program_Info", "Program_Release_Day"); $os=get_value("XML_DIZ_INFO", "Program_Info", "Program_OS_Support"); $type=get_value("XML_DIZ_INFO", "Program_Info", "Program_Type"); $cost=get_value("XML_DIZ_INFO", "Program_Info", "Program_Cost_Other"); $cate=get_value("XML_DIZ_INFO", "Program_Info", "Program_Categories"); $size=get_value("XML_DIZ_INFO", "Program_Info", "File_Info", "File_Size_K"); $lang=get_value("XML_DIZ_INFO", "Program_Info", "Program_Language"); $inst=get_value("XML_DIZ_INFO", "Program_Info", "Program_Install_Support"); $syst=get_value("XML_DIZ_INFO", "Program_Info", "Program_System_Requirements"); $desc=get_value("XML_DIZ_INFO", "Program_Descriptions", "English", "Char_Desc_450"); $screen=get_value("XML_DIZ_INFO", "Web_Info", "Application_URLs", "Application_Screenshot_URL"); $down=get_value("XML_DIZ_INFO", "Web_Info", "Download_URLs", "Primary_Download_URL"); # Beschreibung ausgeben... print < EOF } print "

PAD-Catalog

To download a program click on a picture!
Hint: Feel free to distribute the programs (CD-ROM or other media).
Overview

Click on a link to
go to the long description...
EOF $nr=0; # Alle xml-Dateien durchlaufen... #while (defined($_ = <../english/*.xml>)) foreach $_ (@fnamen) { $nr=$nr+1; # Datei laden... { local $/; open SLURP, $_ or die "can't open $_: $!"; $xml = ; close SLURP or die "cannot close $_: $!"; } # Daten auslesen... $name=get_value("XML_DIZ_INFO", "Program_Info", "Program_Name"); $version=get_value("XML_DIZ_INFO", "Program_Info", "Program_Version"); $desc80=get_value("XML_DIZ_INFO", "Program_Descriptions", "English", "Char_Desc_80"); print < EOF } print <
$name $version $desc80

Number of listed programs: $nr


$name $version
 
Size: $size KB Price of full version: $cost
Category: $cate Kind: $type Release date: $month/$day/$year

Description: $desc

Supported OS: $os System requirements: $syst
Installation: $inst Language: $lang
"; exit; # XML Lese-Routine... sub get_value { $xml_ = $xml; foreach $tag (@_) { $xml_ =~ /(<$tag>)/; $xml_ = $'; } $xml_ =~ /