我的爱人的问题
index界面的程序是找个:
============================================
<html>
<head>
<title>档案目录综合查询系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/login2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #999999;
}
.style1 {color: #5EA500}
-->
</style>
<script>
//window.location="http://10.0.0.100/";
function selectstart()
{
window.event.cancelBubble = true;
window.event.returnValue = false;
return false;
}
function gotopwd(ii)
{
if(window.event.keyCode==13)
{
checkout();
if(document.all.uid.value=="")document.all.uid.focus();
else if(document.all.pwd.value=="")document.all.pwd.focus();
}
if(ii==1&&window.event.keyCode==9)
{
//document.all.pwd.focus();
//document.all.pwd.selected();
}
if(ii==2&&window.event.keyCode==9)
{
//document.all.uid.focus();
}
} function checkout()
{
if(document.all.uid.value=="")
{
alert("请输入用户名!");
document.all.uid.focus();
}
else if(document.all.pwd.value=="")
{
alert("请输入密码!");
document.all.pwd.focus();
}
else
{ var oawin = window.open("oa/main/middle.htm","HGOA","height=120,width=350,scrollbars=no,resizable=yes,left=231,top=196,status=yes,toolbar=yes,menubar=no");
oawin.focus();
oawin.opener=window;
}
} function openweb()
{
if(document.all.uid.value==""&&document.all.pwd.value=="")
{
var oawin = window.open("oa/main/index.jsp","WEB");
oawin.focus();
oawin.opener=window;
}
else
{
document.all.uid.value="";
document.all.pwd.value="";
}
} //window.location="web/template/index.jsp";
</script>
</head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onselectstart="selectstart()">
<br>
<br>
<br><table width="794" height="451" border="0" align="center" cellpadding="0" cellspacing="0" background="image/mainbg.jpg">
<tr>
<td align="top" valign="top"><table width="794" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="542" height="175"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="40"> </td>
<td width="50" class="navigation style1">用户名:</td>
<td><input id="uid" tabindex=1 type="text" class="textfield1" onMouseOver="this.focus();" onFocus="this.select();" name="uid" onKeyDown="gotopwd(1);" maxlength=16 size="20" style="background-image:url('image/textbg.jpg');"></td>
</tr>
<tr>
<td height="40"> </td>
<td class="navigation style1">密 码:</td>
<td><input id="pwd" tabindex=2 type="password" class="textfield1" onMouseOver="this.focus();" onFocus="this.select();" name="pwd" onKeyDown="gotopwd(2);" maxlength=16 size="22" style="background-image:url('image/textbg.jpg');"></td>
</tr>
<tr>
<td height="60"> </td>
<td colspan="2" valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="41%" align="center"><input name="imageField" type="image" src="image/button21.jpg" border="0" onclick="javascript:checkout();"></td>
<td width="41%" align="center"><input name="imageField2" type="image" src="image/button22.jpg" border="0"></td>
<td width="18%"> </td>
</tr>
</table></td>
</tr>
</table>
<table>
<tr><td height="40"> </td></tr>
<tr><td width="250" align="right"><font color="#000000" style="font-size:12px;"></font></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
============================================
在这之后用户输admin
密码输123
进入希望调出编辑的界面但是我不会她也不会我根本不懂jsp希望达人帮忙解决
在输入用户名和密码后出现的不是个界面而是如下代码:
============================================
<%
/**********************************************************
Copyright (C),2003-11-2, Beijing USTB.
All rights reserved.
Filename: loginoa.jsp
Author: xx
Version 1.0
Date:2003-11-2
Description:身份验证
Other:
Variable List:Function List:History:
***********************************************************/
%>
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<jsp:useBean id="ds" scope="page" class="oa.main.DealString"/>
<%
oa.bean.PersonBean myBean =null;
try{
myBean = new oa.bean.PersonBean(); if(myBean.getConn()==null)
{
%>
数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
<%out.close();
}
String screenwidth = (String)request.getParameter("w");
session.setAttribute("SCREEN",screenwidth);
String yhm = ds.toGBK(request.getParameter("uid"));
String pwd = request.getParameter("pwd");
//论坛登录存放的用户名和密码
session.setAttribute("YHM",yhm);
session.setAttribute("MM",pwd);
//System.out.println("\n=="+yhm+"==");
yhm=yhm.toLowerCase();
yhm=yhm.trim();
//System.out.println("\n=="+yhm+"==");// yhm = myBean.toID("ZZ_ZGB","YHM","ZGBH",yhm)+"";
yhm = myBean.getZGBH(yhm);
myBean.setPersonNO(yhm);
boolean b = myBean.verifyPwd(pwd);%>
<html>
<head>
<title>密码验证</title>
</head>
<body leftmargin=0 topmargin=0><iframe marginwidth=0 marginheight=0 src="progress/start.jsp?b=<%=b%>" frameborder=0 scrolling=no width=350 height="120">
</iframe><%
if(b)//密码正确
{
//删除在线用户
String ip = request.getRemoteAddr(); session.setAttribute("zgbh",yhm);%>
<script>
setTimeout("loginoa()",1500);
</script>
<%
}
else
{
%>
<script>
window.opener.document.all.uid.value="";
window.opener.document.all.pwd.value="";
alert("您输入的用户名或密码不正确!");
window.close();
</script>
<%
}
%>
<script>
function loginoa()
{
window.opener.document.all.uid.value="";
window.opener.document.all.pwd.value="";
mywin = window.open("../../oa.jsp","_self","menubar=yes,status=yes,toolbar=yes");
mywin.focus(); //定义窗口最大化
window.moveTo(0,0);
//window.resizeTo(screen.width,screen.height);
window.resizeTo(screen.availWidth,screen.availHeight);
}
</script>
</body>
</html>
<%}catch(Exception e){oa.main.Logger.log("ERROR:oa.main.loginoa.jsp=>");e.printStackTrace(oa.main.Logger.log);}
finally{
if(myBean!=null)myBean.closeConn();
}%>
============================================
祈求达人帮忙
小弟在此感激不尽
就要整出这个编辑的界面就好别一点进入就出代码哈哈哈哈!
index界面的程序是找个:
============================================
<html>
<head>
<title>档案目录综合查询系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/login2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #999999;
}
.style1 {color: #5EA500}
-->
</style>
<script>
//window.location="http://10.0.0.100/";
function selectstart()
{
window.event.cancelBubble = true;
window.event.returnValue = false;
return false;
}
function gotopwd(ii)
{
if(window.event.keyCode==13)
{
checkout();
if(document.all.uid.value=="")document.all.uid.focus();
else if(document.all.pwd.value=="")document.all.pwd.focus();
}
if(ii==1&&window.event.keyCode==9)
{
//document.all.pwd.focus();
//document.all.pwd.selected();
}
if(ii==2&&window.event.keyCode==9)
{
//document.all.uid.focus();
}
} function checkout()
{
if(document.all.uid.value=="")
{
alert("请输入用户名!");
document.all.uid.focus();
}
else if(document.all.pwd.value=="")
{
alert("请输入密码!");
document.all.pwd.focus();
}
else
{ var oawin = window.open("oa/main/middle.htm","HGOA","height=120,width=350,scrollbars=no,resizable=yes,left=231,top=196,status=yes,toolbar=yes,menubar=no");
oawin.focus();
oawin.opener=window;
}
} function openweb()
{
if(document.all.uid.value==""&&document.all.pwd.value=="")
{
var oawin = window.open("oa/main/index.jsp","WEB");
oawin.focus();
oawin.opener=window;
}
else
{
document.all.uid.value="";
document.all.pwd.value="";
}
} //window.location="web/template/index.jsp";
</script>
</head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onselectstart="selectstart()">
<br>
<br>
<br><table width="794" height="451" border="0" align="center" cellpadding="0" cellspacing="0" background="image/mainbg.jpg">
<tr>
<td align="top" valign="top"><table width="794" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="542" height="175"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="40"> </td>
<td width="50" class="navigation style1">用户名:</td>
<td><input id="uid" tabindex=1 type="text" class="textfield1" onMouseOver="this.focus();" onFocus="this.select();" name="uid" onKeyDown="gotopwd(1);" maxlength=16 size="20" style="background-image:url('image/textbg.jpg');"></td>
</tr>
<tr>
<td height="40"> </td>
<td class="navigation style1">密 码:</td>
<td><input id="pwd" tabindex=2 type="password" class="textfield1" onMouseOver="this.focus();" onFocus="this.select();" name="pwd" onKeyDown="gotopwd(2);" maxlength=16 size="22" style="background-image:url('image/textbg.jpg');"></td>
</tr>
<tr>
<td height="60"> </td>
<td colspan="2" valign="bottom"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="41%" align="center"><input name="imageField" type="image" src="image/button21.jpg" border="0" onclick="javascript:checkout();"></td>
<td width="41%" align="center"><input name="imageField2" type="image" src="image/button22.jpg" border="0"></td>
<td width="18%"> </td>
</tr>
</table></td>
</tr>
</table>
<table>
<tr><td height="40"> </td></tr>
<tr><td width="250" align="right"><font color="#000000" style="font-size:12px;"></font></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
============================================
在这之后用户输admin
密码输123
进入希望调出编辑的界面但是我不会她也不会我根本不懂jsp希望达人帮忙解决
在输入用户名和密码后出现的不是个界面而是如下代码:
============================================
<%
/**********************************************************
Copyright (C),2003-11-2, Beijing USTB.
All rights reserved.
Filename: loginoa.jsp
Author: xx
Version 1.0
Date:2003-11-2
Description:身份验证
Other:
Variable List:Function List:History:
***********************************************************/
%>
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<jsp:useBean id="ds" scope="page" class="oa.main.DealString"/>
<%
oa.bean.PersonBean myBean =null;
try{
myBean = new oa.bean.PersonBean(); if(myBean.getConn()==null)
{
%>
数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
<%out.close();
}
String screenwidth = (String)request.getParameter("w");
session.setAttribute("SCREEN",screenwidth);
String yhm = ds.toGBK(request.getParameter("uid"));
String pwd = request.getParameter("pwd");
//论坛登录存放的用户名和密码
session.setAttribute("YHM",yhm);
session.setAttribute("MM",pwd);
//System.out.println("\n=="+yhm+"==");
yhm=yhm.toLowerCase();
yhm=yhm.trim();
//System.out.println("\n=="+yhm+"==");// yhm = myBean.toID("ZZ_ZGB","YHM","ZGBH",yhm)+"";
yhm = myBean.getZGBH(yhm);
myBean.setPersonNO(yhm);
boolean b = myBean.verifyPwd(pwd);%>
<html>
<head>
<title>密码验证</title>
</head>
<body leftmargin=0 topmargin=0><iframe marginwidth=0 marginheight=0 src="progress/start.jsp?b=<%=b%>" frameborder=0 scrolling=no width=350 height="120">
</iframe><%
if(b)//密码正确
{
//删除在线用户
String ip = request.getRemoteAddr(); session.setAttribute("zgbh",yhm);%>
<script>
setTimeout("loginoa()",1500);
</script>
<%
}
else
{
%>
<script>
window.opener.document.all.uid.value="";
window.opener.document.all.pwd.value="";
alert("您输入的用户名或密码不正确!");
window.close();
</script>
<%
}
%>
<script>
function loginoa()
{
window.opener.document.all.uid.value="";
window.opener.document.all.pwd.value="";
mywin = window.open("../../oa.jsp","_self","menubar=yes,status=yes,toolbar=yes");
mywin.focus(); //定义窗口最大化
window.moveTo(0,0);
//window.resizeTo(screen.width,screen.height);
window.resizeTo(screen.availWidth,screen.availHeight);
}
</script>
</body>
</html>
<%}catch(Exception e){oa.main.Logger.log("ERROR:oa.main.loginoa.jsp=>");e.printStackTrace(oa.main.Logger.log);}
finally{
if(myBean!=null)myBean.closeConn();
}%>
============================================
祈求达人帮忙
小弟在此感激不尽
就要整出这个编辑的界面就好别一点进入就出代码哈哈哈哈!
这个东西是老的东西开始能用,后来不知道要干什么,大概是把老东西改改。
估计是Goldrush说的“可能是少<%%> 或<%的位置不对 或javascript <script > 的位置不对”.
用的什么服务器我也不清楚,不过应该支持的,是不是没有服务器就出不来界面啊!我实在是不懂找个玩意。还请达人明示。
没有服务器怎么跑呢?服务器有Tomcat,WebService,JBoss等等等等
倒什么都不明白连问题都问不清楚
但真的算得上是恋爱达人
很佩服楼主现在问题解决没有
如果没有,很愿意帮忙
msn : [email protected](9:30 am -- 6:00 pm )在线