📄 editvip.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("ad_admin")="" then
response.redirect "login.asp"
end if
dim username,pass,addr,phone,qe,sql,rs,vipid
vipid=request("id")
if isnumeric(vipid)=false then
response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
response.end
end if
username=HtmlEncode(trim(request.form("username")))
pass=HtmlEncode(trim(request.form("pass")))
qe=HtmlEncode(trim(request.form("qe")))
phone=HtmlEncode(request.form("phone"))
addr=HtmlEncode(request.form("addr"))
vipmark=HtmlEncode(request.form("vipmark"))
vipstop=dateadd("d",request.form("vipstop"),date())
sql="select * from vip where aduserid="&vipid
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if username<>"" then
rs("username")=username
rs("pass")=pass
rs("qe")=qe
rs("phone")=phone
rs("addr")=addr
rs("vipmark")=vipmark
rs("vipstop")=vipstop
rs.update
rs.close
conn.close
set conn=nothing
set rs=nothing
response.Write "<script language=javascript>alert('修改成功!');location.href='vipuser.asp';</script>"
end if
%>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{
if (document.postart.username.value.length<1)
{
alert("请您填写用户名!");
document.postart.username.focus();
return false;
}
if (document.postart.pass.value==""){
alert ("请输入您密码!");
document.postart.pass.focus();
return(false);
}
if (document.postart.qe.value==""){
alert ("请输入您的QQ或Email!");
document.postart.qe.focus();
return(false);
}
if (document.postart.vipstop.value=="选择有效期")
{
alert("请您选择vip有效期限!");
document.postart.vipstop.focus();
return false;
}
}
//-->
</SCRIPT>
<!-- 这里是主题 -->
<div align="center">
<center>
<form action="" method="post" name="postart" onsubmit="return checkadd()">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="3" height="10" valign="top">
</td>
</tr>
<tr>
<td width="35%" align="right" height="26">用户名:</td>
<td width="58%" height="26"><input type="text" name="username" size="20" maxlength="10" value="<%=rs("username")%>">
<font color="#FF0000">* 6字以内</font></td>
<td width="7%" height="238" rowspan="10" valign="top">
</td>
</tr>
<tr>
<td width="35%" align="right" height="26">密码:</td>
<td width="58%" height="26"><input type="password" name="pass" value="<%=rs("pass")%>">
</tr>
<tr>
<td width="35%" align="right" height="26">地址:</td>
<td width="58%" height="26"><input type="text" name="addr" value="<%=rs("addr")%>">
</tr>
<tr>
<td width="35%" align="right" height="26">电话:</td>
<td width="58%" height="26"><input type="text" name="phone" value="<%=rs("phone")%>">
</tr>
</tr>
<tr>
<td width="35%" align="right" height="26">QQ或Email:</td>
<td width="58%" height="26"><input type="text" name="qe" value="<%=rs("qe")%>">
</tr>
<tr>
<td width="36%" align="right" height="26">是否通过审核:</td>
<td width="64%" height="26">
<input type="radio" value=0 <% if rs("vipmark")=0 then %>checked<% end if %> name="vipmark">否
<input type="radio" value=1 name="vipmark" <% if rs("vipmark")=1 then %>checked<% end if %>>是</td>
</tr>
<tr>
<td width="35%" align="right" height="26">有效期限:</td>
<td width="58%" height="26"><select size="1" name="vipstop">
<option selected value="选择有效期">选择有效期</option>
<option value="7">一星期</option>
<option value="15">半个月</option>
<option value="31">一个月</option>
<option value="61">两个月</option>
<option value="92">三个月</option>
<option value="183">半年</option>
<option value="365">一年</option>
</select> <font color="#FF0000">*</font>
</td>
</tr>
<tr>
<td width="35%" align="right" height="26">到期时间:</td>
<td width="58%" height="26"><%=rs("vipstop")%>
</tr>
<tr>
<td width="35%" align="right" height="30">
</td>
<td width="58%" align="right" height="30">
<p align="left"><input type="submit" value="提交" name="submit">
<input type="reset" value="取消" name="reset"> </td>
</tr>
</table>
</form>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -