<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%> <%@ include file="Connections/library.jsp" %> <%--Copyright (C) 2002 Tony Grant This file is part of lmstoolkit lmstoolkit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. lmstoolkit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with lmstoolkit; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA--%> <% String update__varDoc = "1"; if (request.getParameter("book_id") !=null) {update__varDoc = (String)request.getParameter("book_id");} %> <% Driver Driverupdate = (Driver)Class.forName(MM_library_DRIVER).newInstance(); Connection Connupdate = DriverManager.getConnection(MM_library_STRING,MM_library_USERNAME,MM_library_PASSWORD); PreparedStatement Statementupdate = Connupdate.prepareStatement("SELECT book_id FROM books WHERE book_id = '" + update__varDoc + "'"); ResultSet update = Statementupdate.executeQuery(); boolean update_isEmpty = !update.next(); boolean update_hasData = !update_isEmpty; Object update_data; int update_numRows = 0; %> <html> <head> <title> Auteur dans books</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> <link href="lmstk.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <h1 align="center">Add author</h1> <table width="660" border="0" align="center" cellpadding="3"> <tr> <td> <form name="form2" action="put_author.jsp"> <table align="center"> <tr valign="baseline"> <td nowrap align="right">Name:</td> <td> <input type="text" name="name" value="name" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">First name:</td> <td> <input type="text" name="first_name" value="first_name" size="32"> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> <input type="submit" value="Author" name="artist"> </td> </tr> </table> <input type="hidden" name="book_id" value="<%=(((update_data = update.getObject("book_id"))==null || update.wasNull())?"":update_data)%>"> </form> <p> </p> </td> </tr> </table> <p> </p> <p align="center"> </p> </body> </html> <% update.close(); Connupdate.close(); %>