📄 qq_ltfl.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<script language="javascript">
<!--
function jc(gn)
{
if(gn=="")
{alert('对不起!不能为空!');
return false;}
window.location="qq_ltfl.asp?cz=tj&lb="+gn;}
function xg(gn,id)
{if(gn=="")
{alert('对不起!不能为空!');
return false;}
window.location="qq_ltfl.asp?cz=xg&lb="+gn+"&id="+id;}
-->
</script>
<link rel="stylesheet" href="style.css" ="text/css">
<title>分类管理</title>
</head>
<%id=request.querystring("id")
lb= request.querystring("lb")
cz=request.querystring("cz")
jb=session("qqjb")%>
<body>
<!--#include file="qq_wjt.asp"-->
<%if jb<>"admin" then response.redirect "qq_dl.asp"
if id<>"" and cz="sc" then
exec="delete * from zl where id="+id
conn.execute exec
conn.close
response.redirect "qq_ltfl.asp"
end if
if lb<>"" and cz="tj" then
lb=xrzh(lb)
exec="insert into zl (zl) values ('"+lb+"')"
conn.execute exec
conn.close
response.redirect "qq_ltfl.asp"
end if
if lb<>"" and cz="xg" then
lb=xrzh(lb)
exec="update zl set zl='"+lb+"' where id="+id
conn.execute exec
conn.close
response.redirect "qq_ltfl.asp"
end if
exec="select * from zl order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1%>
<table width="96%" border="0" cellpadding="0" cellspacing="1" align="center">
<tr bgcolor="#CCD8E6" height="25">
<td align="center">编号</td>
<td align="center">类别名称</td>
<td align="center">处理</td>
</tr>
<%j=1
do while not rs.eof%>
<tr bgcolor="#E3E9F1" height="25">
<td align="center" width="5%"><%=j%></td>
<td align="center"><input type="text" name="lb<%=j%>" value="<%=rs("zl")%>"></td>
<td align="center">
<a href=# onClick="javascript:xg(lb<%=j%>.value,'<%=rs("id")%>');">修改</a>
|
<a href="qq_ltfl.asp?id=<%=rs("id")%>&cz=sc" onClick="javascript:return confirm('确实要删除该记录吗?');">删除</a>
</td>
</tr>
<%j=j+1
rs.movenext
loop%>
<tr bgcolor="#CCD8E6">
<Td align="center"><%=j%></Td>
<td align="center"><input ="text" name="lb<%=j+1%>"></td>
<td align="center" colspan="2"><a href=# onclick="javascript:jc(lb<%=j+1%>.value);">添加</td>
</tr>
</table>
<%rs.close
conn.close
set conn=nothing%>
</body>
</htm>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -