?? gx_type.asp
字號(hào):
<!--#include file="conn.asp"-->
<html>
<head>
<%if session("gxjb")<>"admin" then response.redirect "gx_dl.asp"%>
<script language="javascript">
<!--
function jc(gn)
{
if(gn=="")
{alert('對(duì)不起!不能為空!');
return false;}
window.location="gx_type.asp?cz=tj&lb="+gn;}
function xg(gn,id)
{if(gn=="")
{alert('對(duì)不起!不能為空!');
return false;}
window.location="gx_type.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("gxjb")%>
<body>
<!--#include file="gx_wjt.asp"-->
<%if id<>"" and cz="sc" then
exec="delete * from type where id="+id
conn.execute exec
conn.close
response.redirect "gx_type.asp"
end if
if lb<>"" and cz="tj" then
lb=xrzh(lb)
exec="insert into type (lb) values ('"+lb+"')"
conn.execute exec
conn.close
response.redirect "gx_type.asp"
end if
if lb<>"" and cz="xg" then
lb=xrzh(lb)
exec="update type set lb='"+lb+"' where id="+id
conn.execute exec
conn.close
response.redirect "gx_type.asp"
end if
exec="select * from type order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1%>
<table width="778" border="0" cellpadding="0" cellspacing="1" align="center">
<tr bgcolor="#CCD8E6" height="25">
<td align="center">類別名稱</td>
<td align="center">處理</td>
</tr>
<%j=1
do while not rs.eof%>
<tr bgcolor="#E3E9F1" height="25">
<td align="center"><input type="text" name="lb<%=j%>" value="<%=rs("lb")%>"></td>
<td align="center">
<a href=# onClick="javascript:xg(lb<%=j%>.value,'<%=rs("id")%>');">修改</a>
|
<a href="gx_type.asp?id=<%=rs("id")%>&cz=sc" onClick="javascript:return confirm('確實(shí)要?jiǎng)h除該記錄嗎?');">刪除</a>
</td>
</tr>
<%j=j+1
rs.movenext
loop%>
<tr height="25" bgcolor="#CCD8E6">
<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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -