include('../gtiUtils.php'); $conn = mysql_connect(SERVIDOR_BD, USUARIO_BD, PASS_BD); mysql_select_db("gti",$conn); //$ssql = "SET OPTION SQL_BIG_TABLES = 1"; $idArticulo = intval($_GET['id']); $txt = getBibTeX ( $idArticulo ); echo $txt; /*$ssql = "SELECT * FROM articulos A WHERE A.idArticulo =".$idArticulo; $rs = mysql_query($ssql,$conn) or die (mysql_error()); if (mysql_num_rows($rs) == 0) echo 'This paper no longer has a bibtex reference'; else { $row = mysql_fetch_assoc ($rs); if ($row['clave'] == 'a' || $row['clave'] == 'A') { if ($row['congRev'] == 'r' || $row['clave'] == 'R') { $stEntry = '@article'; $public = 'journal = "'.$row['nombCongRev'].'"'; } else { $stEntry = '@inproceedings'; $public = 'booktitle = "'.$row['nombCongRev'].'"'; } 8888 } else if ($row['clave'] == 'cl' || $row['clave'] == 'CL') { $stEntry = '@inbook'; $public = 'booktitle = "'.$row['nombCongRev'].'"'; } $tit = 'title = "'.$row['titulo'].'"'; $title = ereg_replace('([A-Z]+)','{\\1}', $tit); $tituloK = $row['titulo']; $year = 'year = "'.$row['anho'].'"'; $anhoK = $row['anho']; if ($row['volumen'] != '') $volume = 'volume = "'.$row['volumen'].'"'; if ($row['paginas'] != '' && eregi("[0-9][0-9]*-[0-9][0-9]*", $row['paginas'])) { $pages = 'pages = "'.$row['paginas'].'"'; $arrayA = explode ("-",$pages); $pages = $arrayA[0]."--".$arrayA[1]; } if ($row['editorial'] != '') $publisher = 'publisher = "'.$row['editorial'].'"'; mysql_free_result ($rs); $ssql = 'SELECT * from gtiHaEscrito GTH left join autoresGti AG ON GTH.idAutor=AG.idAutor WHERE idArticulo ='.$idArticulo.' ORDER BY orden'; $rs = mysql_query($ssql,$conn) or die (mysql_error()); $nAutores = mysql_num_rows($rs); $authors = 'author = "'; while ($row = mysql_fetch_assoc ($rs)) { if ($nAutores == mysql_num_rows($rs)) $autoresK = $row['apellidos']; $authors.=$row['nick']; if ($nAutores > 1) $authors.=' and '; $nAutores--; } $authors.='"'; $arrayA = explode (" ",$autoresK); $key = $arrayA[0]; $key.= substr($anhoK,2,2); $arrayA = explode (" ",$tituloK); $key.= $arrayA[0]; echo "
".$stEntry."{".$key.","; }*/ ?>
"." ".$authors.",
"." ".$title.",
"." ".$public.",
"; if ($volume != '') echo " ".$volume.",
"; if ($pages != '') echo " ".$pages.",
"; echo " ".$year; if ($publisher != '') echo ",
"." ".$publisher; echo "
}