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

📄 myinfo.asp

📁 一个很好的班级同学录
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if session("username")="" then
   response.redirect "../index.asp"
end if
%>
<!--#include file="../public/conn.asp" -->
<%
   set rs1=server.createobject("adodb.recordset")
   sql1="select * from user where username='"&session("username")&"'"
   rs1.open sql1,secondconn,3,3
   if rs1("checked")=true then
      userchecked="已经通过管理员认证"
   else
      userchecked="还未通过管理员认证"
   end if
   
   if rs1("quanxian")="guest" then
      userquanxian="待审核用户"
   elseif rs1("quanxian")="member" then
      userquanxian="班级成员"
   else rs1("quanxian")="master" 
      userquanxian="班级管理员"
   end if   
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看/更改<%=session("username")%><%=rs1("truename")%>的资料</title>
<link href="../mycss.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body topmargin="0" leftmargin="0">
<!--#include file="../public/top.asp" -->
<table width="760" border="1" align="center" cellpadding="4" cellspacing="2" class="font9Black">
<form method="post" action="saveeditmyinfo.asp" onsubmit="return VerifyInput();" name="myform">
    <tr>
      <td class="F9" colspan="2"> <div align="center"> <br>
        <h4>查看 / 修改<%=session("username")%>『<%=rs1("truename")%>』的资料        </h4>
        <hr width="50%" size="1">
        <table width="50%" height="102"  border="0" cellpadding="5" cellspacing="1">
          <tr>
            <td align="left">
			用户名:<%=session("username")%> &nbsp;&nbsp;
			真实姓名:<%=rs1("truename")%>&nbsp;&nbsp;
			登陆次数:<%=rs1("LoginCount")%>次<br>
            注册日期:<%=rs1("RegTime")%><br>
			资料修改日期:<%=rs1("UpdateTime")%><br>
            用户状态:<%=userquanxian%>&nbsp;&nbsp;<%=userchecked%></td>
          </tr>
        </table>
        </div></td>
    </tr>
    <tr>
      <td class="F9" width="194">
        <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;密码 <font color=red>**</font></div></td>
      <td class="F9" width="538">
        <input name="password" type="password">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194">
        <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认密码<font color=red>**</font></div></td>
      <td class="F9" width="538">
        <input type="password" name="password2">
      </td>
    </tr>
    <tr>
      <td class="F9">
        <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;昵称(外号) <font color=red>**</font></div></td>
      <td class="F9">
        <input name="nickname" type="text" value="<%=rs1("nickname")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电子邮件<font color=red>**</font></div></td>
      <td class="F9" width="538">
        <input name="email" type="text" value="<%=rs1("email")%>">
      </td>
    </tr>
    <tr class="F9">
      <td class="F9" width="194">
        <div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性别:</div></td>
      <td height="24" class="F9" width="538">
	  <%if rs1("sex")="male" then%>
        <input name="sex" type="radio" value="male" checked>
        <input type="radio" name="sex" value="female">
		<%else%>
		<input name="sex" type="radio" value="male">
        <input type="radio" name="sex" value="female" checked>
		<%end if%>
		</td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出生日期</div></td>
      <td class="F9" width="538">
        <input name="birthyear" type="text" id="birthyear" value="<%=rs1("birthyear")%>" size="4" maxlength="4">
        年        <input name="birthmonth" type="text" id="birthmonth" value="<%=rs1("birthmonth")%>" size="2" maxlength="2">
        月        <input name="birthday" type="text" id="birthday" value="<%=rs1("birthday")%>" size="2" maxlength="2">        
        日</td>
    </tr>
    <tr>
      <td class="F9" height="15" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;手机</div></td>
      <td class="F9" height="15" width="538">
        <input name="mobile" type="text" value="<%=rs1("mobile")%>">
      </td>
    </tr>
    <tr>
      <td width="194" align="left" class="F9"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家庭地址</div></td>
      <td class="F9" width="538">
        <input name="homeaddress" type="text" value="<%=rs1("homeaddress")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邮编</div></td>
      <td class="F9" width="538">
        <input name="homepostcode" type="text" value="<%=rs1("homepostcode")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家庭电话</div></td>
      <td class="F9" width="538">
        <input name="hometel" type="text" value="<%=rs1("hometel")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;公司地址</div></td>
      <td class="F9" width="538">
        <input name="companyaddress" type="text" value="<%=rs1("companyaddress")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邮编</div></td>
      <td class="F9" width="538">
        <input name="companypostcode" type="text" value="<%=rs1("companypostcode")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;公司电话</div></td>
      <td class="F9" width="538">
        <input name="companytel" type="text" value="<%=rs1("companytel")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QQ</div></td>
      <td class="F9" width="538">
        <input name="qq" type="text" value="<%=rs1("qq")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;个人主页</div></td>
      <td class="F9" width="538">
        <input name="homepage" type="text" value="<%=rs1("homepage")%>">
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;自我介绍</div></td>
      <td class="F9" width="538">
        <textarea name="selfintro" cols="50" rows="6"><%=rs1("selfintro")%></textarea>
      </td>
    </tr>
    <tr>
      <td class="F9" width="194"><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备注</div></td>
      <td class="F9" width="538">
        <textarea name="memo" cols="50" rows="6"><%=rs1("memo")%></textarea>
      </td>
    </tr>
    <tr>
      <td class="F9" colspan="2">
        <div align="center">
          <input type="submit" name="Submit" value="确定">
          &nbsp;&nbsp;&nbsp;&nbsp;
          <input type="reset" name="Submit2" value="重来">
        </div></td>
    </tr>
  </form>
</table>
<!--#include file="../public/bottom.asp" -->

<script language="JavaScript">
//-->
function VerifyInput()
{

	password = document.myform.password.value;
    if (password == "")
    {
        alert("请填写您的密码");
        document.myform.password.focus();
        return false;
    }

	password2 = document.myform.password2.value;
    if (password2 == "")
    {
        alert("请填写您的确认密码");
        document.myform.password2.focus();
        return false;
    }
	
    if (password2 == password)
	{
	}
	else
    {
        alert("您两次输入的密码不相同");
        document.myform.password2.focus();
        return false;
    }

    nickname = document.myform.nickname.value;
    if (nickname == "")
    {
        alert("请填写您的昵称(外号)");
        document.myform.nickname.focus();
        return false;
    }
	
	email = document.myform.email.value;
    if (email == "")
    {
        alert("请填写您的Email地址");
        document.myform.email.focus();
        return false;
	}
	
    if(document.myform.email.value.length!=0)
      { 
      if (document.myform.email.value.charAt(0)=="." || document.myform.email.value.charAt(0)=="@"|| document.myform.email.value.indexOf('@', 0) == -1 || document.myform.email.value.indexOf('.', 0) == -1||document.myform.email.value.lastIndexOf("@") ==document.myform.email.value.length-1 || document.myform.email.value.lastIndexOf(".")==document.myform.email.value.length-1)
      {
          alert("请填写正确的Email!");
          document.myform.email.focus();
          return false;
      }
      }
   else
      {   
        alert("Email的不能为空!");
        document.myform.email.focus();
        return false;
      }
}
//-->
</script>
</body>
</html>

⌨️ 快捷键说明

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