Julkaisuluettelo
$file) {
if (filetype($file)=='dir') {
$dirname=$file.'/';
$polku = substr($dirname,0,-3);
$hkuvaus = $polku.'.tex';
// echo 'Etsin tiedostoa: '.$hkuvaus;
if (file_exists($hkuvaus)) {
// $kutxt = file_get_contents($hkuvaus, true);
$rivit = file($hkuvaus);
echo '
'.$rivit[0].'// '.$rivit[1].'
';
}
echo '';
$viimeinen = substr($polku,-1);
if ($viimeinen !='.') {
// echo $polku;
$images = glob($dirname."*.txt");
foreach($images as $image) {
$paivam = substr($image, 6, 10);
$lines = file($image);//file in to an array
$nimi = substr($image, 0, -4);
$localpdf = $nimi.'.pdf';
if (file_exists($localpdf)) {
$local = ', pdf';
} else {$local ='';}
echo '- '.$lines[0].
', '.$lines[1].', '
.$lines[2]
.'(journal'.$local.').';
}
}
echo '
';
}
}
?>