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

📄 user_edituserinfo.asp

📁 WAP网上购物系统源程序,,有兴趣的朋友,一起研究一下..交流经眼
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file=INC/skin.asp-->

<%
'on error resume next
dim const_txl_HomeUrl,errstr,i
errstr=""
const_txl_HomeUrl=""
OpenDatabase
txl_SiteHead const_txlname&"- 修改资料"
call online
call main
CloseDatabase
web_end
sub main
%>

<table width="779" border="0" align="center" cellpadding="0" cellspacing="10">
  <tr>
    <td><b>当前位置:<a href="<%=const_homepageurl%>">首页</a> &gt;&gt; <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a> &gt;&gt; 修改资料</b></td>
  </tr>
</table>
  <table width="779" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#CCCCCC" style="border-collapse:collapse;">
  <tr> 
    <td width="178" align="center" valign="top" bgcolor="#f1f1f1"><br>
    <script language="JavaScript">
			today=new Date();
			function initarray(){
			this.length=initarray.arguments.length
			for(var i=0;i<this.length;i++)
			this[i+1]=initarray.arguments[i] }
			var d=new initarray(
			" 星期日 ",
			" 星期一 ",
			" 星期二 ",
			" 星期三 ",
			" 星期四 ",
			" 星期五 ",
			" 星期六 ");
			document.write(
			today.getYear(),"年",
			today.getMonth()+1,"月",
			today.getDate(),"日",
			d[today.getDay()+1]);
			</script> </td>
    <td valign="top" bgcolor="#FFFFFF"><%
		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=Session("username")
		If login_username="" Then
			Call printerror ("修改资料出错","<li>您还没有登录或者会话超时,请先<a href='"&const_txl_HomeUrl&"user_login.asp'>登录</a>!</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="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="8">
    <TR> 
      <TD width="150" height="25" align=center class="tar"> <p>*你的密码: </TD>
      <TD width="80%" height="25"> <input name="txl_password1" type=password class=fminpt id="txl_password1" size=15 maxLength=15>
        (<font color="gray">如果要修改密码,请在这里填入密码,前后空格无效</font>) </TD>
    </TR>
    <TR> 

⌨️ 快捷键说明

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