Login   Register  
PHP Classes
elePHPant
Icontem

File: pages/p_bibtex.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Javier AP  >  Pergamus Publication Manager  >  pages/p_bibtex.php  >  Download  
File: pages/p_bibtex.php
Role: Auxiliary script
Content type: text/plain
Description: Shows metadata in bibtex format
Class: Pergamus Publication Manager
Web based manager for scientific publications
Author: By
Last change: bug fix
Date: 9 years ago
Size: 1,217 bytes
 

Contents

Class file image Download
<?php
include '../class/class_collection.php';
include 
'../class/class_publication.php';
include 
'../class/gestor_articulos.php';
?> 
<html>
<head>
<title>Pergamus Publication Manager</title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="main">
  <h1> BibTex reference</h1>
  <br>
  <?php      
  
function escape_chars($text) {
    
$search  = array ('''''''''''''''''''''');
    
$replace = array ("\~{n}""\'{a}""\'{e}""\'{i}""\'{o}""\'{u}""\'{A}""\'{E}""\'{I}""\'{O}""\'{U}");
    
$export str_replace($search$replace$text);
    return 
$export;
  }   
  
$bib =& new Collection('publications');
  
$filter = array();
  
$pubs_dic $bib->build_all_pubs($filter);     
  print(
'@'.$pubs_dic[$bibtex_id]->bibtex_type.' { '.$bibtex_id.',<br>');
  foreach(
$pubs_dic[$bibtex_id]->metadata as $key => $value){
      print(
'&nbsp;&nbsp;&nbsp;'.$key.' = "'.escape_chars($value).'",<br>');
  }
  print(
'}<br>');  
  
?>  
  <p>&nbsp;</p>
  <a href="p_publications.php"><img src="../img/atras.gif" border="0"> Back to the publication list</a>
  <?php include 'p_banner.php'?>
  <p>&nbsp; </p>
</div>    
</body>
</html>