📄 news_type.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<script language="javascript">
<!--
function jc(lb)
{
if(lb=="")
{alert('对不起!信息不能为空!');
return false;}
window.location="news_type.asp?cz=tj&lb="+lb;}
function xg(gn,id)
{if(gn=="")
{alert('对不起!不能为空!');
return false;}
window.location="news_type.asp?cz=xg&lb="+gn+"&id="+id;}
-->
</script>
<link rel="stylesheet" href="style.css" ="text/css">
<title>分类管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%id=request.querystring("id")
lb= request.querystring("lb")
cz=request.querystring("cz")%>
<body>
<div align="left">
<table width="778" border="1" cellspacing="0" cellpadding="0" bgcolor="#7894AF" align="center">
<tr bgcolor="#eeeeee">
<td height="25" ><%=why%> 欢迎来到 <%=bb%>!<%
RESPONSE.Write "CM提醒你---你来访的时间是: " & YEAR(date()) & "年" & MONTH(date()) & "月" & DAY(date()) & "日"
%> <a href="news_admin.asp">返 回</a></td>
</tr>
</table>
<%if id<>"" and cz="sc" then
exec="delete * from type where id="+id
conn.execute exec
conn.close
response.redirect "news_type.asp"
end if
if lb<>"" and cz="tj" then
lb=xrzh(lb)
exec="insert into type (lx) values ('"+lb+"')"
conn.execute exec
conn.close
response.redirect "news_type.asp"
end if
if lb<>"" and cz="xg" then
lb=xrzh(lb)
exec="update type set lx='"+lb+"' where id="+id
conn.execute exec
conn.close
response.redirect "news_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="400" 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("lx")%>"></td>
<td align="center">
<a href=# onClick="javascript:xg(lb<%=j%>.value,'<%=rs("id")%>');">修改</a>
|
<a href="news_type.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"><input ="text" name="lb<%=j+1%>"></td>
<td align="center" colspan="2"><a href=# onclick="javascript:jc(lb<%=j+1%>.value);">添加</td>
</tr>
</table>
<p>
<%rs.close
conn.close
set conn=nothing%>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center">Copyright 2006-2008 http://cm86.vicp.net All Rights Reserved </p>
<p align="center"><font color="#E3E9F1" size="6" face="华文行楷">CM 新 闻 发 布 系 统 V 1。0</font> </p>
<p align="center"> </p>
</div>
</body>
</htm>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -