📄 huiyuan_modi.asp
字号:
<%
if session("yida_username")="" then
%>
<script language="javascript">
top.location.href="../index.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 添加会员</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>
body {
background-color:#FFFFFF;
}
</style>
</HEAD>
<BODY>
<%
if fla37="0" and session("shiwei_id")<>"1" then
%>
<br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
%>
<%if request("hid1")="" then%>
<script language="javascript">
function check()
{
if (document.form1.username.value==""||document.form1.card.value=="")
{
alert("有*号的必须填写!");
return false;
}
}
</script>
<%
sql="select * from huiyuan where id="&request("id")
set rs=conn.execute(sql)
%>
<form name="form1">
<input type="hidden" name="form" value="<%=request("form")%>">
<input type="hidden" name="field" value="<%=request("field")%>">
<input type="hidden" name="field2" value="<%=request("field2")%>">
<input type="hidden" name="field3" value="<%=request("field3")%>">
<input type="hidden" name="page" value="<%=request("page")%>">
<input type="hidden" name="zu" value="<%=request("zu")%>">
<input type="hidden" name="keyword" value="<%=request("keyword")%>">
<input type="hidden" name="order1" value="<%=request("order1")%>">
<input type="hidden" name="order2" value="<%=request("order2")%>">
<input type="hidden" name="order3" value="<%=request("order3")%>">
<input type="hidden" name="order4" value="<%=request("order4")%>">
<input type="hidden" name="order5" value="<%=request("order5")%>">
<input type="hidden" name="order6" value="<%=request("order6")%>">
<input type="hidden" name="order7" value="<%=request("order7")%>">
<input type="hidden" name="order8" value="<%=request("order8")%>">
<input type="hidden" name="order9" value="<%=request("order9")%>">
<input type="hidden" name="order10" value="<%=request("order10")%>">
<input type="hidden" name="order11" value="<%=request("order11")%>">
<input type="hidden" name="order12" value="<%=request("order12")%>">
<input type="hidden" name="order13" value="<%=request("order13")%>">
<input type="hidden" name="order14" value="<%=request("order14")%>">
<input type="hidden" name="order15" value="<%=request("order15")%>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/r_1.gif" alt="" /></td>
<td width="100%" background="../images/r_0.gif">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 修改会员资料(带*号的为必填项)</td>
<td align="right"> </td>
</tr>
</table>
</td>
<td><img src="../images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr>
<td width="25%" height="30" align="right">会员组:</td>
<td width="75%" class="category">
<%
sql="select * from zu_huiyuan order by id"
set rs_zu=conn.execute(sql)
if rs_zu.eof then
%>
<script language="javascript">
alert("请先添加会员组!")
window.location.href="zu_add.asp"
</script>
<%
response.end
end if
%>
<select name="id_zu">
<%
do while rs_zu.eof=false
%>
<option value="<%=rs_zu("id")%>"<%if rs_zu("id")=rs("id_zu") then%> selected="selected"<%end if%>><%=rs_zu("zu")%></option>
<%
rs_zu.movenext
loop
%>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">会员卡号:</td>
<td class="category">
<input type="text" name="card" style="width:300px" value="<%=rs("card")%>"> <font color="#ff0000">*</font></td>
</tr>
<tr>
<td height="30" align="right">会员姓名:</td>
<td class="category">
<input type="text" name="username" style="width:200px" value="<%=rs("username")%>">
<font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" height="30">会员性别:</td>
<td class="category">
<input type="radio" name="xinbie" value="女"<%if rs("xinbie")="女" then%> checked="checked"<%end if%>>女 <input type="radio" name="xinbie" value="男"<%if rs("xinbie")="男" then%> checked="checked"<%end if%>>男</td>
</tr>
<tr>
<td align="right" height="30">联系电话:</td>
<td class="category">
<input type="text" name="tel" style="width:200px" value="<%=rs("tel")%>"></td>
</tr>
<tr>
<td align="right" height="30">QQ:</td>
<td class="category">
<input type="text" name="qq" style="width:200px" value="<%=rs("qq")%>" onKeyUp="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"></td>
</tr>
<tr>
<td align="right" height="30">Email:</td>
<td class="category">
<input type="text" name="email" style="width:200px" value="<%=rs("email")%>"></td>
</tr>
<tr>
<td align="right" height="30">家庭住址:</td>
<td class="category">
<input type="text" name="address" style="width:300px" value="<%=rs("address")%>"></td>
</tr>
<tr>
<td align="right" height="30">身份证号:</td>
<td class="category">
<input type="text" name="sfz" style="width:300px" value="<%=rs("sfz")%>"></td>
</tr>
<tr>
<td align="right" height="30">介绍人:</td>
<td class="category">
<%
if rs("jieshao")=0 then
nowjieshao="无"
else
sql="select * from huiyuan where id="&rs("jieshao")
set rs_jieshao=conn.execute(sql)
nowjieshao=rs_jieshao("username")
end if
%>
<%=nowjieshao%>
</td>
</tr>
<tr>
<td align="right" height="30">经办人:</td>
<td class="category">
<%
if session("shiwei_id")=1 then
sql="select * from login order by id_zu,id"
set rs_login=conn.execute(sql)
else
sql="select * from login where id="&session("shiwei_id")
set rs_login=conn.execute(sql)
end if
if rs_login.eof then
%>
<script language="javascript">
alert("请先添加员工!")
window.location.href="../system/user_add.asp"
</script>
<%
response.end
else
%>
<select name="id_login">
<%
do while rs_login.eof=false
%>
<option value="<%=rs_login("id")%>"<%if rs_login("id")=rs("id_login") then%> selected="selected"<%end if%>><%=rs_login("username")%> (<%=rs_login("bianhao")%>)</option>
<%
rs_login.movenext
loop
%>
</select>
<%
end if
%>
</td>
</tr>
<tr>
<td align="right" height="30">会员生日:</td>
<td class="category">
<input name="shenri" value="<%=rs("shenri")%>" readonly style="width:150px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form1&field=shenri&oldDate='+shenri.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=470,left=520');">
<select name="yinyan">
<option value="阴"<%if rs("yinyan")="阴" then%> selected="selected"<%end if%>>阴历</option>
<option value="阳"<%if rs("yinyan")="阳" then%> selected="selected"<%end if%>>阳历</option>
</select>
</td>
</tr>
<tr>
<td align="right" height="30">入会时间:</td>
<td class="category">
<input name="startdate" value="<%=rs("startdate")%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form1&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
</td>
</tr>
<tr>
<td align="right" height="30">到期时间:</td>
<td class="category">
<input name="enddate" value="<%=rs("enddate")%>" readonly style="width:100px">
<img src="../images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form1&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
</td>
</tr>
<tr>
<td align="right" height="30">会员积分:</td>
<td class="category">
<input type="text" name="jifen" style="width:300px" value="<%=rs("jifen")%>" onKeyUp="value=value.replace(/[^\d.]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))"></td>
</tr>
<tr>
<td align="right" height="30">备注:</td>
<td class="category"><textarea name="beizhu" cols="70" rows="4"><%=rs("beizhu")%></textarea></td>
</tr>
<tr>
<td height="30"> </td>
<td class="category">
<input type="submit" value=" 确认修改 " onClick="return check()" class="button">
<input type="reset" value=" 重置 " class="button">
<input type="button" value=" 放弃修改返回 " onClick="window.history.go(-1)" class="button">
<input type="hidden" name="hid1" value="ok">
<input type="hidden" name="id" value="<%=request("id")%>">
</td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table>
</form>
<%
else
nowqq=request("qq")
nowemail=request("email")
nowid_zu=request("id_zu")
nowusername=request("username")
nowxinbie=request("xinbie")
nowtel=request("tel")
nowaddress=request("address")
nowsfz=request("sfz")
nowcard=request("card")
nowid_login=request("id_login")
nowjifen=request("jifen")
nowbeizhu=request("beizhu")
nowstartdate=request("startdate")
nowenddate=request("enddate")
nowshenri=request("shenri")
nowyinyan=request("yinyan")
sql="select * from huiyuan where card='"&nowcard&"' and id<>"&request("id")
set rs=conn.execute(sql)
if rs.eof=false then
%>
<script language="javascript">
alert("您输入的卡号已经存在,请重新输入!")
window.history.go(-1)
</script>
<%
response.end
end if
set rs_login=conn.execute("select * from login where id="&nowid_login)
nowlogin=rs_login("username")
set rs=server.createobject("ADODB.RecordSet")
sql="select * from huiyuan where id="&request("id")
rs.open sql,conn,1,3
rs("card")=nowcard
rs("username")=nowusername
rs("xinbie")=nowxinbie
rs("tel")=nowtel
rs("address")=nowaddress
rs("sfz")=nowsfz
rs("id_login")=nowid_login
rs("login")=nowlogin
rs("jifen")=nowjifen
rs("beizhu")=nowbeizhu
rs("startdate")=nowstartdate
rs("enddate")=nowenddate
rs("shenri")=nowshenri
rs("yinyan")=nowyinyan
rs("qq")=nowqq
rs("email")=nowemail
rs("id_zu")=nowid_zu
rs.update
%>
<script language="javascript">
alert("会员资料修改成功!")
window.location.href="huiyuan.asp?form=<%=request("form")%>&field=<%=request("field")%>&field2=<%=request("field2")%>&field3=<%=request("field3")%>&page=<%=request("page")%>&zu=<%=request("zu")%>&keyword=<%=request("keyword")%>&order1=<%=request("order1")%>&order2=<%=request("order2")%>&order3=<%=request("order3")%>&order4=<%=request("order4")%>&order5=<%=request("order5")%>&order6=<%=request("order6")%>&order7=<%=request("order7")%>&order8=<%=request("order8")%>&order9=<%=request("order9")%>&order10=<%=request("order10")%>&order11=<%=request("order11")%>&order12=<%=request("order12")%>&order13=<%=request("order13")%>&order14=<%=request("order14")%>&order15=<%=request("order15")%>"
</script>
<%
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -