Viewing file: synopsis.php (3.82 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es-es"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../nuevo.css">
<link rel="STYLESHEET" type="text/css" href="../estilo.css"> </head> <?
if ($_REQUEST['excel']>""){
header("Pragma: ");
header('Cache-control: ');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Content-type: application/vnd.ms-excel");
header('Content-disposition: attachment; filename="lista_de_libros.xls"');
$enlaces=false;
}else{
?>
<head>
<link rel="stylesheet" type="text/css" href="nuevo.css">
<link rel="STYLESHEET" type="text/css" href="estilo.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$tiempo1=microtime(true); $enlaces=true;
}
include ("conn.php");
include ("./classes/class.log.php");
$control= new control();
$anonimo=true;
if ($control->usuario<>"anonimo"){
$anonimo=false;
}else{
echo "<h3>Deshabilitado por motivos de seguridad para usuarios an�nimos.Autentif�quese en el foro</h3>";
?>
<br><center>
<a href='javascript:history.back(-1)' style="text-decoration:none"><img src=volver.png border=0></img></a>
<?
die();
}
if ($enlaces){
echo "<h1>Edici�n de Sinopsis-Lista de libros Activos <a href='";
echo $_SERVER['PHP_SELF'];
echo "?excel=wyrm'><img src='excel.gif'></a></h1>";
}else{
echo "<center><table><tr><td>Lista de Libros en formato EXCEL</td></tr></table>";
}
$query="select libros.id, libros.autor, libros.titulo,libros.anyo
from libros where libros.inftp=1 order by libros.id desc";
/*$query="select libros.id, libros.autor, libros.titulo,libros.anyo, ratings.total_votes as votos,
round(ratings.total_value/ratings.total_votes,2) AS puntuacion from libros left outer join ratings on libros.id=ratings.id where libros.inftp=1 order by libros.id desc limit 500"; */ //$query="select t1.id, t1.autor, t1.titulo, t2.id_book as id2 from libros as t1, sinopsis as t2 order by t1.id asc";
$res=mysql_query($query,$conn);
echo mysql_error();
if ($enlaces){
?><center><table border 0>
<tr>
<td bgcolor="#FC7169">Sin sinopsis ni portada<td bgcolor="#FFFF80">Tiene uno de los dos<td bgcolor="#80FF80">CON sinopsis y Portada<td bgcolor=#E8FEFF>A�o Primera Publicaci�n</td></table><br><hr>
<?}
?>
<table border=1><tr>
<td bgcolor=#F3F3F3>Numero<td bgcolor=#F3F3F3>A�o<td bgcolor=#F3F3F3>Autor<td>T�tulo</td></tr>
<?php
while ($row=mysql_fetch_array($res)){
$query2="select * from sinopsis where id_book={$row['id']}";
//echo $query2."<br>";
$res2=mysql_query($query2,$conn);
$row2=mysql_fetch_array($res2);
/*
if ($row2['id_book']=='1971'){
echo "<pre>";
print_r($row2);
if (!empty($row2['imagename'])){
echo "imagen si";
}else{
echo "imagen no";
}
if (empty($row2['sinopsis'])){
echo "sinopsis no";
}else{
echo "imagen si";
}
}
*/
if ($row2['imagename'] and $row2['sinopsis']){
$color="#80FF80";
}elseif ((!empty($row2['imagename']) and empty($row2['sinopsis']))
or
(empty($row2['imagename']) and !empty($row2['sinopsis']))){
$color="#FFFF80";
}else{
$color="#FC7169";
}
if ($row['anyo']>''){
$anyocolor="#E8FEFF";
}else{
$anyocolor="white";
}
echo "<tr><td bgcolor='$color'>";
if ($enlaces){
echo "<a href='./sinopsis.php?ID={$row['id']}'>".$row['id']."</a>";
}else{
echo $row['id'];
}
echo "<td bgcolor='$anyocolor'>".$row['anyo']."<td bgcolor='$color'>".$row['autor']."<td bgcolor='$color'>".$row['titulo']; echo "<td bgcolor='$anyocolor'></tr>";
}
echo "</table>"; echo $tiempo2=microtime(true)-$tiempo1;
|