?? huiyuan_modi.asp
字號:
<%
if session("username")="" then
%>
<script language="javascript">
top.location.href="../login.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="../style2.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY>
<%
if fla4="0" then
%>
<br><center><font color="#FF0000">你不具備此權限,請與管理員聯(lián)系!</font></center>
<%
response.end
end if
%>
<%if request("hid1")="" then%>
<script language="javascript">
function check()
{
if (document.form1.username.value=="")
{
alert("有*號的必須填寫!");
return false;
}
}
</script>
<%
if request("hid2")<>"" then
conn.execute("update huiyuan set enddate=enddate+365,jifen=jefen+"&xuhuijifen&" where id="&request("id"))
response.write "<script>alert('續(xù)會成功!')</script>"
end if
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="paixu" value="<%=request("paixu")%>">
<input type="hidden" name="paixu2" value="<%=request("paixu2")%>">
<input type="hidden" name="paixu3" value="<%=request("paixu3")%>">
<input type="hidden" name="page" value="<%=request("page")%>">
<input type="hidden" name="class" value="<%=request("class")%>">
<input type="hidden" name="keyword" value="<%=request("keyword")%>">
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td height="21"> <img src="../Images/ico/ico08.gif" width="32" height="32" hspace="2" vspace="2" align="absmiddle"><font size="+1"><strong> 修改會員資料</strong></font></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" class="TableMenu">
<tr class="a1" style="color:#ffffff;font-size:12px;">
<th height="30" colspan="2" style="color:#ffffff;font-size:14px"><img src="../images/res.gif" border="0" hspace="2" align="absmiddle">會員資料修改 <font size="-1">(帶*號的為必填項)</font></th>
</tr>
<tr class="a3">
<td width="27%" height="30" align="right"><b>會員姓名:</b> </td>
<td width="73%">
<input type="text" name="username" style="width:200px" value="<%=rs("username")%>">
<font color="#ff0000">*</font></td>
</tr>
<tr bgcolor="#ffffff">
<td align="right" height="30"><b>會員性別:</b> </td>
<td>
<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 class="a3">
<td align="right" height="30"><b>聯(lián)系電話:</b> </td>
<td>
<input type="text" name="tel" style="width:200px" value="<%=rs("tel")%>"></td>
</tr>
<tr bgcolor="#ffffff">
<td align="right" height="30"><b>家庭住址:</b></td>
<td>
<input type="text" name="address" style="width:300px" value="<%=rs("address")%>"></td>
</tr>
<tr class="a3">
<td align="right" height="30"><b>身份證號:</b></td>
<td>
<input type="text" name="sfz" style="width:300px" value="<%=rs("sfz")%>"></td>
</tr>
<tr bgcolor="#ffffff">
<td align="right" height="30"><b>介紹人:</b></td>
<td>
<%
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 class="a3">
<td align="right" height="30"><b>會員卡號:</b></td>
<td>
<%=rs("card")%></td>
</tr>
<tr bgcolor="#ffffff">
<td align="right" height="30"><b>經(jīng)辦人:</b></td>
<td>
<%
sql="select * from login order by id"
set rs_login=conn.execute(sql)
if rs_login.eof then
%>
<a href="user_add.asp">先添加員工</a>
<%
else
%>
<select name="login">
<%
do while rs_login.eof=false
%>
<option value="<%=rs_login("username")%>"<%if rs_login("username")=rs("login") then%> selected="selected"<%end if%>><%=rs_login("username")%></option>
<%
rs_login.movenext
loop
%>
</select>
<%
end if
%>
</td>
</tr>
<tr class="a3">
<td align="right" height="30"><b>會員生日:</b></td>
<td>
<input name="shenri" value="<%=rs("shenri")%>" readonly onClick="JavaScript:window.open('day.asp?form=form1&field=shenri&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=470,left=520');" style="width:150px">
<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 bgcolor="#ffffff">
<td align="right" height="30"><b>入會時間:</b></td>
<td>
<input name="startdate" value="<%=rs("startdate")%>" readonly onClick="JavaScript:window.open('day.asp?form=form1&field=startdate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');" style="width:100px">
</td>
</tr>
<tr class="a3">
<td align="right" height="30"><b>到期時間:</b></td>
<td>
<input name="enddate" value="<%=rs("enddate")%>" readonly onClick="JavaScript:window.open('day.asp?form=form1&field=enddate&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');" style="width:100px">
</td>
</tr>
<tr bgcolor="#ffffff">
<td align="right" height="30"><b>會員積分:</b></td>
<td>
<input type="text" name="jifen" style="width:300px" value="<%=rs("jifen")%>" onKeyUp="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"></td>
</tr>
<tr class="a3">
<td align="right" height="30"><b>備注:</b></td>
<td> <textarea name="beizhu" cols="70" rows="4"><%=rs("beizhu")%></textarea></td>
</tr>
<tr bgcolor="#ffffff">
<td height="30"> </td>
<td> <input type="submit" value=" 確認修改 " onClick="return check()">
<input type="hidden" name="hid1" value="ok">
<input type="hidden" name="id" value="<%=request("id")%>">
<input type="reset" value=" 重置 ">
<input type="button" value=" 放棄修改返回 " onClick="window.history.go(-1)">
</td>
</tr>
</table>
</form>
<%
else
nowusername=request("username")
nowxinbie=request("xinbie")
nowtel=request("tel")
nowaddress=request("address")
nowsfz=request("sfz")
nowlogin=request("login")
nowjifen=request("jifen")
nowbeizhu=request("beizhu")
nowstartdate=request("startdate")
nowenddate=request("enddate")
nowshenri=request("shenri")
nowyinyan=request("yinyan")
sql="update huiyuan set username='"&nowusername&"',xinbie='"&nowxinbie&"',tel='"&nowtel&"',address='"&nowaddress&"',sfz='"&nowsfz&"',login='"&nowlogin&"',jifen="&nowjifen&",beizhu='"&nowbeizhu&"',startdate=#"&nowstartdate&"#,enddate=#"&nowenddate&"#,shenri=#"&nowshenri&"#,yinyan='"&nowyinyan&"' where id="&request("id")
conn.execute(sql)
%>
<script language="javascript">
alert("會員資料修改成功!")
window.location.href="huiyuan.asp?form=<%=request("form")%>&field=<%=request("field")%>&field2=<%=request("field2")%>&field3=<%=request("field3")%>&paixu=<%=request("paixu")%>&paixu2=<%=request("paixu2")%>&paixu3=<%=request("paixu3")%>&page=<%=request("page")%>&class=<%=request("class")%>&keyword=<%=request("keyword")%>"
</script>
<%
end if
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -