?? qq_bq.asp
字號:
<!--#include file="conn.asp"-->
<html>
<head>
<script language="javascript">
<!--
function jc(zt,dz)
{
if(zt==""||dz=="")
{alert('對不起!不能為空!');
return false;}
window.location="qq_bq.asp?cz=tj&dz="+dz+"&zt="+zt;}
function xg(zt,dz,id)
{if(zt==""||dz=="")
{alert('對不起!不能為空!');
return false;}
window.location="qq_bq.asp?cz=xg&dz="+dz+"&id="+id+"&zt="+zt;}
-->
</script>
<link rel="stylesheet" href="style.css" ="text/css">
<title>表情管理</title>
</head>
<%id=request.querystring("id")
dz= request.querystring("dz")
zt= request.querystring("zt")
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 pic where id="+id
conn.execute exec
conn.close
response.redirect "qq_bq.asp"
end if
if dz<>"" and cz="tj" then
exec="insert into pic (zt,dz) values ('" + zt + "''"+dz+"')"
conn.execute exec
conn.close
response.redirect "qq_bq.asp"
end if
if dz<>"" and cz="xg" then
dz=xrzh(dz)
exec="update pic set dz='"+dz+"',zt='" + zt + "' where id="+id
conn.execute exec
conn.close
response.redirect "qq_bq.asp"
end if
exec="select * from pic 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" width="5%">編號</td>
<td align="center">表情</td>
<td align="center">名稱</td>
<td align="center">地址</td>
<td align="center">處理</td>
</tr>
<%j=1
do while not rs.eof
dz = rs("dz")%>
<tr bgcolor="#E3E9F1" height="25">
<td align="center"><%=j%></td>
<td align=center><img border=0 src="<%=dz%>"></td>
<td align="center"><input type="text" name="zt<%=j%>" value="<%=rs("zt")%>"></td>
<td align="center"><input type="text" name="dz<%=j%>" value="<%=dz%>"></td>
<td align="center"><a href=# onClick="javascript:xg(zt<%=j%>.value,dz<%=j%>.value,'<%=rs("id")%>');">修改</a>
<a href="qq_bq.asp?id=<%=rs("id")%>&cz=sc" onClick="javascript:return confirm('確實(shí)要刪除該記錄嗎?');">刪除</a>
</td>
</tr>
<%j=j+1
rs.movenext
loop%>
<tr bgcolor="#CCD8E6">
<td align="center"><%=j%></td>
<td align="center" colspan="2"><input type="text" name="zt<%=j+1%>"></td>
<td align="center"><input type="text" name="dz<%=j+1%>"></td>
<td align="center" colspan="2"><a href=# onclick="javascript:jc(zt<%=j+1%>.value,dz<%=j+1%>.value);">添加</td>
</tr>
</table>
<%rs.close
conn.close
set conn=nothing%>
</body>
</htm>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -