📄 user_code.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
if Session("userqx")>="1" and Session("userqx")<="9" then
else
Response.Redirect "../admin/warn.asp"
end if
%>
<%
userno=Request.QueryString("userno")
if userno="" then Response.End
htmlname="user_code.asp?userno="+userno
tablename="userinfo"
%>
<!-- #include file="../dsn.asp" -->
<html>
<head>
<title>会员资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size: 12px; color: #000; font-family: 宋体}
td {font-size: 12px; color: #000; font-family: 宋体;line-height:130%}
.t1 {font:12px 宋体;color=000000}
.t2 {font:12px 宋体;color:ffffff}
.t3 {font:12px 宋体;color:336699}
.t4 {font:12px 宋体;color:ff0000}
.bt1 {font:14px 宋体;color=000000}
.bt2 {font:14px 宋体;color:ffffff}
.bt3 {font:14px 宋体;color:336699}
.bt4 {font:bold 16px 宋体;color:maroon}
.td1 {font-size:12px;line-height:20px;text-align:right;background-color:#ffffff;color:#000000}
.td2 {font-size:12px;line-height:20px;text-align:left;background-color:#ffffff;color:#000000;}
.td3 {font-size:12px;line-height:20px;text-align:left;background-color:#ffffff;color:#000000;}
A:link {text-decoration:none;color: #000077}
A:visited {text-decoration:none;color: #000077}
A:hover {color: #ff0000}
-->
</style>
</head>
<body bgcolor=#fefefe topmargin=10>
<%
bz=1
set cn = Server.CreateObject("ADODB.Connection")
cn.Open(mycnstr)
set rs = Server.CreateObject("ADODB.Recordset")
set rs2 = Server.CreateObject("ADODB.Recordset")
if Request.ServerVariables("REQUEST_METHOD")="POST" then
bz=0
'username=trim(Request.Form("username"))
'userpass=trim(Request.Form("userpass"))
flag=trim(Request.Form("flag"))
state=trim(Request.Form("state"))
amount=trim(Request.Form("amount"))
'sqltext="select userno,realname from userinfo where usercode='"+username+"' and userno<>"&userno
'rs.Open sqltext,cn,1,1
'if not rs.EOF then
' bz=2
' errtxt="对不起,此会员号("+username+")与(<b><font color=000000>"+trim(rs(1))+"</font></b>)重名!"
'end if
'rs.Close
if bz=0 then
rs.Open "select * from "+tablename+" where userno="&userno,cn,3,3
if not rs.EOF then
rs("flag")=flag
rs("state")=state
rs("amount")=amount
rs.Update()
end if
cn.Close
Response.Write("<script language=Javascript>")
'Response.Write("window.opener.location.reload();")
Response.Write("window.close();")
Response.Write("</script>")
end if
end if
if bz>=1 then
sqltext="select * from "+tablename+" where userno="&userno
rs.Open sqltext,cn,1,1
if not rs.EOF then
username=trim(rs("usercode"))
realname=trim(rs("realname"))
flag=trim(rs("flag"))
state=trim(rs("state"))
creadate=rs("creadate")
updatetime=rs("updatetime")
logintime=rs("logintime")
logincount=rs("logincount")
ipaddress=trim(rs("ipaddress"))
amount=rs("amount")
else
Response.End
end if
rs.Close
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td>
<%if seekname="" then%>
当前位置:<font style="font-size:12px;color:000000"><b><%=realname&"("&username&")"%></b></font>
<%end if%>
</td></tr>
<tr><td><hr size=1></td></tr>
<tr bgcolor="#527c72"><td height=18><font class=t2>具体内容</font><br>
</td></tr>
<tr><td height=2></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
<form action="<%=htmlname%>" method=post name=editform onsubmit="return checkform(editform)" autocomplete = "off">
<tr><td class=td1 width=70>创建日期:</td>
<td class=td2>
<font color=800000><%=creadate%></font>
</td></tr>
<tr><td class=td1>最后更新:</td>
<td class=td2><font color=800000><%=updatetime%></font>
</td></tr>
<tr><td class=td1>上线次数:</td>
<td class=td2><font color=800000><%=logincount%></font>
</td></tr>
<tr><td class=td1>最后上线:</td>
<td class=td2><font color=800000><%=logintime%></font>(<%=ipaddress%>)
</td></tr>
<tr><td class=td1>当前状态:</td>
<td class=td2>
<input type=radio name="state" value="1" <%if state="1" then Response.Write("checked") end if%>>正常
<input type=radio name="state" value="0" <%if state="0" then Response.Write("checked") end if%>>禁止
</td></tr>
<tr><td class=td1 height=30>会员类型:</td>
<td class=td2>
<select name=flag style="width:100px">
<option value="0" <%if flag="0" then Response.Write("selected") end if%>>普通用户</option>
<option value="1" <%if flag="1" then Response.Write("selected") end if%>>内部用户</option>
<option value="2" <%if flag="2" then Response.Write("selected") end if%>>高级用户</option>
<option value="9" <%if flag="9" then Response.Write("selected") end if%>>论坛总坛主</option>
</select>
</td></tr>
<tr><td class=td1 height=30>积分:</td>
<td class=td2>
<input type=text name=amount size=8 maxlength=10 value="<%=amount%>"><font color=red size=1>*</font>
<font color=ff0000><b><%=amount%></b></font>
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td width=150 align=right height=40></td>
<td><input type="submit" name="submit" value="确认提交">
<a href="Javascript:window.close()">【关闭】</a>
</td>
</tr>
</form>
</table>
<%
end if
%>
<body>
</html>
<script language=Javascript>
function checkform(form)
{
var flag=true;
if (isNumberString(form("amount").value,"1234567890")!=1 || form("amount").value<0) {
alert("\请输入正确的积分!");form("amount").focus();return false;}
return flag;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -