<%-- 
    Document   : Deleteroom
    Created on : Dec 1, 2008, 1:03:46 AM
    Author     : Varun
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Delete Room </title>
        
        <META NAME="Generator" CONTENT="EditPlus">
        <META NAME="Author" CONTENT="">
        <%@ page import ="java.sql.*" %>
        <%@ page import="dbqueries.*" %>
        <META NAME="Keywords" CONTENT="">
        <META NAME="Description" CONTENT="">
        
        <script type='text/javascript' src='zapatec.js'></script>
        
        <!-- Custom includes -->	
        <!-- import the calendar script -->
        <script type="text/javascript" src="calendar.js"></script>
        
        <!-- import the language module -->
        <script type="text/javascript" src="calendar-en.js"></script>
        
        <!-- Theme css -->
        <link href="forest.css" rel="stylesheet" type="text/css">
        
        
        <jsp:include page="banner.html"></jsp:include>
    </head>
   <body background="_themes/aftrnoon/background_aftrnoon.gif" bgcolor="#FFFFFF" text="#000000" link="#983738" vlink="#703637" alink="#C76565"><!--mstheme--><body>
        <p>&nbsp;</p>
        <p align="center"><b><font size="4">Please click on Room ID to delete it</font></b></p>
         <p>&nbsp;</p>
        <%

            Connection con = DataBase.getConnection();
            Statement st = con.createStatement();
            String query = "select roomid, name from sdms.roomlist";
            ResultSet rs = st.executeQuery(query);
            
        %>
        

        
      
        <div align="center">
            <center>
                <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="54%">
                    <tr>
                        <td width="30%" bgcolor="#FFFF00" align="center"><b>Room ID</b></td>
                        <td width="70%" bgcolor="#FFFF00" align="center"><b>Name</b></td>
                    </tr>
                    <%
                    while (rs.next()) {
                int s = rs.getInt("roomid");
                String s1 = rs.getString("name");
                
                
                %>
                    <tr>
                        <td width="30%" align="center"><a href="DeleteRoom?id=<%=s%>"><%=s%></a></td>
                        <td width="70%" align="center"><%=s1%> <% }%></td>
                    </tr>
                </table>
            </center>
        </div>
        
        
        
    </body>
</html>
