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

📄 edituserinfo.asp

📁 自由领域ASP+WAP同学录(V1.0)系统是一套仿ChinaRen的即可用电脑浏览又可以用手机访问的互动同学录单班级系统。这套系统同学录系统可以满足现在WAP普及的今天同学用手机上网交流的需求
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file=../INC/txlconst.asp-->
<!--#include file=../INC/txlfun.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│                                                               │
│  感谢你使用 自由领域ASP+WAP同学录系统(测试版)                │
│  使用本免费源码您必须遵守以下规定                             │
│    不得公开发表代码 不得用做商业用途,不得向其他使用者收费。  │
│                                                               │
│  使用时,请保留此段信息,谢谢配合                             │
│                                                               │
│                                       2004/12/19              │
│                                                               │
└────────────────  http://99167.jahee.com ───┘
</per>
-->
<%
'on error resume next
dim const_txl_HomeUrl,errstr,i
errstr=""
const_txl_HomeUrl="../"
OpenDatabase
txl_SiteHead const_txlname&"- 修改资料"
call online
call main
CloseDatabase
SiteBottom
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)">

⌨️ 快捷键说明

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