⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jhym0.jsp

📁 城市应急预案系统:web控制站点部分 可作为jsp开发借鉴 有比较完善的站点功能
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page language="java" import="connbean.Jconnect, java.sql.*"%>
<%
	String[] the_checkbox = request.getParameterValues("the_checkbox");
	String phone1 = " ";
	String phone2 = " ";
	String phone3 = " ";
	String username = request.getParameter("username");
	String password = request.getParameter("password");
	String t_username = null;

	if (the_checkbox != null)
		for (int i = 0; i < the_checkbox.length; i++) {
			System.out.println("checkbox[" + i + "] = " + the_checkbox[i]);
			if (the_checkbox[i].equals("1")) {
				phone1 = request.getParameter("user1");
			}
			else if (the_checkbox[i].equals("2")) {
				phone2 = request.getParameter("user2");
			}
			else if (the_checkbox[i].equals("3")) {
				phone3 = request.getParameter("user3");
			}
		}

	System.out.println("phone1 = " + phone1 + ", phone2 = " + phone2 + ", phone3 = " + phone3);
	System.out.println("user = " + username);

	
		Jconnect conn = new Jconnect();
		ResultSet rs = null;

		try {		
	
		conn.openConn();
		rs = conn.executeQuery("select * from dm_login where code ='" + username +"' and pwd1 ='" + password +"'");

		if(rs.next()) {
			t_username = rs.getString("code").trim();
	
			System.out.println("t_username =" +t_username);
		}
		} catch(Exception e) {
		System.out.println(e.toString());
		} finally {
			try {
				if (rs != null)
					rs.close();
			} catch(Exception e){}
			conn.close();
		}

	if(t_username != null)
	{
		try {
			conn.openConn();
			CallableStatement cst = conn.conn.prepareCall("{call INSPROJ2(?,?,?,?)}");
			cst.setString(1, phone1);
			cst.setString(2, phone2);
			cst.setString(3, phone3);
			cst.setString(4, username);

			rs = cst.executeQuery();
			if (rs.next()) {
				session.setAttribute("id", rs.getInt(1) + "");
				session.setMaxInactiveInterval(7200);
				System.out.println(rs.getInt(1));
			}
		} catch(Exception e) {
			System.out.println("Connect DB ERROR.");
			System.out.println(e.toString());	
		} finally {
			try {
				if (rs != null)
					rs.close();
			} catch(Exception e) {
				System.out.println("Close ResultSer Error");
				System.out.println(e.toString());
			}	
			conn.close();
		}
%>

<Script Language="JavaScript">
	function mycheck()
	{
		var truthBeTold = window.confirm("是否修改报告内容?");
		if (truthBeTold) {
			window.alert("点击确定将结束应急行动并填写使用报告(演示系统暂时不提供此功能)");
			return true;
		}
		else{  
			window.close();
			return false;
		}

	}
	function mycheck1()
	{
		
			window.alert("填写/修改预案使用报告(演示系统暂时不提供此功能)");

	}
	function mycheck2()
	{
		
			window.alert("查看预案使用记录(演示系统暂时不提供此功能)");

	}
	function mycheck3()
	{
		
			window.alert("查询命令回复码(演示系统暂时不提供此功能)");

	}
</script>

<script language="JavaScript">
<!--
function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>


<html>
<head>
<title> 预案信息交互 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body topmargin="0" leftmargin="0" background="img/ba1.jpg">
<table width="800" align="center" height="100%" border="0" cellspacing="0" cellpadding="0">


 <tr width="980" align="center">
 <td width="98%" height="100%">
  <table width="980" height="100%" border="0">
   <tr>
   <td width="100%" height="10" valign="middle" colspan="5">
		<hr>
   </td>
   </tr>
   <tr>	
   <td align="center" valign="middle" width="20%" height="30">
	   <input type="button" name="hckz" value="&nbsp;&nbsp;当场会场控制&nbsp;&nbsp;" style="cursor:hand" onclick="window.open('meeting_control.jsp')" >
   </td>
   <td align="center" valign="middle" width="20%"> 
	  <input type="button" name="hckz" value="&nbsp;子案内容修改&nbsp;" style="cursor:hand" onclick="window.open('xiug.jsp')">
    </td>
	<td align="center" valign="middle" width="20%"> 
	   <input type="button" name="hckz" value="预案使用记录查询" style="cursor:hand" onclick="return mycheck2()">
    </td>
    <td align="center" valign="middle" width="20%">
	   <input type="button" name="hckz" value="命令回复码查询" style="cursor:hand" onclick="return mycheck3()">
    </td>
	<td align="center" valign="middle" width="20%"> 
		  <select> 
			<option selected>&nbsp;&nbsp;&nbsp;即时通信&nbsp;&nbsp;&nbsp;</option>
			<option >即时传真</option>
			<option >即时语音通知</option>
			<option >即时广播</option>
			<option >即时电话会议</option>
			<option >即时语音考勤</option>
		  </select>
	</td>	  
    </tr>
 <tr>
    <td width="100%" height="10" valign="middle" colspan="5">
		<hr>
    </td>
</tr>

<tr width="980" height="96%" align="center">
 <td width="100%" height="96%" valign="middle" colspan="5">
 <table align="center" width="100%" height="100%">
 <tr>
  <td colspan="3" rowspan="4" id="leftframe" width="60%" valign="top" align="left">
     <iframe name="left" src="jhym1.jsp" width="100%" height="100%" valign="top" frameborder="0" scrolling="auto" ></iframe>
  </td>
  <td width="40%" colspan="3" id="rightframe" valign="top" align="left">
    <table width="100%" height="100%" align="center">
	 <tr height="50%" valign="top">
	 <td id="rtop" valign="top">
	  <iframe name="top" src="jhym2.jsp" width="100%" height="100%" valign="top" frameborder="0" scrolling="auto" ></iframe>
      </td></tr>
	  <tr height="3">
	  <td colspan="3">
	  <hr>
	  </td></tr>
	  <tr height="50%">
	  <td id="rbottom" valign="bottom">
	   <iframe name="bottom" src="jhym3.jsp" width="100%" height="100%" valign="top" frameborder="0" scrolling="auto" ></iframe></td></tr>
	   </table></td>
</tr>
</table></td></tr>
 <tr width="980">
    <td width="100%" height="10" valign="middle" colspan="5">
		<hr>
    </td>
  </tr>

<tr>
<td colspan="5">
<table width="100%" border="0">
  <tr width="100%"> 
    <td align="center" valign="middle">
	
	   <input type="button" name="hckz" value="填写/修改预案使用报告" style="cursor:hand" onclick="return mycheck1()">
   
    </td>
    <td align="center" valign="bottom"> 
	
	  <input type="submit" name="hckz" value="&nbsp;&nbsp;应急行动结束&nbsp;&nbsp;" style="cursor:hand" 
	   onclick="return mycheck()">
	    
    </td>
	<td align="center" valign="middle"> 
	
	   <input type="submit" name="hckz" value="&nbsp;&nbsp;&nbsp;特色功能演示&nbsp;&nbsp;&nbsp;" style="cursor:hand" onClick="window.open('function.jsp')">
	   
    </td>
    <td align="center" valign="middle">
       
	   <input type="submit" name="hckz" value="&nbsp;&nbsp;&nbsp;&nbsp;产品介绍&nbsp;&nbsp;&nbsp;&nbsp;" style="cursor:hand" onClick="window.open('introduce.jsp')">
    
	</td>
  </tr>
</table> </td></tr>    
</table></td></tr>
</table>

</body>
</html>
<%
	}else {
%>
	<table width="102%" cellspacing="0" cellpadding="0" height="100%" align="center"> 
	<tr> 
		
		<td valign="middle" align="center" height="207" width="38%" align="center"> 
		  <div align="center"><b><font color="#CC0000" size="5" face="黑体">用户名或密码不正确,请您重新确认</font></b></div>
		</td>
	</tr>
	<tr valign="top"> 
		<td colspan="3" height="29"> 
			<table width="100%" cellspacing="0" cellpadding="0" height="8"> 
				<tr> 
					<td background="img/bg_03.gif" height="2">&nbsp;</td>
				</tr> 
			</table>
		</td>
	</tr> 
	<tr align="center" valign="middle">
		<td colspan="3" height="79"><font size="2"><b class="font1">
	<br> 
	<br> 

	<br>
	<br> 
	</b></font>
		</td>
	</tr>
	<tr>
		<td valign="top" colspan="3" height="16"> 
			<table width="100%" cellspacing="0" cellpadding="0"> 
				<tr> 
					<td background="img/bg_03.gif" height="3">&nbsp;</td>
				</tr> 
			</table>
		</td>
	</tr> 
	<tr align="center" valign="middle"> 
		<td colspan="3" height="61">

			<a href="login.jsp"><img src="img/backbutton.gif" width="68" height="28" border="0"></a>

		</td>
	</tr> 
	<tr> 
		<td valign="top" colspan="3" height="157">&nbsp;</td>
	</tr> 
	<tr> 
		<td valign="top" colspan="3" height="16"> 
		  <table width="100%" cellspacing="0" cellpadding="0" height="8">
			<tr> 
			  <td background="img/bg_03.gif" height="2">&nbsp;</td>
			</tr> 
		  </table>
		</td>
	</tr>  
</table>
<%	
	 }
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -