📄 alterinfcon.jsp
字号:
<%-- Document : AlterInfCon Created on : 2008-5-9, 10:29:52 Author : Administrator--%><%@page contentType="text/html" pageEncoding="GBK"%><%@ page import="java.sql.*" %><%@ page errorPage="ErrorPage.jsp" %><jsp:useBean id="userinf" scope="session" class="Source.userInf" /><jsp:useBean id="jdbcBean" scope="session" class="Source.JDBCBean"/><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><% String sql = ""; String inf = ""; String Ypassword = request.getParameter("Ypassword"); String Y2password = request.getParameter("Y2password"); String userid = ""; String email = request.getParameter("email"); String tel = request.getParameter("tel"); userid = userinf.getUserID(); int position = userinf.getPosition(); if (!Ypassword.equals(Y2password)) { inf = "密码不一致 <a href='AlterInf.jsp'>返回</a>"; } else { if (!Ypassword.equals("")) { sql = "update " + userinf.getTitle() + " set password=" + Ypassword + ",email=" + email + ",tel=" + tel + " where userId=" + userid; } else { sql = "update " + userinf.getTitle() + " set email=" + email + ",tel=" + tel + " where userId=" + userid; } jdbcBean.setCommit(false); jdbcBean.executeUpdate(sql); try { jdbcBean.Commit(); inf = "修改成功 <a href='ShowGrade.jsp'>返回</a>"; } finally { jdbcBean.setCommit(true); jdbcBean.close(); } }%><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK" /> <title>Alter Information</title> <style type="text/css"> <!-- #main { background-color: #CCCCCC; width: 750px; margin-right: auto; margin-left: auto; padding-bottom: 30px; padding-top: 30px; } #main #title { background-position: center; background-color: #FFFFFF; width: 600px; margin-right: auto; margin-left: auto; vertical-align: text-top; text-align: center; padding-top: 20px; padding-bottom: 20px; } .STYLE3 { width: 600px; background-color: #666666; margin-right: auto; margin-left: auto; font-size: xx-large; font-weight: bold; color: #FFFFFF; } --> </style> </head> <body> <div id="main"> <div class="STYLE3" id="content">Alter Information</div> <div id="title"> <%=inf%> </div> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -