UserModify.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:14k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <% Option Explicit %>
- <!--#include file="../../FS_Inc/Const.asp" -->
- <!--#include file="../../FS_InterFace/MF_Function.asp" -->
- <!--#include file="../../FS_Inc/Function.asp" -->
- <%
- MF_Session_TF
- Dim P_UserID,P_UserModify_Obj,P_Temp_UserName
- P_UserID = Request("ID")
- Set P_UserModify_Obj = User_Conn.Execute("Select * from FS_Members where ID="&Clng(P_UserID)&"")
- If P_UserModify_Obj.eof then
- Response.Write("<script>alert(""参数传递错误"");window.close();</script>")
- Response.End
- End If
- P_Temp_UserName = P_UserModify_Obj("UserName")
- %>
- <%
- If Request.Form("action") = "mod" then
- Dim P_UserAdd_Obj,P_UserAdd_Sql,P_Choose_UserName_Obj,P_UserName_Str
- If NoCSSHackAdmin(Request.Form("UserName"),"会员名")="" or isnull(Request.Form("UserName")) then
- Response.Write("<script>alert(""请填写会员登录名"");</script>")
- Response.End
- Else
- P_UserName_Str = Replace(Replace(Request.Form("UserName"),"""",""),"'","")
- End If
- Set P_Choose_UserName_Obj = User_Conn.Execute("Select count(ID) from FS_Members where MemName='"&P_UserName_Str&"'")
- If Cstr(P_UserModify_Obj("UserName"))=Cstr(P_UserName_Str) and P_Choose_UserName_Obj(0)>1 then
- Response.Write("<script>alert(""此会员登录名已经存在,请修改"");</script>")
- Response.End
- Elseif Cstr(P_UserModify_Obj("UserName"))<>Cstr(P_UserName_Str) and P_Choose_UserName_Obj(0)<>0 then
- Response.Write("<script>alert(""此会员登录名已经存在,请修改"");</script>")
- Response.End
- End If
- P_Choose_UserName_Obj.Close
- Set P_Choose_UserName_Obj = Nothing
- If Request.Form("Password")<>"" and Cstr(Request.Form("Password"))<>Cstr(Request.Form("PasswordTF")) then
- Response.Write("<script>alert(""密码与确认密码不同"");</script>")
- Response.End
- End If
- If Request.Form("Name")="" or isnull(Request.Form("Name")) then
- Response.Write("<script>alert(""请填写会员真实姓名"");</script>")
- Response.End
- End If
- '===========================================
- '判断输入的生日格式,正确才保存
- If Request.Form("Birthday")<>"" then
- If Not Isdate(Request.Form("Birthday")) then
- Response.Write("<script>alert(""请输入正确的生日格式,例:1976-1-1"");</script>")
- Response.End
- end if
- End If
- '==========================================
- Set P_UserAdd_Obj = Server.CreateObject(G_FS_RS)
- P_UserAdd_Sql = "Select * from FS_Members where ID="&P_UserID&""
- P_UserAdd_Obj.Open P_UserAdd_Sql,User_Conn,3,3
- P_UserAdd_Obj("UserName") = Replace(Replace(Request.Form("UserName"),"""",""),"'","")
- If Request.Form("Password")<>"" then
- P_UserAdd_Obj("UserPassword") = md5(Request.Form("Password"),16)
- End If
- P_UserAdd_Obj("GroupID") = Request.Form("GroupID")
- P_UserAdd_Obj("RealName") = Replace(Replace(Request.Form("Name"),"""",""),"'","")
- P_UserAdd_Obj("Email") = Request.Form("Email")
- P_UserAdd_Obj("Telephone") = Request.Form("Telephone")
- P_UserAdd_Obj("QQ") = Request.Form("QQ")
- P_UserAdd_Obj("HomePage") = Request.Form("HomePage")
- P_UserAdd_Obj("LoginNum") = Request.Form("LoginNum")
- P_UserAdd_Obj("Address") = Request.Form("Address")
- P_UserAdd_Obj("SelfIntro") = Request.Form("SelfIntro")
- P_UserAdd_Obj("AddUser") = Request.Form("AddUser")
- if Request.Form("Integral") <> "" then
- P_UserAdd_Obj("Integral") = Request.Form("Integral")
- end if
- P_UserAdd_Obj("FaceFile") = Request.Form("FaceFile")
- If Request.Form("Birthday")<>"" then
- P_UserAdd_Obj("BothYear") = Request.Form("Birthday")
- End If
- P_UserAdd_Obj("MSN") = Request.Form("MSN")
- P_UserAdd_Obj("Corner") = Request.Form("Corner")
- P_UserAdd_Obj("Province") = Request.Form("Province")
- P_UserAdd_Obj("City") = Request.Form("City")
- P_UserAdd_Obj("Vocation") = Request.Form("Vocation")
- P_UserAdd_Obj("EduLevel") = Request.Form("EduLevel")
- If Request.Form("IsOpen") = "0" then
- P_UserAdd_Obj("IsOpen") = "0"
- Else
- P_UserAdd_Obj("IsOpen") = "1"
- End If
- If Request.Form("SubInfTF") = "0" then
- P_UserAdd_Obj("SubInfTF") = "0"
- Else
- P_UserAdd_Obj("SubInfTF") = "1"
- End If
- P_UserAdd_Obj("PassQuestion") = Request.Form("PassQuestion")
- P_UserAdd_Obj("PassAnswer") = Request.Form("PassAnswer")
- P_UserAdd_Obj("UnderWrite") = Request.Form("UnderWrite")
- If Request.Form("Lock") = "0" then
- P_UserAdd_Obj("Lock") = "0"
- Else
- P_UserAdd_Obj("Lock") = "1"
- End If
- If Request.Form("Sex") = "0" then
- P_UserAdd_Obj("Sex") = "0"
- Else
- P_UserAdd_Obj("Sex") = "1"
- End If
- P_UserAdd_Obj.Update
- P_UserAdd_Obj.Close
- Set P_UserAdd_Obj = Nothing
- If Cstr(P_Temp_UserName) <> Cstr(Replace(Replace(Request.Form("UserName"),"""",""),"'","")) then
- User_Conn.Execute("Update FS_Message set MeRead='"&Replace(Replace(Request.Form("UserName"),"""",""),"'","")&"' where MeRead='"&P_Temp_UserName&"'")
- End If
- Response.Redirect("SysUserList.asp")
- Response.End
- End If
- %>
- <TITLE>修改会员信息</TITLE>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
- </HEAD>
- <script language="JavaScript" src="../../FS_Inc/PublicJS.js" type="text/JavaScript"></script>
- <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
- <body leftmargin="2" topmargin="2">
- <form action="" method="post" name="UserAddSForm">
- <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#999999">
- <tr class="hback">
- <td height="26" colspan="5" valign="middle">
- <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width=35 align="center" alt="保存" onClick="document.UserAddSForm.submit();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">保存</td>
- <td width=2 class="Gray">|</td>
- <td width=35 align="center" alt="后退" onClick="top.GetEkMainObject().history.back();" onMouseMove="BtnMouseOver(this);" onMouseOut="BtnMouseOver(this);" class="BtnMouseOut">后退</td>
- <td> <input name="action" type="hidden" id="action" value="mod"></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellpadding="3" cellspacing="1">
- <tr>
- <td width="9%" bgcolor="#EAEAEA">
- <div align="right">会 员 名</div></td>
- <td width="37%" >
- <input name="UserName" readonly type="text" id="UserName" style="width:90%" value="<%=P_UserModify_Obj("UserName")%>"></td>
- <td width="12%" bgcolor="#EAEAEA">
- <div align="right">会 员 组</div></td>
- <td width="39%" >
- <select name="GroupID" id="GroupID" style="width:90%">
- <option value="0" <%If P_UserModify_Obj("GroupID") = "" or P_UserModify_Obj("GroupID") = "0" Or IsNull(P_UserModify_Obj("GroupID")) then Response.Write("selected") end if%>> </option>
- <%
- Dim SelGroupObj
- Set SelGroupObj = User_Conn.Execute("Select GroupID,Name from FS_MemGroup order by PopLevel desc")
- do while not SelGroupObj.eof
- If P_UserModify_Obj("GroupID") <> "" And P_UserModify_Obj("GroupID") <> "0" And (Not IsNull(P_UserModify_Obj("GroupID"))) Then
- %>
- <option value="<%=SelGroupObj("GroupID")%>" <%If Cstr(P_UserModify_Obj("GroupID"))=Cstr(SelGroupObj("GroupID")) then Response.Write("selected") end if%>><%=SelGroupObj("Name")%></option>
- <%
- Else
- %>
- <option value="<%=SelGroupObj("GroupID")%>" selected><%=SelGroupObj("Name")%></option>
- <%
- End If
- SelGroupObj.MoveNext
- Loop
- SelGroupObj.Close
- Set SelGroupObj = Nothing
- %>
- </select></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">密 码</div></td>
- <td >
- <input name="Password" type="password" id="Password" style="width:90%"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">确认密码</div></td>
- <td >
- <input name="PasswordTF" type="password" id="PasswordTF2" style="width:90%"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">真实姓名</div></td>
- <td >
- <input name="Name" type="text" id="Name2" style="width:90%" value="<%=P_UserModify_Obj("RealName")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">电话号码</div></td>
- <td >
- <input name="Telephone" type="text" id="Telephone2" style="width:90%" value="<%=P_UserModify_Obj("Tel")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">E_Mail</div></td>
- <td >
- <input name="Email" type="text" id="Email2" style="width:90%" value="<%=P_UserModify_Obj("Email")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">QQ号: </div></td>
- <td ><input name="QQ" type="text" id="Oicq2" style="width:90%" value="<%=P_UserModify_Obj("QQ")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">MSN</div></td>
- <td >
- <input name="MSN" type="text" id="MSN2" style="width:90%" value="<%=P_UserModify_Obj("MSN")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">会员主页</div></td>
- <td >
- <input name="HomePage" type="text" id="HomePage2" style="width:90%" value="<%=P_UserModify_Obj("HomePage")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">联系地址</div></td>
- <td >
- <input name="Address" type="text" id="Address2" style="width:90%" value="<%=P_UserModify_Obj("Address")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">国家及区域</div></td>
- <td >
- <input name="Corner" type="text" id="Corner2" style="width:90%" value="<%=P_UserModify_Obj("Corner")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">省 份</div></td>
- <td >
- <input name="Province" type="text" id="Province2" style="width:90%" value="<%=P_UserModify_Obj("Province")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">城 市</div></td>
- <td >
- <input name="City" type="text" id="City2" style="width:90%" value="<%=P_UserModify_Obj("City")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">职 业</div></td>
- <td >
- <input name="Vocation" type="text" id="Vocation2" style="width:90%" value="<%=P_UserModify_Obj("Vocation")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">证 件</div></td>
- <td >
- <input name="EduLevel" type="text" id="EduLevel2" style="width:90%" value="<%=P_UserModify_Obj("EduLevel")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">登录次数</div></td>
- <td >
- <input name="LoginNum" type="text" id="LoginNum2" style="width:90%" value="<%=P_UserModify_Obj("LoginNum")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">积 分</div></td>
- <td >
- <input name="Integral" type="text" id="Integral" style="width:90%" value="<%=P_UserModify_Obj("Integral")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">密码提示</div></td>
- <td >
- <input name="PassQuestion" type="text" id="PassQuestion2" style="width:90%" value="<%=P_UserModify_Obj("PassQuestion")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">问题答案</div></td>
- <td >
- <input name="PassAnswer" type="text" id="PassAnswer2" style="width:90%" value="<%=P_UserModify_Obj("PassAnswer")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">介 绍 人</div></td>
- <td >
- <input name="AddUser" type="text" id="AddUser2" style="width:90%" value="<%=P_UserModify_Obj("AddUser")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">头像图片</div></td>
- <td >
- <input name="FaceFile" type="text" id="FaceFile2" style="width:90%" value="<%=P_UserModify_Obj("FaceFile")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">签 名</div></td>
- <td >
- <input name="UnderWrite" type="text" id="UnderWrite2" style="width:90%" value="<%=P_UserModify_Obj("UnderWrite")%>"></td>
- <td bgcolor="#EAEAEA">
- <div align="right">出身年月</div></td>
- <td >
- <input name="Birthday" type="text" id="Birthday2" style="width:90%" value="<%=P_UserModify_Obj("BothYear")%>"></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">最后登录</div></td>
- <td >
- <input name="LastLoginIP" type="text" id="LastLoginIP2" style="width:90%" value="<%=P_UserModify_Obj("LastLoginIP")%>" readonly></td>
- <td bgcolor="#EAEAEA">
- <div align="right">登录时间</div></td>
- <td >
- <input name="LastLoginTime" type="text" id="LastLoginTime2" style="width:90%" value="<%=P_UserModify_Obj("LastLoginTime")%>" readonly></td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">锁 定</div></td>
- <td >
- <input type="radio" name="Lock" value="1" <%If P_UserModify_Obj("Lock") = "1" then Response.Write("checked") end if%>>
- 是
- <input name="Lock" type="radio" value="0" <%If P_UserModify_Obj("Lock") = "0" or P_UserModify_Obj("Lock") = "" then Response.Write("checked") end if%>>
- 否</td>
- <td bgcolor="#EAEAEA">
- <div align="right">性 别</div></td>
- <td >
- <input name="Sex" type="radio" value="0" <%If P_UserModify_Obj("Sex") = "0" or P_UserModify_Obj("Sex") = "" then Response.Write("checked") end if%>>
- 男
- <input type="radio" name="Sex" value="1" <%If P_UserModify_Obj("Sex") = "1" then Response.Write("checked") end if%>>
- 女</td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">开放资料</div></td>
- <td >
- <input name="IsOpen" type="radio" value="1" <% if P_UserModify_Obj("IsOpen")="1" then Response.Write("checked") end if%>>
- 是
- <input type="radio" name="IsOpen" value="0" <% if P_UserModify_Obj("IsOpen")="0" then Response.Write("checked") end if%>>
- 否</td>
- <td bgcolor="#EAEAEA">
- <div align="right">订阅信息</div></td>
- <td >
- <input name="SubInfTF" type="radio" value="1" <% if P_UserModify_Obj("SubInfTF")="1" then Response.Write("checked") end if%>>
- 是
- <input type="radio" name="SubInfTF" value="0" <% if P_UserModify_Obj("SubInfTF")="0" then Response.Write("checked") end if%>>
- 否</td>
- </tr>
- <tr>
- <td bgcolor="#EAEAEA">
- <div align="right">个人介绍</div></td>
- <td colspan="3" >
- <textarea name="SelfIntro" rows="6" id="SelfIntro" style="width:90%"><%=P_UserModify_Obj("SelfIntro")%></textarea> </td>
- </tr>
- </table>
- </form>
- </body>
- </html>