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

📄 modify.jsp

📁 现今的社会是一个信息飞速发达的社会
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="con" scope="page" class="numb1.com.db"/>
<%
String id=(String)session.getAttribute("id");

String mail="";
String question="";
String answer ="";
String name="";
String sex="";
String em="";
String qq="";
String web="";
String tel="";
String comefrom="";
String job="";
String love="";
String aboutme="";

String year="";
String month="";
String day="";
String refuse="";

String sql;
ResultSet rs;

sql="SELECT mail FROM numb1 WHERE userid='"+id+"'";
rs=con.query(sql);rs.next();
if(rs.getRow()!=0){
mail=rs.getString(1);
}else{
response.sendRedirect("login.jsp");
}
con.close();

sql="SELECT question, answer, name, sex, birth, mail, qq, web, tel, comefrom, job, love, aboutme, refusemassage FROM user WHERE userid='"+id+"'";
rs=con.query(sql);rs.next();
if(rs.getRow()!=0){
question=con.getStr(rs.getString(1));
answer=con.getStr(rs.getString(2));
name=con.getStr(rs.getString(3));
sex=rs.getString(4);
em=rs.getString(6);
qq=con.getStr(rs.getString(7));
web=con.getStr(rs.getString(8));
tel=con.getStr(rs.getString(9));
comefrom=con.getStr(rs.getString(10));
job=con.getStr(rs.getString(11));
love=con.getStr(rs.getString(12));
aboutme=con.getStr(rs.getString(13));
refuse=rs.getString(14);
if(rs.getString(5).length() >= 10){
year=rs.getString(5).substring(0,4);month=rs.getString(5).substring(5,7);day=rs.getString(5).substring(8);
}
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改资料</title><style type="text/css">
<!--
p{text-indent:18pt;font-size:14px}
td{font-size:13px;}
th{font-size:18px}
a:link{text-decoration:none;color:#0000ff}
a:visited{text-decoration:none;color:#0000ff}
a:hover{text-decoration:underline;color:#96CCFE}
.style1 {color: #FF0000}
.style2 {color: #FFFFFF}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
function check_form(theform)
	{
		if (theform.mail.value=="")
		{
			alert("请输入您的E-mail,以便您的密码遗失后取回密码!");
			theform.mail.focus();
			return false;
		}
   if (theform.mail.value.indexOf('@') == -1||
   theform.mail.value.indexOf('.') == -1||
   theform.mail.value.charAt(0)==".")
     {
     alert("Email地址格式不正确!");
      theform.mail.focus();
      return false;
     }//value
  		if (theform.name.value=="")
		{
			alert("请输入您的昵称!");
			theform.name.focus();
			return false;
		}
			}

</script>
<script language="JavaScript" src="img/citylist.js"></script>
</head>

<body>
<table width="700"  border="0" align="center">
  <tr>
    <td><div align="right" style="font-size:12px ">&nbsp;[<a href="index.jsp">论坛首页</a>] [<font color="#FF0000">修改资料</font>]&nbsp;&nbsp; </div></td>
  </tr>
</table>
<form name="form" method="post" action="action/actmodify.jsp" onSubmit="return check_form(this)">

  <table width="720"  border="0" align="center">
    <tr>
      <th>用 户 资 料 修 改</th>
    </tr>
  </table>
  <br>
  <table width="720"  border="0" align="center" cellspacing="0" bgcolor="#f8f8f8">
  <tr>
    <td width="3%" background="img/b04.gif"></td>
    <td height="1" colspan="2" bgcolor="#666666"></td>
  </tr>
  <tr>
    <td background="img/b05.gif">&nbsp;</td>
    <td width="97%">&nbsp;</td>
    <td width="0%" bgcolor="#666666"></td>
  </tr>
  <tr>
    <td background="img/b06.gif">&nbsp;</td>
    <td>      <table width="97%"  border="0" align="center" bgcolor="#f1f1f1">
          <tr>
            <td height="20" bgcolor="#7188e0"><span class="style2">&nbsp;&nbsp;※以下部分必须填写</span></td>
          </tr>
          <tr>
            <td><table width="100%"  border="0" align="center" bgcolor="#738AD6">
                <tr bgcolor="#f8f8f8">
                  <td colspan="3"><span class="style1">&nbsp;&nbsp;用户ID只能用小写字母“a-z”,下划线“_”以及数字“0-9”,且长度不小于6个字符</span></td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td width="105"><div align="right">用&nbsp;&nbsp;户ID:</div></td>
                  <td width="224">&nbsp;<font color="#0000ff"><%=id%></font></td>
                  <td width="326">&nbsp;</td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td><div align="right">昵&nbsp;&nbsp;称:</div></td>
                  <td>&nbsp;<input name="name" type="text" style="BORDER: #7188e0 1px solid;color:#1818FF;" value="<%=name%>" size="15">
                      <span class="style1">*</span></td>
                  <td>允许使用中文字符,长度在20(10个汉字)个字符内</td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td><div align="right">E-mail:</div></td>
                  <td>&nbsp;<input name="mail" type="text" id="mail" style="BORDER: #7188e0 1px solid;color:#1818FF;" value="<%=mail%>" size="20">
                  <span class="style1">* </span>&nbsp;&nbsp;&nbsp;</td>
                  <td>&nbsp;&nbsp;隐藏
                  <input name="em" type="checkbox"  value="h" <% if("h".equals(em)){out.print("checked");}%>></td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td><div align="right">密码提示问题:</div></td>
                  <td>&nbsp;<input name="question" type="text" id="question" style="BORDER: #7188e0 1px solid;color:#1818FF;" value="<%=question%>" size="20">
                    <span class="style1">* </span>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td><div align="right">密码提示答案:</div></td>
                  <td>&nbsp;<input name="answer" type="text" id="answer" style="BORDER: #7188e0 1px solid;color:#1818FF;" value="<%=answer%>" size="20">                    <span class="style1">* </span>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="24" bgcolor="#7188e0"><span class="style2">&nbsp;&nbsp;※以下部分可有选择性的填写</span></td>
          </tr>
          <tr>
            <td><table width="100%"  border="0" align="center" bgcolor="#738AD6">
                <tr bgcolor="#f8f8f8">
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td width="103"><div align="right">性&nbsp;&nbsp;别:</div></td>
                  <td width="229">&nbsp;男
                      <input name="sex" type="radio" value="m" <%if("m".equals(sex)){out.print("checked");}%>>
&nbsp;&nbsp;女
              <input type="radio" name="sex" value="f" <%if("f".equals(sex)){out.print("checked");}%>></td>
                  <td width="184"><div align="right">拒绝接受会员发送信息:</div></td>
                  <td width="135"><input name="refuse" type="checkbox" id="refuse" value="y" <% if("y".equals(refuse)){ out.print("checked");}%>></td>
                </tr>
                <tr bgcolor="#f8f8f8">
                  <td><div align="right">生&nbsp;&nbsp;日:</div></td>
                  <td colspan="3">&nbsp;<select name="year" style="BORDER: #7188e0 1px solid;color:#1818FF;">
                        <option value="-">----</option>
                        <option value="1949" <% if("1949".equals(year)){out.print("selected");}%>>1949</option>
                        <option value="1950" <% if("1950".equals(year)){out.print("selected");}%>>1950</option>
                        <option value="1951" <% if("1951".equals(year)){out.print("selected");}%>>1951</option>
                        <option value="1952" <% if("1952".equals(year)){out.print("selected");}%>>1952</option>
                        <option value="1953" <% if("1953".equals(year)){out.print("selected");}%>>1953</option>
                        <option value="1954" <% if("1954".equals(year)){out.print("selected");}%>>1954</option>
                        <option value="1955" <% if("1955".equals(year)){out.print("selected");}%>>1955</option>
                        <option value="1956" <% if("1956".equals(year)){out.print("selected");}%>>1956</option>
                        <option value="1957" <% if("1957".equals(year)){out.print("selected");}%>>1957</option>
                        <option value="1958" <% if("1958".equals(year)){out.print("selected");}%>>1958</option>
                        <option value="1959" <% if("1959".equals(year)){out.print("selected");}%>>1959</option>
                        <option value="1960" <% if("1960".equals(year)){out.print("selected");}%>>1960</option>
                        <option value="1961" <% if("1961".equals(year)){out.print("selected");}%>>1961</option>
                        <option value="1962" <% if("1962".equals(year)){out.print("selected");}%>>1962</option>
                        <option value="1963" <% if("1963".equals(year)){out.print("selected");}%>>1963</option>
                        <option value="1964" <% if("1964".equals(year)){out.print("selected");}%>>1964</option>
                        <option value="1965" <% if("1965".equals(year)){out.print("selected");}%>>1965</option>
                        <option value="1966" <% if("1966".equals(year)){out.print("selected");}%>>1966</option>
                        <option value="1967" <% if("1967".equals(year)){out.print("selected");}%>>1967</option>

⌨️ 快捷键说明

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