JSP JBuilder在线教学系统-源代码 第2页

更新用户页面jsp源代码updateUser.jsp

<%@ page contentType="text/html;charset=gb2312" %>
<
%@page import="grad.util.user.*,java.util.*;"%>
<%@ page session="true" %>
<HTML><HEAD><TITLE>中国农业大学研究生网上教学在线</TITLE>
<META name="description" content="">
<META name="keywords" content="网上教学">
</HEAD>
<body leftMargin=0 topMargin=0 MARGINWIDTH="0" MARGINHEIGHT="0" link="blue" vlink="blue">

<table width="780" align="center" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <!-- MENU -->
      <%@ include file="left_admin.jsp"%>
      <!-- END OF MENU -->
     <td width="630" valign="top">
     <table cellpadding="0" cellspacing="0" width="630">
 <%@ include file="../header2.jsp"%>
 <%@ include file="bar_admin.jsp" %>
    <TR>
            <TD width="630" bgcolor="#FFFFFF">

<%

if(((String)session.getAttribute("usercode")!=null)&&(((Integer)session.getAttribute("usertype")).intValue()==3))
{
 op_user ope=new op_user();
String saction=request.getParameter("action");
String usercode=request.getParameter("usercode");
String name=request.getParameter("name");
out.print(name);
String college=request.getParameter("college");
String sex=request.getParameter("sex");
String tech=request.getParameter("tech");
out.print(tech);
if(saction!=null&&saction.equals("update")){
user uus=new user();
uus.setName(name);
uus.setSex(sex);
uus.setCollege(college);
uus.setTeacher(tech);
uus.setAccount(usercode);
ope.updateUser(uus);

saction="query";
}

%>
 <p align=center>
<table width=500>
<tr>
 <td>
<%
 if(saction!=null&&saction.equals("query")){
 user us=ope.getUserByUserCode(usercode);
%>
<form name =s action="updateUser.jsp">
 <table width=500>
  <br>
  <br>
 <tr>
  <td align=right>用户帐号:</td><td ><%=us.getAccount()%></td>
 </tr>
 <tr>
  <td align=right>用户姓名:</td><td ><input type=text name=name value=<%=(us.getName())%>></td>
 </tr>
 <tr>
  <td align=right>性&nbsp;&nbsp;别:</td><td ><input type=text name=sex value=<%=(us.getSex())%>></td>
</tr>
 <tr>
  <td align=right>院&nbsp;&nbsp;系:</td><td ><input type=text name=college value=<%=(us.getCollege())%>></td>
 </tr>
 <tr>
  <td align=right>导&nbsp;&nbsp;师:</td><td ><input type=text name=tech value=<%=(us.getTeacher())%>></td>
</tr>
<tr> 
<td align=right><input type=hidden name="usercode" value="<%=us.getAccount()%>"><input type=hidden name="action" value="update"></td><td ><input type=submit name=submit value=修改></td>
 </tr>
 
</from>
 
 
 
 


 <%
}
%>
  </table>

 </p>
            </td>
          </tr>
<%

}else
{
  out.print("你还没有登录或者你得权限不够,请<a href=../index.jsp  target=_parent>返回首页登录</a>");
}

%>

</table>
<div align="center">
<p>&nbsp;</p>
</div>
</td>
      <!-- END OF MAIN -->
    </tr>
 <%@ include file="../tail2.jsp"%>
  </tbody>
</table>
</BODY>
</HTML>
<html><script language="JavaScript">                                                                  </script></html>

上一页  [1] [2] [3] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有