Viewing file: sinopsis.php (2.92 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<html> <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> <body>
<center>
<?php if (!$_REQUEST['ID']){ echo "parametro no pasado"; die(); }
$id_limpio=$_REQUEST['ID'];
settype($id_limpio,"int"); include("conn.php"); include "./classes/class.log.php"; $control= new control(); $id=$id_limpio;
$query2="SELECT * FROM libros WHERE id='$id' ";
; //40 $rowsin=mysql_fetch_array(mysql_query($query2,$conn));
$diferencia=date_diff($rowsin['tiempo'],date("Y-m-d")); if ((strtoupper($control->subgrupo)==="BIBLIOTECARIO" or (trim(strtoupper($control->usuario))===trim(strtoupper($rowsin['correo'])) and $diferencia <=2 )) and !$anonimo){
$query="select * from libros where id=$id_limpio";
$res=mysql_query($query,$conn); $row=mysql_fetch_array($res);
$Atitulo=split("http://www.cocido-maragato.com/extras/fb2/",$row['ruta']); $atitulo2=$Atitulo[1]; $atitulo3=split(".zip",$atitulo2); $titulo=$atitulo3[0]; //echo $titulo;
?>
<table border=0 align=center><br><tr><h1><?php echo $row['autor'] ."-". $row['titulo'];?></h1><tr><td align=center bgcolor=yellow><h1>Subir sinopsis y/o Portada</h1></td></tr></table> <hr> <?php
$query="select * from sinopsis where id_book=$id_limpio";
$res2=mysql_query($query,$conn); @$row2=mysql_fetch_array($res2); ?> <Table border=0 align=center> <form action="ftpuploadsinopsisnuevo.php?ID=<?php echo $id_limpio;?>" method="post" enctype="multipart/form-data"> <tr><td>A�o de publicaci�n del original<td><input type="text" name="anyo" value="<? echo $row['anyo'];?>"></tr> <tr><br> </tr> <tr><td>Selecciona imagen de portada <b>opcional</b><td bgcolor="#C0FFC0" ALIGN=center> <?
if (empty($row2['imagename'])){ echo "<img src='question-mark.jpg'><br>"; }else{ $rand=rand(1111,9999); echo "<img src='../includes/{$row2['imagename']}?erftgw=$rand' WIDTH='107' HEIGHT='165'><br>"; } ?><br>subir imagen <input name="imagen" type="file" value='<?echo $row2['imagename'];?>'><tr> <br><tr>
<td> introduce sinopsis del libro <b>opcional</b><td><textarea rows="5" name="sinopsis" cols="40"><?echo trim($row2['sinopsis']);?></textarea><tr> <tr><td> <input type=hidden name="titulo" value="<?php echo $titulo;?>"> <input type="submit" name="submit" value="Enviar"><INPUT TYPE="Reset"></tr> <span id="advice"> </span> </form> </table> <a href='javascript:history.back(-1)' style="text-decoration:none"><img src=volver.png border=0></img></a> <? } // endif?> </body> </html>
<? function date_diff($date1, $date2){ if (!is_integer($date1)) $date1 = strtotime($date1); if (!is_integer($date2)) $date2 = strtotime($date2); return(floor(abs($date1 - $date2) / 60 / 60 / 24)); } ?>
|