gusucode.com > 爱美尔女性商城源码 1.0源码程序 > MyInfo.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%
if request.Cookies("bjx")("username")="" then
response.Redirect "login.asp"
response.End
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>--会员中心</title>
<meta name="keywords" content="<%=keywords%>" />
<meta name="description" content="<%=description1%>" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.idtabs.js"></script>
<script type="text/javascript" src="js/swf.js"></script>
<style type="text/css">
<!--
.STYLE1 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
</head>
<body>
<!--#include file="top.asp" -->
<table width="995" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="20"><div align="center"></div></td>
  </tr>
</table>
<table width="995" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="189" valign="top"><!--#include file="hyleft.asp"-->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="5"><div align="center"></div></td>
        </tr>
      </table>
    </td>
    <td width="10" valign="top"><div align="center"></div></td>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="40">您当前的位置: <a title="" href="#" alt="">首页</a> &gt;&gt; 会员中心 &gt;&gt; <b>个人信息</b></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr style="background:url(images/blueth.gif) repeat-x;">
          <td height="26" style="padding-left:10px;"><strong><%=request.Cookies("bjx")("username")%> 您好</strong></td>
        </tr>
        
        <tr>
          <td height="30" valign="top" >
		  <script language=JavaScript>
<%dim sql,i,j
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from BJX_Sheng order by shengorder"
	rs_s.open sql,conn,1,1
%>
	var selects=[];
	selects['xxx']=new Array(new Option('请选择城市……','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("ShengNo")%>']=new Array(
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * from BJX_Shi where shengid="&rs_s("id")&" order by shiorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.userinfo){
			if(szSheng.value) {
				szShi.options.length=0;
				for(var i=0;i<selects[szSheng.value].length;i++){
					szShi.add(selects[szSheng.value][i]);
				}
			}
		}
	}
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function checkuserinfo()
{
 if(document.userinfo.useremail.value.length!=0)
  {
    if (document.userinfo.useremail.value.charAt(0)=="." ||        
         document.userinfo.useremail.value.charAt(0)=="@"||       
         document.userinfo.useremail.value.indexOf('@', 0) == -1 || 
         document.userinfo.useremail.value.indexOf('.', 0) == -1 || 
         document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 || 
         document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.userinfo.useremail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.userinfo.useremail.focus();
   return false;
   }
   if(checkspace(document.userinfo.userzhenshiname.value)) {
	document.userinfo.userzhenshiname.focus();
    alert("对不起,请填写您的真实姓名!");
	return false;
  }
   if(checkspace(document.userinfo.sfz.value)) {
	document.userinfo.sfz.focus();
    alert("对不起,请填写您的身份证号码!");
	return false;
  }
  
  
  if((document.userinfo.sfz.value.length!=15)&&(document.userinfo.sfz.value.length!=18)) {
	document.userinfo.sfz.focus();
    alert("对不起,请正确填写身份证号码!");
	return false;
  } 
  if(checkspace(document.userinfo.shouhuodizhi.value)) {
	document.userinfo.shouhuodizhi.focus();
    alert("对不起,请填写您的详细地址!");
	return false;
  }
  if(checkspace(document.userinfo.youbian.value)) {
	document.userinfo.youbian.focus();
    alert("对不起,请填写邮编!");
	return false;
  }
  if(document.userinfo.youbian.value.length!=6) {
	document.userinfo.youbian.focus();
    alert("对不起,请正确填写邮编!");
	return false;
  } 
    if(checkspace(document.userinfo.usertel.value)) {
	document.userinfo.usertel.focus();
    alert("对不起,请留下您的联系电话!");
	return false;
  }
}
</script>

<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from bjx_User where username='"&request.Cookies("bjx")("username")&"' ",conn,1,1
%>
    
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cccccc">
  <form name="userinfo" method="post" action="saveuserinfo.asp?action=userziliao">
    <tr> 
      <td height="25" colspan=2 align="center" bgcolor="#FCDAE6"><strong><font color=#FFFFFF>尊敬的用户,我们向您承诺:以下信息将被严格保密,绝对不提供给第三方或用作它用!</font></strong></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td width="30%" height="25" align="right">用 户 名:</td>
      <td width="70%"><font color=#FF6600>
	  <%=request.Cookies("bjx")("username")%> </font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">电子邮件:</td>
      <td> 
        <input name=useremail class="wenbenkuang" type=text value="<%=trim(rs("useremail"))%>">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">真实姓名:</td>
      <td> 
        <input name=userzhenshiname class="wenbenkuang" type=text value="<%=trim(rs("userzhenshiname"))%>" size="10">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">身份证号码:</td>
      <td> 
        <input name=sfz type=text class="wenbenkuang" value="<%=trim(rs("sfz"))%>" size="30" maxlength="18">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">性别: </td>
      <td> 
        <input type="radio" name="shousex" value="1" <%if rs("sex")=1 then%>checked<%end if%>>
        男 
        <input type="radio" name="shousex" value="0" <%if rs("sex")=0 then%>checked<%end if%>>
        女 </td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">年龄:</td>
      <td> 
        <input name=nianling type=text class="wenbenkuang" value="<%=trim(rs("nianling"))%>" size="4" maxlength="2">      </td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">所在城市:</td>
      <td> 
        <select size="1" class="wenbenkuang" name="szSheng" onChange=chsel()>
          <option value="xxx" selected>请选择省份……</option>
          <%dim tmpShengid
tmpShengid=0
set rs_s=server.createobject("adodb.recordset")
sql="select * from BJX_Sheng  order by shengorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
     if rs("szSheng")=rs_s("ShengNo") then
          tmpShengid=rs_s("id")
%>
          <option value="<%=rs_s("ShengNo")%>" selected ><%=trim(rs_s("ShengName"))%></option>
          <%
     else
%>
          <option value="<%=rs_s("ShengNo")%>" ><%=trim(rs_s("ShengName"))%></option>
          <%
     end if
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
        </select>
        <select size="1" class="wenbenkuang" name="szShi">
          <%
set rs_s=server.createobject("adodb.recordset")
sql="select * from BJX_Shi where shengid="&tmpShengid&" order by shiorder"
rs_s.open sql,conn,1,1
while not rs_s.eof
%>
          <option value="<%=rs_s("ShiNo")%>" <%if rs("szShi")=rs_s("ShiNo") then%>selected<%end if%>><%=trim(rs_s("ShiName"))%></option>
          <%
    rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
        </select>
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">详细地址:</td>
      <td> 
        <input name=shouhuodizhi type=text class="wenbenkuang" value="<%=trim(rs("shouhuodizhi"))%>" size="30">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">联系电话:</td>
      <td> 
        <input name=usertel type=text class="wenbenkuang" value="<%=trim(rs("usertel"))%>" size="12">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">邮编: </td>
      <td> 
        <input name=youbian type=text class="wenbenkuang" value="<%=trim(rs("youbian"))%>" ONKEYPRESS="event.returnValue=IsDigit();" size="12">
		<font color="#FF0000">**</font></td>
    </tr>
    <tr bgcolor="#ffffff"> 
      <td height="25" align="right">QQ:</td>
      <td> 
        <input name=QQ type=text class="wenbenkuang" value="<%=trim(rs("oicq"))%>" size="12" maxlength="12">      </td>
    </tr>
    <tr align="center"> 
      <td height=25 bgcolor=#ffffff colspan="2">
	  <input class="go-wenbenkuang" onClick="return checkuserinfo();" type="submit" name="submit" value=" 提交保存 ">
	  <input class="go-wenbenkuang" onClick="ClearReset()" type=reset name="Clear" value=" 重新填写 ">      </td>
    </tr>
  </form>
</table>
<br>
<%rs.close
set rs=nothing%>
          <br /></td></tr>
       
      </table>
	  
    </td>
  </tr>
</table>
<!--#include file="bottom.asp" -->
</body>
</html>