Viewing file: enlace.php (4.97 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include ("header.php");
// aqui, metemos la comprobación. De no estar identificado, lo largamos a index.php
include ("/home/wwwroot/frames/conn.php");
include ("/home/wwwroot/frames/classes/class.log.php");
$control= new control();
if ($control->usuario=="anonimo"){
// redirigimos
?>
<script type="text/javascript">
window.location="<?echo "./index.php";?>";</script>
<?}
// fin comprobacion identidad
$encriptado=new Encriptor();
$id=$encriptado->decrypt($_REQUEST['ID']);
$sql="SELECT *
FROM libros t1
LEFT OUTER JOIN sinopsis ON t1.id = sinopsis.id_book
WHERE t1.id =$id";
$ficha=mysql_fetch_array(mysql_query($sql,$conn));
$sql2="select count(*) as contador from libros where inftp=1 and autor like '%{$ficha['autor']}%' ";
$total_autor=mysql_fetch_array(mysql_query($sql2,$conn));
// fin de la ologica PHP. PAsamos a presentación.
?>
<body>
<div data-role="page" id="enlace" data-theme="<?echo $formato;?>">
<?echo cabecera();?>
<div role="main" class="ui-content" data-role="content">
<div class="content-primary">
<div class="ui-body ui-body-b ui-corner-all" data-theme="<?echo $formato;?>">
<h4 style='font-family: "fontin"; font-size : 2em; text-align:center;'><? echo utf8_encode($ficha['titulo'])." ".utf8_encode($ficha['version'])?></h4>
<a class="ui-btn ui-btn-icon-right ui-btn-corner-all ui-shadow ui-btn-up-c" data-theme="<?echo $formato;?>" href="controller_autor.php?id=<?echo $encriptado->encrypt(utf8_encode($ficha['autor']));?>" data-role="button" data-icon="arrow-r" data-iconpos="right"><span class="ui-btn-inner ui-btn-corner-all" aria-hidden="true"><span class="ui-btn-text"> + de <? echo utf8_encode($ficha['autor']);?></span><span class="ui-li-count ui-btn-up-c ui-btn-corner-all"><? echo $total_autor['contador']-1;?></span><span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span></span></a>
</div>
<div class="ui-body ui-body-b ui-corner-all" data-theme="<?echo $formato;?>">
<img style="float:left; margin-right:10px; margin-bottom:10px" src="http://papyrefb2.net/includes/<?echo $ficha['imagename'];?>" />
<p style="text-indent : 1em ; font-family : monospace; font-weight: bold">
<i style='font-family: "fontin"; font-size : 1em; text-align=center;'><span class="azul"><?echo utf8_encode($ficha['genero'])."/".utf8_encode($ficha['subgenero'])." (".$ficha['anyo'];?>)</span><br></i>
<? echo utf8_encode($ficha['sinopsis'])?>
</p>
</div>
<div class="ui-body ui-body-b ui-corner-all" style="clear : both">
<p style="font-size : 0.7em; font-weight: bold;">
<? $pendientes=$control->descargas_pendientes;
if ($control->descargas_pendientes<=0)$pendientes=0;
echo "$control->usuario, te quedan $pendientes descargas por hoy";
?>
</p>
</div>
<div class="ui-body ui-body-b ui-corner-all" style="clear : both">
<? // AHORA, CODIFOCAMOS TODO LO DEMAS.
// el id ya existe: $id. Codificamos el usuario.
$ccadena=$encriptado->encrypt($id.'@'.$control->usuario);
?>
<? if ($ficha['ruta']<>NULL){?>
<a href="./bajandom.php?t=<?echo $ccadena;?>&f=fb2" rel="external" data-ajax="false" data-role="button" data-inline="true" data-theme="<?echo $formato;?>">FB2</a>
<?}?>
<? if ($ficha['ruta_epub']<>NULL){?>
<a href="./bajandom.php?t=<?echo $ccadena;?>&f=epub" rel="external" data-ajax="false" data-role="button" data-inline="true" data-theme="<?echo $formato;?>">ePub</a>
<?}?>
<? if ($ficha['ruta_mobi']<>NULL){?>
<a href="./bajandom.php?t=<?echo $ccadena;?>&f=mobi" rel="external" data-ajax="false" data-role="button" data-inline="true" data-theme="<?echo $formato;?>">Mobi</a>
<?}?>
</div>
<div class="ui-body ui-body-b ui-corner-all" style="clear : both">
<p style="font-size : 0.7em; font-weight: bold;">
<? echo utf8_encode("Comentarios y Gesti�n de favoritos");?>
</p>
<a href="./comments.php?t=<?echo $ccadena;?>" rel="external" data-ajax="false" data-role="button" data-inline="true" data-theme="<?echo $formato;?>">Comentarios del libro</a>
<hr>
<a href="./controller_favoritos_add.php?t=<?echo $ccadena;?>" rel="external" data-ajax="false" data-role="button" data-inline="true" data-theme="<?echo $formato;?>"><? echo utf8_encode("a�adir a");?> <img src='http://www.doctorfassman.com/wp-content/plugins/star-rating-for-reviews/images/star.png' /></a>
<a href="./controller_favoritos.php?t=<?echo $ccadena;?>" data-role="button" data-inline="true" data-theme="<?echo $formato;?>">Mis <img src='http://www.doctorfassman.com/wp-content/plugins/star-rating-for-reviews/images/star.png' /></a>
</div>
</div> <!--div role="content-primary"-->
</div> <!--div role="main"-->
<? include ("./footer.php");?>
</div> <!-- div data-role="page" id="los+"> -->
|