📄 addhouse.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="myweb.bean.House"%>
<!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"><!-- InstanceBegin template="/Templates/st_template.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0);
//session.invalidate();
%>
<!-- InstanceBeginEditable name="doctitle" -->
<title>高校公寓综合管理平台</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {
color: #333333;
font-weight: bold;
}
.STYLE2 {color: #333333}
.STYLE3 {font-size: 12px}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
#Layer3 { position:absolute;
left:798px;
top:109px;
width:222px;
height:15px;
z-index:2;
}
.STYLE2 {
font-size: 14px;
color: #000066;
}
-->
</style></head>
<%@ page import="java.util.Date,java.util.*,java.text.*"%>
<%@page import="myweb.DBContent.DBContent" %>
<body>
<%
if(session.getAttribute("user")==null)
{
out.print("<script>alert('请先登录!');window.open('../index.jsp','_self')</script>");
}
%>
<jsp:useBean id="db" class="myweb.DBContent.DBContent"></jsp:useBean>
<%
String dd;
Date nowdate=new Date();
int hour=nowdate.getHours();
if(hour>8&&hour<12)
{
dd="上午好,欢迎登陆高校公寓综合管理平台!";
}
else
{
dd="下午好,欢迎登陆高校公寓综合管理平台!";
}
%>
<%
String ddate=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
%>
<table width="1024" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center" background="../Templates/image/index_01.jpg"><!-- InstanceBeginEditable name="EditRegion6" -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="776" height="120">
<param name="movie" value="image/xuanjuan1.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="image/xuanjuan1.swf" width="776" height="120" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
<!-- InstanceEndEditable -->
<div class="STYLE2" id="Layer3">今天是:
<%out.println(ddate);%>
</div></td>
</tr>
<tr>
<td colspan="2"><img src="../Templates/image/index_02.jpg" width="227" height="47" /><img src="../Templates/image/lijianxue11_03.jpg" width="797" height="47" /></td>
</tr>
<tr>
<td width="227" align="left" valign="middle"><span class="STYLE2">
<marquee scrollAmount=2 onmouseover=stop() onmouseout=start() >
<%=dd%>
</marquee>
</span> </td>
<td width="797"><!-- InstanceBeginEditable name="EditRegion7" -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="../Templates/image/index_056.jpg" width="797" height="25" /></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td width="227" height="49" background="../Templates/image/index_04.gif"> </td>
<td height="35" rowspan="3" align="center" valign="top"><!-- InstanceBeginEditable name="EditRegion5" -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="245" align="center"><form action="addhouse.jsp" method="post" name="form1" id="form1" onsubmit="return checkForm()">
<table width="71%" border="1" align="center" bordercolor="#9999FF" bgcolor="#D7E8F2" >
<tr>
<td height="40" colspan="4" align="center">
<p><strong><span class="STYLE1"><font size="5">房间基本信息录入</font></span></strong><font size="3">(加<font color="#660000">*</font>为必填项)</font></td>
</tr>
<tr>
<td width="18%" height="10" align="center"><font>楼号</font></td>
<td width="31%" height="10" align="left"><font color="#660000"><strong>
<input name="buildingid" type="text" class="titlebar" id="buildingid" size="20" maxlength="2" />
</strong></font><font color="#660000"> <font color="#990000">*</font><strong></strong></font></td>
<td width="20%" height="10" align="center">房号</td>
<td width="31%" height="10" align="left"><font color="#660000"><strong>
<input name="houseid" type="text" class="titlebar" id="houseid" size="20" maxlength="3" />
</strong><font color="#990000">*</font></font></td>
</tr>
<tr>
<td height="10" align="center">可住人数</td>
<td height="10" align="left"><font color="#660000"><font color="#660000">
<input name="kezhu" type="text" class="titlebar" id="kezhu" size="20" maxlength="8" />
<font color="#990000">*</font></font></font></td>
<td height="10" align="center">入住人数</td>
<td height="10" align="left"><font color="#660000"><font color="#660000">
<input name="ruzhu" type="text" class="titlebar" id="ruzhu" size="20" maxlength="8" />
<font color="#990000">*</font></font></font></td>
</tr>
<tr>
<td height="10" align="center">入住性别</td>
<td height="10" align="left"><font color="#660000"><font color="#660000"><strong>
<select name="sex" class="titlebar" id="sex">
<option value="">请选择</option>
<option value="男">男</option>
<option value="女">女</option>
</select>
</strong></font><font color="#990000">*</font></font></td>
<td height="10" align="center">住宿费用</td>
<td height="10" align="left"><font color="#660000"><strong>
<input name="hstandard" type="text" class="titlebar" id="hstandard" size="13" maxlength="8" />
</strong></font>元/人 <font color="#660000"> <font color="#990000">*</font></font></td>
</tr>
<tr>
<td height="10" align="center">水表底数<strong> </strong></td>
<td height="10" align="left"><font color="#660000"><strong>
<input name="wstandard" type="text" class="titlebar" id="wdishu" size="16" maxlength="8" />
</strong></font>吨/月</span><font color="#660000"><font color="#990000">*</font></font></td>
<td height="10" align="center">电表底数</td>
<td height="10" align="left"><font color="#660000"><strong>
<input name="estandard" type="text" class="titlebar" id="edishu" size="16" maxlength="8" />
</strong></font>度/月<font color="#660000"> <font color="#CC0000">*</font></font></td>
</tr>
<tr>
<td height="4" align="center">备注</td>
<td height="4" align="left"><font color="#660000">
<textarea name="extra" cols="20" rows="2" class="titlebar" id="extra"></textarea>
</font></td>
<td height="4" align="center" >电话号码</td>
<td height="4" align="left"><font color="#660000"><strong>
<input name="phone" type="text" class="titlebar" id="phone" size="20" maxlength="8" />
</strong></font></td>
</tr>
<tr>
<td height="4" colspan="4" align="center"><font color="#660000"><strong>
<input name="Submit8" type="submit" class="small" value="录入" />
<input name="Submit28" type="reset" class="small" value="重置" />
</strong></font><span class="STYLE2"><font size="3">
<input name="luru" type="hidden" id="luru" value="ok" />
</font></span></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td>
<jsp:useBean id="h" class="myweb.bean.House"/>
<jsp:setProperty name="h" property="*" />
<%
String lu=request.getParameter("luru")!=null?request.getParameter("luru"):"";
if(lu.equals("ok"))
{
String sql1="insert into house values('"+h.getBuildingid()+"','"+h.getHouseid()+"','"+h.getSex()+"','"+h.getPhone()+"','"+h.getKezhu()+"','"+h.getRuzhu()+"','"+h.getHstandard()+"','"+h.getExtra()+"')";
String sql2="insert into standard values('"+h.getWstandard()+"','"+h.getEstandard()+"','"+h.getBuildingid()+"','"+h.getHstandard()+"','"+h.getHouseid()+"')";
db.insert(sql1);
db.insert(sql2);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -