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

📄 manage.asp

📁 钱江水产源代码,钱江水产源代码,钱江水产源代码
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/function.asp"-->
<meta charset=gb2312">
<%
dim Action,UserName,FoundErr,ErrMsg
dim rsUser,sqlUser
Action=trim(request("Action"))
UserName=trim(request("UserName"))
if UserName="" then
	UserName=session("UserName")
end if
if  UserName="" then
	if Action="" then
		response.redirect "Server.asp"
	else
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
	end if
end if
if FoundErr=true then
	call WriteErrMsg()
else
	Set rsUser=Server.CreateObject("Adodb.RecordSet")
	sqlUser="select * from [User] where UserName='" & UserName & "'"
	rsUser.Open sqlUser,conn,1,3
	if rsUser.bof and rsUser.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的用户!</li>"
		call writeErrMsg()
	else
		if Action="Modify" then
			dim Sex,Email,Homepage,QQ,MSN
			Sex=trim(Request("Sex"))
			Email=trim(request("Email"))
			Homepage=trim(request("Homepage"))
			Comane=trim(request("Comane"))
			Add=trim(request("Add"))
			Somane=trim(request("Somane"))
			Zip=trim(request("Zip"))
			Phone=trim(request("Phone"))
			Fox=trim(request("Fox"))
			if Sex="" then
				founderr=true
				errmsg=errmsg & "<br><li>性别不能为空</li>"
			else
				sex=cint(sex)
				if Sex<>0 and Sex<>1 then
					Sex=1
				end if
			end if
			if Email="" then
				founderr=true
				errmsg=errmsg & "<br><li>Email不能为空</li>"
			else
				if IsValidEmail(Email)=false then
					errmsg=errmsg & "<br><li>您的Email有错误</li>"
			   		founderr=true
				end if
			end if
			if Comane="" then
				founderr=true
				errmsg=errmsg & "<br><li>公司名称不能为空</li>"
			end if
			if Add="" then
				founderr=true
				errmsg=errmsg & "<br><li>收货地址不能为空</li>"
			end if
			if Somane="" then
				founderr=true
				errmsg=errmsg & "<br><li>收货人不能为空</li>"
			end if
			if Phone="" then
				founderr=true
				errmsg=errmsg & "<br><li>联系电话不能为空</li>"
			end if
			if FoundErr<>true then
				rsUser("Sex")=Sex
				rsUser("Email")=Email
				rsUser("HomePage")=HomePage
				rsUser("Comane")=Comane
				rsUser("Add")=Add
				rsUser("Somane")=Somane
				rsUser("Zip")=Zip
				rsUser("Phone")=Phone
				rsUser("Fox")=Fox
				rsUser.update
				response.write"<SCRIPT language=JavaScript>alert('会员资料修改成功!');"
                response.write"javascript:history.go(-1)</SCRIPT>"				
			else
				call WriteErrMsg()
			end if
		else

%>
<!-- #include file="Head.asp" -->
<table width="100%" height="8"  border="0" cellpadding="0" cellspacing="0" background="Img/contopbg.gif">
  <tr>
    <td><table width="226" height="8" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="209"></td>
          <td width="17" background="Img/contopbg2.gif"></td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="209" align="center" valign="top"><!-- #include file="server_left.asp" -->
      <p>&nbsp;</p></td><td width="17" background="Img/combg.gif">&nbsp;</td>
    <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="2" bgcolor="#E6EFF9"></td>
            </tr>
            <tr>
              <td height="26" bgcolor="#AACFF0">&nbsp; <span >&nbsp;&nbsp;<img src="Img/HaoSc23.png" width="14" height="16" align="absmiddle"> <strong>会员中心</strong></span></td>
            </tr>
            <tr>
              <td height="2" bgcolor="#0086C6"></td>
            </tr>
        </table></td>
      </tr>
      <TR>
        <TD 
                  height=1>&nbsp;
          </TD>
      </TR>
    </table>
      <table width="98%"  border="0" align="center" cellpadding="3" cellspacing="3">
        <tr>
          <td align="center" valign="top"><FORM name="Form1" action="Manage.asp" method="post">
            <table width=500 border=0 align="center" cellpadding=2 cellspacing=2 class='border'>
              <TR align=center class='title'>
                <TD height=20 colSpan=2><font color="#FF6600" class=font14><b>修改注册用户信息</b></font></TD>
              </TR>
              <TR>
                <TD width="120" align="right"><b>用 户 名:</b></TD>
                <TD>
                  <INPUT name=UserName value="<%=rsUser("UserName")%>" size=30   maxLength=14></TD>
              </TR>
              <TR>
                <TD width="120" align="right"><strong>性别:</strong></TD>
                <TD>
                  <INPUT type=radio value="1" name=sex <%if rsUser("Sex")=1 then response.write "CHECKED"%>>
        男 &nbsp;&nbsp;
        <INPUT type=radio value="0" name=sex <%if rsUser("Sex")=0 then response.write "CHECKED"%>>
        女</TD>
              </TR>
              <TR>
                <TD width="120" align="right"><strong>Email地址:</strong></TD>
                <TD>
                  <INPUT name=Email value="<%=rsUser("Email")%>" size=30   maxLength=50>
                </TD>
              </TR>
              <TR>
                <TD width="120" align="right"><strong>主页:</strong></TD>
                <TD>
                  <INPUT   maxLength=100 size=30 name=homepage value="<%=rsUser("HomePage")%>"></TD>
              </TR>
              <TR>
                <TD width="120" align="right"><strong>公司名称:</strong></TD>
                <TD>
                  <INPUT name=Comane value="<%=rsUser("Comane")%>" size=30 maxLength=20></TD>
              </TR>
              <TR>
                <TD width="120" align="right"><strong>收货地址:</strong></TD>
                <TD>
                  <INPUT name=Add value="<%=rsUser("Add")%>" size=30 maxLength=50></TD>
              </TR>
              <TR>
                <TD align="right"><strong>收货人:</strong></TD>
                <TD><INPUT name=Somane value="<%=rsUser("Somane")%>" size=30 maxLength=50></TD>
              </TR>
              <TR>
                <TD align="right"><strong>邮政编码:</strong></TD>
                <TD><INPUT name=Zip value="<%=rsUser("Zip")%>" size=30 maxLength=50></TD>
              </TR>
              <TR>
                <TD align="right"><strong>联系电话:</strong><br></TD>
                <TD><INPUT name=Phone value="<%=rsUser("Phone")%>" size=30 maxLength=50></TD>
              </TR>
              <TR>
                <TD align="right"><strong>传 真:</strong></TD>
                <TD><INPUT name=Fox value="<%=rsUser("Fox")%>" size=30 maxLength=50></TD>
              </TR>
              <TR align="center" >
                <TD height="40" colspan="2"><input name="Action" type="hidden" id="Action" value="Modify">
                    <input name=Submit   type=submit id="Submit" value="保存修改结果">
                </TR>
            </TABLE>
          </form></td>
        </tr>
      </table></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
</BODY></HTML>
<%
		end if
	end if
	rsUser.close
	set rsUser=nothing
end if
call CloseConn()
%>

⌨️ 快捷键说明

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