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

📄 edituserinfo.asp

📁 同学录的设计
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file=../../INC/txlconst.asp-->
<!--#include file=../../INC/txlfun.asp-->

<%
Dim const_txl_HomeUrl,sql,i
const_txl_HomeUrl = "../../"
%>
<!--#include file=../checkadmin.asp-->
<%
OpenDatabase
txl_SiteHead const_txlname&"- 修改资料"
call online
call main
CloseDatabase
SiteBottom
sub main
%>
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td valign="top" bgcolor="#F0F1F5"><table width="75%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="3%">&nbsp;</td>
          <td width="97%"><br>
            <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a> 
            &gt;&gt;后台管理&gt;&gt;<a href="usermanage.asp">用户管理</a>&gt;&gt;修改<font color="#FF0000"><%=Trim(Request.QueryString("username"))%></font>的资料</td>
        </tr>
      </table>
      <%
		If Request.QueryString("action")="saveedit" then
			Call saveedit
		Else 
	 	  	call  editinfo
		End If
	  %>
      <br> </td>
  </tr>
</table>
<%
	end sub
	%>

<%sub editinfo
		dim login_username,rs
		
		login_username=Request.QueryString("username")
		If login_username="" Then
			Call printerror ("修改资料出错","<li>查询字符串参数错误!</li>","97%")
			Exit Sub
		End If
		set rs=Server.CreateObject("AdoDb.Recordset")
		rs.open "select * from ec where studentid='"&login_username&"'",conn,1

		dim facewidthmin,facewidthmax,faceheightmin,faceheightmax
		facewidthmin=Split(const_FaceWidth,"|")(0)
		facewidthmax=Split(const_FaceWidth,"|")(1)
		faceheightmin=Split(const_Faceheight,"|")(0)
		faceheightmax=Split(const_Faceheight,"|")(1)
	  %>
<script language="JavaScript" src="../../user/inc/txl_user.js"></script>
	  <script language="JavaScript">
	  <!--
	  function checkfrm(frm){
	  var obj=frm
	  if (obj.txl_password1.value!=""){
	  var txl_password1=Jtrim(obj.txl_password1.value)
	  if(txl_password1==""){
	  alert("密码不能是空格!")
	  obj.txl_password1.focus();
	  return false;
	  }
	  var txl_password2=Jtrim(obj.txl_password2.value)
	  if(txl_password2==""){
	  alert("验证密码不能为空!")
	  obj.txl_password2.focus();
	  return false;
	  }
	  if(txl_password1.length<4){
	  alert("密码长度请大于4位!")
	  obj.txl_password1.focus();
	  return false;
	  }
	  if(txl_password1!=txl_password2){
	  alert("两次输入的密码不相同!")
	  obj.txl_password2.focus();
	  return false;
	  }
	  }
	  var txl_email=Jtrim(obj.txl_email.value)
	  if(txl_email==""||(!isemail(txl_email))){
	  alert("邮箱不能为空且必须有效!")
	  obj.txl_email.focus();
	  return false;
	  }
	  var txl_truename=Jtrim(obj.txl_truename.value)
	  if(txl_truename==""||(!ischinese(txl_truename))){
	  alert("用户名不能为空!且必须为中文")
	  obj.txl_truename.focus();
	  return false;
	  }
	  var txl_question=Jtrim(obj.txl_question.value)
	  if(txl_question==""){
	  alert("密码提示不能为空!")
	  obj.txl_question.focus();
	  return false;
	  }
	  var txl_answer=Jtrim(obj.txl_answer.value)
	  if(txl_answer==""){
	  alert("密码提示问题答案不能为空!")
	  obj.txl_answer.focus();
	  return false;
	  }
	   var txl_FaceUrl=obj.txl_FaceUrl.value
	  if (txl_FaceUrl.length<3){
	  alert("请选择头像或者输入网上头像地址!")
	  obj.txl_FaceUrl.focus();		
	  return false
	  }
	  var txl_Underwrite=obj.txl_Underwrite.value
	  if (txl_Underwrite.length>255){
	  alert("签名长度不能大于255,当前长度"+txl_Underwrite.length)
	  obj.txl_Underwrite.focus();		
	  return false
	  }
	 var txl_byear=obj.txl_byear.options[obj.txl_byear.selectedIndex].value
	  if (txl_byear==""){
	  alert("请填写好您的生日!")
	  obj.txl_byear.focus();		
	 return false
	  }
	  var txl_bmonth=obj.txl_bmonth.options[obj.txl_bmonth.selectedIndex].value
	  if (txl_bmonth==""){
	  alert("请填写好您的生日!")
	  obj.txl_bmonth.focus();		
	 return false
	  }
	var txl_bday=obj.txl_bday.options[obj.txl_bday.selectedIndex].value
	  if (txl_bday==""){
	  alert("请填写好您的生日!")
	  obj.txl_bday.focus();		
	 return false
	  }
	  obj.send.disabled=true
	  return true
	  }
	  function openScript(url, width, height){
		var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',scrollbars=auto , resizable=no , copyhistory=no' );
	}
	function setface() 
	{
		window.open('facelist.asp','','width=500,height=300 scrollbars=auto,status=auto,resizable=yes');
	}
	function changeface2()
	{	var temp,obj;
		obj=document.txlfrm;
		if(obj.Form_FaceWidth.value!="")
		{	if (! isnum(obj.Form_FaceWidth.value))
			{
				alert("自定义头像宽度必须是数字!\n");
				obj.Form_FaceWidth.focus();
				return;
			}
			else
			{
				if(obj.Form_FaceWidth.value<<%=facewidthmin%> || obj.Form_FaceWidth.value><%=facewidthmax%>)
				{
					alert("自定义头像宽度必须在<%=facewidthmin%>-<%=facewidthmax%>之间!\n");
					obj.Form_FaceWidth.focus();
					return;
				}
			}
		}

		if(obj.Form_FaceHeight.value!="")
		{
			if (! isnum(obj.Form_FaceHeight.value))
			{
				alert("自定义头像高度必须是数字!\n");
				obj.Form_FaceHeight.focus();
				return;
			}
			else
			{
				if(obj.Form_FaceHeight.value<<%=faceheightmin%> || obj.Form_FaceHeight.value><%=faceheightmax%>)
				{
					alert("自定义头像高度必须在<%=faceheightmin%>-<%=faceheightmax%>之间!\n");
					obj.Form_FaceHeight.focus();
					return;
				}
			}
		}

		temp=obj.txl_FaceUrl.value;
		if (temp!="")
		{	temp=temp.toLowerCase();
			if(temp.indexOf("http:")>-1){
				document.faceimg.src=temp;
				document.faceimg.width=obj.Form_FaceWidth.value;
				document.faceimg.height=obj.Form_FaceHeight.value;
			}
			else
			{	
				document.faceimg.src="../"+temp;
				document.faceimg.width=obj.Form_FaceWidth.value;
				document.faceimg.height=obj.Form_FaceHeight.value;
			}
		}
		else if(document.faceimg.src!="")
		{
			document.faceimg.width=obj.Form_FaceWidth.value;
			document.faceimg.height=obj.Form_FaceHeight.value;
		}
	}
	  //-->	  
	  </script>
      
<form name="txlfrm" method="post" action="?action=saveedit" onsubmit="return checkfrm(this)">
  <TABLE border=0 class=font width="100%" cellpadding="0" cellspacing="0">
    <TR> 
      <TD height=2 bgcolor="#ececff"></TD>
      <TD height=2 bgcolor="#ececff"></TD>
    </TR>
    <TR> 
      <TD height="25" align=center> <p>*你的密码: </TD>
      <TD height="25"> <input name="txl_password1" type=password class=fminpt id="txl_password1" size=15 maxLength=15>
        (<font color="gray">如果要修改密码,请在这里填入密码,前后空格无效</font>) </TD>
    </TR>
    <TR> 
      <TD height="25" align=center> <p>*验证密码: </TD>
      <TD height="25"> <input name="txl_password2" type=password class=fminpt id="txl_password2" size=15 maxlength=15>
        (<font color="gray">请填入刚才输入的密码</font>) </TD>
    </TR>
    <TR> 
      <TD height="25" align=center> <p>*电子邮件: </TD>
      <TD height="25"> <input name=txl_email class=fminpt id="txl_email" value="<%=rs("email")%>" size=36 maxLength=40>
        (<font color="gray">请填入常用的邮箱,这个将是您的密码保密邮箱</font>) </TD>
    </TR>
    <TR> 
      <TD height="25" align=center>*真实姓名:</TD>

⌨️ 快捷键说明

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