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

📄 modifyold.jsp

📁 “JSP数据库项目案例导航”一书从第一章到第十一章各章实例的源程序文件以及数据库文件。 注意: 1. 本书中的案例提供的数据库环境不同
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id='db' scope='request' class='Base.DataBean.DefaultDataBean' /><jsp:useBean id='dealstring' scope='request' class='com.util.DealString' /><html><head><link rel=stylesheet href="../index.css" type="text/css"><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>用户配置</title></head><body><%String orients=null;String[] ids=dealstring.splitStr(db.getAttributeStr("people.orients"),',');for(int i=0;i<ids.length;i++){for(int j=0;j<db.getCount("orient");j++){if(db.getAttributeStr("orient.id",j).equals(ids[i])){if(orients!=null){orients+=db.getAttributeStr("orient.name",j)+" ";}else{orients=db.getAttributeStr("orient.name",j)+" ";}}}}%><%String projects=null;ids=dealstring.splitStr(db.getAttributeStr("people.Projects"),',');for(int i=0;i<ids.length;i++){for(int j=0;j<db.getCount("project");j++){if(db.getAttributeStr("project.id",j).equals(ids[i])){if(projects!=null){projects+=db.getAttributeStr("project.name",j)+" ";}else{projects=db.getAttributeStr("project.name",j)+" ";}}}}%><%String tasks=null;ids=dealstring.splitStr(db.getAttributeStr("people.Tasks"),',');for(int i=0;i<ids.length;i++){for(int j=0;j<db.getCount("task");j++){if(db.getAttributeStr("task.id",j).equals(ids[i])){if(tasks!=null){tasks+=db.getAttributeStr("task.name",j)+" ";}else{tasks=db.getAttributeStr("task.name",j)+" ";}}}}%><form name="form1" method="post" action="domodify.cgi">  <table width="100%" height="20"  border="0" cellpadding="0" cellspacing="0">    <tr>      <td>&nbsp;</td>    </tr>  </table>  <table width="100%"  border="0" cellpadding="0" cellspacing="0">    <tr>      <td width="40">&nbsp;</td>      <td width="910"><table width="100%" height="20"  border="0" cellpadding="0" cellspacing="0">          <tr>            <td height="20" class="title_s"><img src="../pics/login.gif" width=50>&nbsp;欢迎您>><%=(String)session.getAttribute("NAME")%> </td>          </tr>          <tr>            <td height="5" bgcolor="#C8F8BA"></td>          </tr>          <tr>            <td height="1" bgcolor="#2E990F"></td>          </tr>      </table></td>      <td width="50">&nbsp;</td>    </tr>  </table>  <table width="100%"  border="0" cellpadding="0" cellspacing="0">    <tr>      <td width="40">&nbsp;</td>      <td width="910">        <table class="main_w" width="100%"  border="1" cellpadding="4" cellspacing="0" bordercolor="FFFFFF" bgcolor="E8FCE2">          <tr bgcolor="#FFFFFF" class="title_s">            <td height="20" colspan="2"><div align="center">用户资料修改</div>                <div align="center"></div></td>          </tr>          <tr class="title_s">            <td width="45%" height="20"><div align="center" class="title_s">                <div align="center">用户姓名:</div>            </div></td>            <td width="55%" height="20" class="main_w">              <div align="left">                <input name="name" type="text" id="name2" value="<%= db.getAttributeStr("people.name")%>">                <input type="hidden" name="id" value="<%= db.getAttributeStr("people.id")%>">              </div></td>          </tr>          <tr>            <td height="20" class="title_s"><div align="center" class="title_s">学号:</div></td>            <td height="20"><div align="center" class="title_s">                <div align="left">                  <input name="workid" type="text" id="workid" value="<%= db.getAttributeStr("people.workid")%>">                </div>            </div></td>          </tr>          <tr>            <td height="20" class="title_s"><div align="center">用户角色:</div></td>            <td height="20"><select name="role">			 <%	          for(int i=0;i<db.getCount("role");i++){	           %>                <option value=<%= db.getAttributeStr("role.id",i) %>				<%				if(db.getAttributeStr("role.name",i).equals(db.getAttributeStr("myrole.name"))){				%>				selected				<%				}				%>				><%= db.getAttributeStr("role.name",i) %></option>                <%	             }	             %>            </select></td>          </tr>          <tr>            <td height="20" class="title_s"><div align="center">性 &nbsp;&nbsp;&nbsp;别:</div></td>            <td height="20">              <div align="left">                  <select name="sex" id="sex">                    <option value="1" 					<%					if(db.getAttributeStr("people.sex").equals("1")){					%> 					selected					<%					}					%>>男</option>                    <option value="0"					<%					if(db.getAttributeStr("people.sex").equals("0")){					%> 					selected					<%					}					%>>女</option>                </select>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">民&nbsp;&nbsp;&nbsp; 族:</div></td>            <td height="20">              <div align="left">                <input name="nation" type="text" id="nation" value="<%= db.getAttributeStr("people.nation")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">政治面貌:</div></td>            <td height="20">              <div align="left">                  <select name="politics" id="politics">                    <option value="1"					<%					if(db.getAttributeStr("people.politics").equals("1")){					%> 					selected					<%					}					%>					>中共党员</option>                    <option value="2"										<%					if(db.getAttributeStr("people.politics").equals("2")){					%> 					selected					<%					}					%>										>共青团员</option>		    <option value="3"										<%					if(db.getAttributeStr("people.politics").equals("3")){					%> 					selected					<%					}					%>					>民主党派</option>                                       <option value="4"										<%					if(db.getAttributeStr("people.politics").equals("4")){					%> 					selected					<%					}					%>					>无党派人士</option>		   <option value="5"										<%					if(db.getAttributeStr("people.politics").equals("5")){					%> 					selected					<%					}					%>					>群众</option>                  </select>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">身份证号:</div></td>            <td height="20">              <div align="left">                <input name="certid" type="text" id="certid" value="<%= db.getAttributeStr("people.certid")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">毕业学校:</div></td>            <td height="20">              <div align="left">                <input name="fromschool" type="text" id="fromschool" value="<%= db.getAttributeStr("people.fromschool")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">毕业时间:</div></td>            <td height="20">              <div align="left">                <input name="schooltime" type="text" id="schooltime" value="<%= db.getAttributeStr("people.schooltime")%>">              (1982-02-09)</div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">出生日期:</div></td>            <td height="20">              <div align="left">                <input name="birth" type="text" id="birth" value="<%= db.getAttributeStr("people.birth")%>">                (1982-02-09)</div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">籍&nbsp; &nbsp;&nbsp;贯:</div></td>            <td height="20">              <div align="left">                <input name="addr" type="text" id="addr" value="<%= db.getAttributeStr("people.addr")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">所学专业:</div></td>            <td height="20">              <div align="left">                <input name="speciality" type="text" id="speciality" value="<%= db.getAttributeStr("people.speciality")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">学&nbsp;&nbsp;&nbsp;历:</div></td>            <td height="20">              <div align="left">                <input name="education" type="text" id="education" value="<%= db.getAttributeStr("people.education")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">职&nbsp;&nbsp;&nbsp;称:</div></td>            <td height="20">              <div align="left">                <input name="post" type="text" id="post" value="<%= db.getAttributeStr("people.post")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">办公电话:</div></td>            <td height="20">              <div align="left">                <input name="officetel" type="text" id="officetel" value="<%= db.getAttributeStr("people.officetel")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">移动电话:</div></td>            <td height="20">              <div align="left">                <input name="mobile" type="text" id="mobile" value="<%= db.getAttributeStr("people.mobile")%>"></div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">家庭电话:</div></td>            <td height="20">              <div align="left">                <input name="hometel" type="text" id="hometel" value="<%= db.getAttributeStr("people.hometel")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">电子邮件:</div></td>            <td height="20">              <div align="left">                <input name="email" type="text" id="email" value="<%= db.getAttributeStr("people.email")%>">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">所在学院:</div></td>            <td height="20">              <div align="left">                  <select name="college" id="college">				     <%	for(int i=0;i<db.getCount("college");i++){	%>                <option value=<%= db.getAttributeStr("college.id",i) %>				<%				if(db.getAttributeStr("college.name",i).equals(db.getAttributeStr("mycollege.name"))){				%>				selected				<%				}				%>				><%= db.getAttributeStr("college.name",i) %></option>                <%	 }	  %>                  </select>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">所在梯队:</div></td>            <td height="20">              <div align="left">                  <select name="group" id="group">				  				     <%	for(int i=0;i<db.getCount("group");i++){	%>                <option value=<%= db.getAttributeStr("group.id",i) %>				<%				if(db.getAttributeStr("group.name",i).equals(db.getAttributeStr("mygroup.name"))){				%>				selected				<%				}				%>				><%= db.getAttributeStr("group.name",i) %></option>                <%	 }	  %>                  </select>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">所在科室:</div></td>            <td height="20">              <div align="left">                  <select name="department" id="department">				  				  				     <%	for(int i=0;i<db.getCount("department");i++){	%>                <option value=<%= db.getAttributeStr("department.id",i) %>				<%				if(db.getAttributeStr("department.name",i).equals(db.getAttributeStr("mydepartment.name"))){				%>				selected				<%				}				%>				><%= db.getAttributeStr("department.name",i) %></option>                <%	 }	  %>                  </select>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">科研方向:</div></td>            <td height="20">              <div align="left">              <input type=text name=txt_fxmc size=20 readonly value=" <%= dealstring.toString(orients)%>">              <input class="text" type="hidden" name="orient" size="20" readonly value="" >              <input name="button" type="button" style="background-color:#2969b5;color:#ffffff;border-style:solid;border-color:#2969b5;cursor:hand" onclick="window.open('../SelectOrient/stepMemRight.jsp?txt_rybh=orient&txt_rymc=txt_fxmc','mem','height=400,width=400,toolbar=no,menubar=no,location=no,resizable=no,directories=no,status=yes,scrollbars=yes,dependent=no,left=200,top=200');" value="选择科研方向"></div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">纵向项目:</div></td>            <td height="20">              <div align="left">   <%= dealstring.toString(projects)%>                 <input name="project" type="hidden" id="project" value="<%= db.getAttributeStr("people.projects")%>">                <input type="button" name="Submit4" value="修改">              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">横向课题:</div></td>            <td height="20">              <div align="left">   <%= dealstring.toString(tasks)%>                <input name="tasks" type="hidden" id="tasks" value="<%= db.getAttributeStr("people.tasks")%>">                <input type="button" name="Submit5" value="修改"></div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">获奖情况:</div></td>            <td height="20">              <div align="left">                  <textarea name="prize" cols="45" rows="8" id="prize"><%= db.getAttributeStr("people.prize")%></textarea>              </div></td></tr>          <tr>            <td height="20" class="title_s"><div align="center">备&nbsp;&nbsp;&nbsp;注:</div></td>            <td height="20">              <div align="left">                  <textarea name="descs" cols="45" rows="8" id="descs"><%= db.getAttributeStr("people.descs")%></textarea>              </div></td></tr>          <tr>            <td height="20" colspan="2" class="title_s">              <div align="center">                <input type="submit" name="Submit" value="提交">                <input type="reset" name="Submit2" value="重置">              </div></td>          </tr>      </table></td>      <td width="50">&nbsp;</td>    </tr>  </table></form></body></html>

⌨️ 快捷键说明

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