Viewing file: controller_autor.php (2.29 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include ("header.php");?>
<body>
<?// 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");
mysql_query("SET NAMES 'utf8'",$conn);
$control= new control();
$encriptado=new Encriptor();
if ($control->usuario=="anonimo"){
// redirigimos
?>
<script type="text/javascript">
window.location="<?echo "./index.php";?>";</script>
<?}
// fin comprobacion identidad
$sql="SELECT * from ".BBDD.".libros where autor like '%".$encriptado->decrypt($_REQUEST['id'])."%' and inftp=1 order by fecha_subida desc ";
$sql2="select count(*) as contador from ".BBDD.".libros where autor like '%".$encriptado->decrypt($_REQUEST['id'])."%' and inftp=1 ";
$total_autor=mysql_fetch_array(mysql_query($sql2,$conn));
?>
<div data-role="page" id="controller_subcat" 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">
<p style='text-align : center'><h4 style='font-family: "fontin"; font-size : 2em; text-align:center;'><? echo $total_autor['contador'];?> libros de <?echo $encriptado->decrypt($_REQUEST['id']);?></h4></p>
</div>
<hr>
<div class="ui-body ui-body-b ui-corner-all">
<ul data-role="listview">
<?
$res=mysql_query($sql,$conn);
while ($row=mysql_fetch_array($res)){
$id_book=$encriptado->encrypt($row['id']);
$titulo= $row['titulo'];
$autor= $row['autor'];
?>
<li>
<?
echo "<a href='./enlace.php?ID=$id_book'>";
$portada=$localhost."/includes/".$row['id'].".jpg";
?>
<img src="<? echo $portada;?>" />
<h3><? echo $titulo;?></h3>
<p style="font-size : small;"><? echo $autor;?> (<? echo $row['anyo'];?>)
</p>
</a></li>
<?
}
?>
</ul>
</div><!-- ui-body ui-body-b ui-corner-all-->
</div> <!--div role="content-primary"-->
</div> <!--div role="main"-->
<? include ("./footer.php");?>
</div> <!-- div data-role="page" id="controller_subcat"> -->
</body>
</html>
|