#!/usr/local/bin/perl5
#
# Created by F.Murtas 
# ======
#
# Date : 18-12-98
# ====
#[ <A  HREF = "#lett">talks : </A>   ] 


#$docdir  = "/afs/kloe.infn.it/www/pub/talks/";
$docdir  = "/afs/lnf.infn.it/project/www/kloe/pub/talks/";
$httpdir = "/kloe/pub/talks/";

#$docdirpriv  = "/afs/kloe.infn.it/www/private/talks_private_files/";
$docdirpriv  = "/afs/lnf.infn.it/project/www/kloe/private/talks_private_files/";

$httpdirpriv = "/kloe/private/talks_private_files/";

#$docfil  = "/afs/kloe.infn.it/www/pub/talks/kt.list";
$docfil  = "/afs/lnf.infn.it/project/www/kloe/pub/talks/kt.list";

print <<EOF;
Content-type: text/html

<HTML>
<HEAD>
<TITLE>List of KLOE Talks </TITLE>
</HEAD>
<BODY BGCOLOR=FFFFFF>
<A NAME=lett><P><CENTER><H1><FONT COLOR=0000AA>List of KLOE Talks </FONT></H1></CENTER>
<A NAME=lett><P><CENTER><H1><FONT COLOR=0000AA>(click a year below) </FONT></H1></CENTER>

[ <A  HREF = "/kloe/">KLOE Home</A>                 ]
[ <A  HREF = "#1992">1992</A> ]
[ <A  HREF = "#1993">1993</A> ]
[ <A  HREF = "#1994">1994</A> ]
[ <A  HREF = "#1995">1995</A> ]
[ <A  HREF = "#1996">1996</A> ]
[ <A  HREF = "#1997">1997</A> ]
[ <A  HREF = "#1998">1998</A> ]
[ <A  HREF = "#1999">1999</A> ]
[ <A  HREF = "#2000">2000</A> ]
[ <A  HREF = "#2001">2001</A> ]
[ <A  HREF = "#2002">2002</A> ]
[ <A  HREF = "#2003">2003</A> ]
[ <A  HREF = "#2004">2004</A> ]
[ <A  HREF = "#2005">2005</A> ]
[ <A  HREF = "#2006">2006</A> ]
[ <A  HREF = "#LAST">last talk</A> ]


<P><PRE>
EOF


open(FILE,"<$docfil") or die "Can't open file $docfil \n";

LINE: while ($line=<FILE>){
    if($line =~ "!"){
	print "<HR>\n"; 
	next LINE
	}

    if($line =~ "No"){
#        ($F1,$F2,$num) = ($line =~ /^\s*(\S+)\s+(\S+)\s*(.*)/); 
        ($F1,$F2,$num) = ($line =~ /^\s*(\S+)\s+(\S+)\s*(\S+)/); 
        print "$line";
	next LINE
	}

    if($line =~ "Where  :"){
        print $line;
        $file = "kt" . $num ;
        $fileps=$docdir . $file . ".ps.gz" ;
        $filehtml=$docdir . $file . ".html" ;
        $filepdfgz=$docdir . $file . ".slides.pdf.gz" ;
        $filepptgz=$docdir . $file . ".slides.ppt.gz" ;
        $filepdf=$docdir . $file . ".slides.pdf" ;
        $filepdf2=$docdir . $file . ".slides2.pdf" ;
        $fileppt=$docdir . $file . ".slides.ppt" ;
        $fileppt2=$docdir . $file . ".slides2.ppt" ;
        $fileppt3=$docdir . $file . ".slides3.ppt" ;
        $filepptgz2=$docdir . $file . ".slides2.ppt.gz" ;
        $filepptgz3=$docdir . $file . ".slides3.ppt.gz" ;
        $filepptpriv=$docdirpriv . $file . ".slides.ppt.gz" ;
        $filesdd=$docdir . $file . ".slides.sdd.gz" ;
        $filehtmtar=$docdir . $file . ".slides.html.tar.gz" ;
        $fileslpsgz=$docdir . $file . ".slides.ps.gz" ;
        $fileslpsgz2=$docdir . $file . ".slides2.ps.gz" ;
        $fileslpsgz3=$docdir . $file . ".slides3.ps.gz" ;
        $fileslpsgz4=$docdir . $file . ".slides4.ps.gz" ;
        $fileslps=$docdir . $file . ".slides.ps" ;
        $fileslps2=$docdir . $file . ".slides2.ps" ;
        $fileslps3=$docdir . $file . ".slides3.ps" ;
        $fileslps4=$docdir . $file . ".slides4.ps" ;
        $fileslwinwordgz=$docdir . $file . ".slides.doc.gz" ;
        $fileslwinword=$docdir . $file . ".slides.doc" ;
        $fileslwinword2=$docdir . $file . ".slides2.doc" ;
        $fileslwinword3=$docdir . $file . ".slides3.doc" ;
        $fileslwinword4=$docdir . $file . ".slides4.doc" ;
        $fileslpspriv=$docdirpriv . $file . ".slides.ps.gz" ;
        print "</PRE><B>";
        -e $fileps and print " <A HREF=$httpdir$file.ps.gz>$file.ps.gz</A>&nbsp;&nbsp;\n";
        -e $filehtml and print " <A HREF=$httpdir$file.html>$file.html</A>&nbsp;&nbsp;\n";
        -e $filepdf and print " <A HREF=$httpdir$file.slides.pdf>$file.slides.pdf</A>&nbsp;&nbsp;\n";
        -e $filepdf2 and print " <A HREF=$httpdir$file.slides2.pdf>$file.slides2.pdf</A>&nbsp;&nbsp;\n";
        -e $fileppt and print " <A HREF=$httpdir$file.slides.ppt>$file.slides.ppt</A>&nbsp;&nbsp;\n";
        -e $filepdfgz and print " <A HREF=$httpdir$file.slides.pdf.gz>$file.slides.pdf.gz</A>&nbsp;&nbsp;\n";
        -e $filepptgz and print " <A HREF=$httpdir$file.slides.ppt.gz>$file.slides.ppt.gz</A>&nbsp;&nbsp;\n";
        -e $fileppt2 and print " <A HREF=$httpdir$file.slides2.ppt>$file.slides2.ppt</A>&nbsp;&nbsp;\n";
        -e $fileppt3 and print " <A HREF=$httpdir$file.slides3.ppt>$file.slides3.ppt</A>&nbsp;&nbsp;\n";
        -e $filepptgz2 and print " <A HREF=$httpdir$file.slides2.ppt.gz>$file.slides2.ppt.gz</A>&nbsp;&nbsp;\n";
        -e $filepptgz3 and print " <A HREF=$httpdir$file.slides3.ppt.gz>$file.slides3.ppt.gz</A>&nbsp;&nbsp;\n";
        -e $filesdd and print " <A HREF=$httpdir$file.slides.sdd.gz>$file.slides.sdd.gz</A>&nbsp;&nbsp;\n";
        -e $filehtmtar and print " <A HREF=$httpdir$file.slides.html.tar.gz>$file.slides.html.tar.gz</A>&nbsp;&nbsp;\n";
        -e $fileslpsgz and print " <A HREF=$httpdir$file.slides.ps.gz>$file.slides.ps.gz</A>&nbsp;&nbsp;\n";
        -e $fileslpsgz2 and print " <A HREF=$httpdir$file.slides2.ps.gz>$file.slides2.ps.gz</A>&nbsp;&nbsp;\n";
        -e $fileslpsgz3 and print " <A HREF=$httpdir$file.slides3.ps.gz>$file.slides3.ps.gz</A>&nbsp;&nbsp;\n";
        -e $fileslpsgz4 and print " <A HREF=$httpdir$file.slides4.ps.gz>$file.slides4.ps.gz</A>&nbsp;&nbsp;\n";
        -e $fileslps and print " <A HREF=$httpdir$file.slides.ps>$file.slides.ps</A>&nbsp;&nbsp;\n";
        -e $fileslps2 and print " <A HREF=$httpdir$file.slides2.ps>$file.slides2.ps</A>&nbsp;&nbsp;\n";
        -e $fileslps3 and print " <A HREF=$httpdir$file.slides3.ps>$file.slides3.ps</A>&nbsp;&nbsp;\n";
        -e $fileslps4 and print " <A HREF=$httpdir$file.slides4.ps>$file.slides4.ps</A>&nbsp;&nbsp;\n";
        -e $fileslwinword and print " <A HREF=$httpdir$file.slides.doc>$file.slides.doc</A>&nbsp;&nbsp;\n";
        -e $fileslwinword2 and print " <A HREF=$httpdir$file.slides2.doc>$file.slides2.doc</A>&nbsp;&nbsp;\n";
        -e $fileslwinword3 and print " <A HREF=$httpdir$file.slides3.doc>$file.slides3.doc</A>&nbsp;&nbsp;\n";
        -e $fileslwinword4 and print " <A HREF=$httpdir$file.slides4.doc>$file.slides4.doc</A>&nbsp;&nbsp;\n";
        -e $fileslwinwordgz and print " <A HREF=$httpdir$file.slides.doc.gz>$file.slides.doc.gz</A>&nbsp;&nbsp;\n";
        -e $fileslpspriv and print " <A HREF=$httpdirpriv$file.slides.ps.gz>$file.slides.ps.gz</A>&nbsp;&nbsp;\n";
        -e $filepptpriv and print " <A HREF=$httpdirpriv$file.slides.ppt.gz>$file.slides.ppt.gz</A>&nbsp;&nbsp;\n";
        print "</B><PRE>";
	next LINE
	}

    print $line;
    }

close (FILE);


print <<EOF;
</PRE><HR>
<ADDRESS> <A HREF=mailto:wwwkloe.lnf.infn.it>FM</A> 18-DEC-98 </ADDRESS>
</BODY>
</HTML>
EOF
