📄 downcodemanager.asp
字号:
<%response.expires=0%>
<!--#include file="conn.asp"-->
<%
function strlength(inputstr)
dim length
lenght=""
'if not isnumeric(inputstr) then
' length="手机下放代码只能输入数字!"
if len(inputstr)>15 then
length="手机下放代码最多只能输入15个数字!"
end if
strlength=length
end function
%>
<html>
<head>
<meta http-equiv="expires" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css>
<title>手机下放号码管理/title>
</head>
<body bgcolor="#eeeeee" topmargin="5" leftmargin="5">
<br>
<center>
<font color="#ee0000" size="+1"><b>手机下放号码管理</b></font><br><br>
<%
id=request("id")
downcode=trim(request("downcode"))
'-----------------------------------------------
if request("submit")="删除" then
set conn=opendb("conn")
sql="update companyinfotable set downcode='' where autoid="&id
conn.execute sql
%>
<font color=red><%=userlevel%>删除成功!</font>
<%
end if
'---------------------------------------------------
if request("submit")="修改" and downcode<>"" then
errstr=strlength(downcode)
if errstr<>"" then
response.write("<font color=red>"&errstr&"</font><br>")
else
'判断是否有与修改的职位相同的
set conn=opendb("conn")
set rs=server.createobject("adodb.recordset")
sql="select * from companyinfotable where downcode='" & downcode&"' and autoid<>"&id
rs.open sql,conn,1
if not rs.eof and not rs.bof then
%>
<font color=red><%=downcode%>已经存在,请换名重试!</font><br>
<%
else
sql = "update companyinfotable set downcode='" & downcode & "' where autoid=" & id
conn.Execute sql
%>
<font color=red>修改成功!</font>
<%
end if
end if
end if
%>
<table border="1" cellspacing="0" cellpadding="0">
<%
set conn=opendb("conn")
set rs=server.createobject("adodb.recordset")
sql="select * from companyinfotable"
rs.open sql,conn,1
while not rs.eof and not rs.bof
%>
<tr>
<form method="post" action="downcodemanager.asp">
<td>
<input type="submit" name="submit" value="删除"></td><td><%=rs("companycode")%><input type="hidden" name="olduserlevel" value="<%=trim(rs("downcode"))%>"><input type="hidden" name="id" value=<%=rs("autoid")%>><input type="text" name="downcode" value="<%=trim(rs("downcode"))%>" maxlength="15"></td><td><input type="submit" name="submit" value="修改"></td>
</form>
</tr>
<%
rs.movenext
wend
%>
</table>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -