<?php require "Funciones.php"; $msgError = null; $rs = null; if (isset($_POST["enviar"])) { $Cod_libro = $_POST["Cod_libro"]; $query = "DELETE FROM libro WHERE Cod_libro = '{$Cod_libro}'"; $cn = fnConnect($error); $rs = mysql_query($query, $cn); $query1 = "DELETE FROM autor_libro WHERE Cod_libro = '{$Cod_libro}'"; $cn1 = fnConnect($error); $rs1 = mysql_query($query1, $cn1); echo '<script type="text/javascript">alert("Eliminacion Correcta") </script>'; echo "<script> location.href= 'Catalogo.php'</script>"; } $pagina = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; ?> <HTML> <head> <meta charset=UTF-8> <title>Eliminar Libro</title> </head> <body> <br><br>
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es-ES"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>..:: Busqueda ::..</title> </head> <body class="wp-admin"> <div class="wrap" align='center'> <?php $idUsuario = "1"; $idReserva = "3"; if ($idUsuario != 0 || $idUsuario != null) { $cn = fnConnect($msg); if (!$cn) { fnShowMsg("Error", $msg); return; } else { $sql = "SELECT * FROM usuario tu, reserva tr\r\n\t\t\t\t\t\t\t WHERE tu.ID_Usuario={$idUsuario} AND tu.ID_Usuario=tr.ID_Usuario \r\n\t\t\t\t\t\t\t AND tr.ID_Reserva={$idReserva}"; // echo $sql; $rs = mysql_query($sql, $cn) or die("Error al listar historial de reservas"); } ?> <?php /* usuario` ( `ID_Usuario` int(10) unsigned NOT NULL AUTO_INCREMENT,
<?php require "funciones.php"; $msgError = null; $rs = null; if (isset($_POST["enviar"])) { $Cod_autor = $_POST["Cod_autor"]; $Nombre = $_POST["Nombre"]; $Apellido = $_POST["Apellido"]; $Origen = $_POST["Origen"]; $query = "INSERT INTO autor (Cod_autor, Nombre, Apellido, Origen)" . "VALUES ('{$Cod_autor}','{$Nombre}','{$Apellido}','{$Origen}')"; $cn = fnConnect($error); $rs = mysql_query($query, $cn); header("location: Ingresar_Libro_Autor.php"); //echo " dato ingresado!!"; } $pagina = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; ?> <HTML> <head> <meta charset=UTF-8> <meta http-equiv="Content-Type" content+"text/html; charset=UTF-8"/> <link href="../css/stiloI.css" type="text/css" rel="stylesheet"> <title></title> </head> <body>
<?php require "Funciones.php"; $msgError = null; $rs = null; if (isset($_POST["enviar"])) { echo " <CENTER><H1>Listado de los autores de un mismo Origen </H1> </CENTER>"; $Orig = $_POST["Ori"]; $cn = fnConnect($msgError); $result = mysql_query("select * from autor where Origen = '{$Orig}' ", $cn); echo "<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>\n\n <TR>\n <TD> Cod_autor</TD>\n <TD> Nombre </TD>\n <TD> Apellido </TD>\n <TD> Origen </TD>\n </TR>"; while ($row = mysql_fetch_array($result)) { printf("<tr> \n <td> %d</td> \n <td> %s </td> \n <td> %s </td>\n <td> %s </td> \n </tr>", $row["Cod_autor"], $row["Nombre"], $row["Apellido"], $row["Origen"]); } echo "</table>"; mysql_free_result($result); mysql_close($cn); echo "<br><br>"; echo "<a href='OpcionesC.html'><input name='aceptar' type='button' value='Aceptar'></a>"; } $pagina = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; ?> <html> <head> <title>Consultas</title> </head> <body> <br><br><br>