📄 admin_key.asp
字号:
<!--#include file = include.asp-->
<!--#include file = admin_CheckMana.asp-->
<%
if EnoughPopedom("changgui")=1 then
Response.write"<script>alert(""[操作失败]\n\n你的权限不足!\n\n请与系统管理员联系获得足够的权限!"");location.href=""javascript:history.back()"";</script>"
Response.end
end if
call main()
%>
<%sub main()%>
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com http://bbs.foosun.net)
'=========================================================
if Request("action") = "add" then
call add()
elseif request("action") = "save" then
call save()
elseif request("action") = "del" then
call del()
elseif request("action") = "edit" then
call edit()
elseif request("action") = "saveedit" then
call saveedit()
else
call fromlist()
end if
%>
<%end sub%>
<%sub fromlist()%>
<table width="95%" cellspacing="1" cellpadding="0" bgcolor="#84BE7E" align="center">
<tr bgcolor=#cccccc>
<td bgcolor="#84BE7E"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
<tr>
<td height="26"> <div align="center">新闻关键字列表</div></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor=#ffffff>
<td height="31">【<a href=admin_key.asp?action=add><font color=#cc0000>增加关键字</font></a>】</td>
</tr>
<tr bgcolor=#eeeeee>
<td height="34" bgcolor="#F7FFF4">
<%Set RS = Server.CreateObject("ADODB.RecordSet")
sql = "select * from [keys] order by id DESC"
RS.Open sql, Conn, 1, 1
if rs.eof and rs.bof then
response.write("<center><font color=red>目前还没有新闻关键字!</font> 请<a href=?action=add>点击这里</a>添加")
else
do while not rs.EOF%>
<font color=red><%=rs("keywords")%></font> (<a href=admin_key.asp?action=edit&id=<%=rs("id")%>>修</a>|<a href=admin_key.asp?action=del&id=<%=rs("id")%> onClick="return Del()">删</a>)
<%
RS.MoveNext()
loop
end if
rs.close
set rs=nothing%>
<!--#include file = name.asp-->
</td>
</tr></table>
<%end sub%>
<%sub add()%>
<table width="95%" cellspacing="1" cellpadding="0" bgcolor="#84BE7E" align="center">
<form action="admin_key.asp?action=save" method=POST name=add>
<tr bgcolor=#cccccc>
<td bgcolor="#84BE7E"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
<tr>
<td height="26"> <div align="center">添加关键字</div></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor=#eeeeee>
<td height="34" bgcolor="#F7FFF4"><center> 名称:
<input name=keywords type=text id="keywords" size=25>
<input type="submit" name="Submit" value="确定"> <input type="Reset" name="Reset" value="重填">
<!--#include file = name.asp-->
</td>
</tr></form></table>
<%end sub%>
<%sub save()%>
<%if request("keywords")="" then%>
<script language=javascript>
alert( "错误:请输入关键字!" );
location.href = "javascript:history.back()"
</script>
<%else%>
<%
set rs = server.CreateObject ("adodb.recordset")
sql = "select * from [keys]"
rs.Open sql,conn,1,3
rs.AddNew
rs("keywords") = Request("keywords")
rs.Update
rs.Close
set rs=nothing
%>
<script language=javascript>
alert( "恭喜:新闻关键字添加成功" );
location.href = "admin_key.asp"
</script>
<%end if%>
<%end sub%>
<%sub del()
sql="delete from [keys] where id="&cstr(request("id"))
conn.execute(sql)
%>
<script language=javascript>
alert( "新闻来源删除成功" );
location.href = "admin_key.asp"
</script>
<%end sub%>
<%sub edit()%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from [keys] where id="&request("id")
rs.open sql,conn,1,1
%>
<table width="95%" cellspacing="1" cellpadding="0" bgcolor="#84BE7E" align="center">
<form action="admin_key.asp?action=saveedit&id=<%=rs("id")%>" method=POST name=edit>
<tr bgcolor=#cccccc>
<td bgcolor="#84BE7E">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
<tr>
<td height="26"> <div align="center">修改关键字</div></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor=#eeeeee>
<td height="40" bgcolor="#F7FFF4"><center> 关键字:
<input name=keywords type=text id="keywords" value=<%=rs("keywords")%> size=15>
<input type="submit" name="Submit" value="确定"> <input type="Reset" name="Reset" value="重填">
<!--#include file = name.asp-->
</td>
</tr></form></table>
<%end sub%>
<%sub saveedit()%>
<%if request("keywords")="" then%>
<script language=javascript>
alert( "错误:请输入关键字名称!" );
location.href = "javascript:history.back()"
</script>
<%else%>
<%sql="update [keys] set keywords='"&request("keywords")&"' where id="&cstr(request("id"))
conn.execute(sql)%>
<script language=javascript>
alert( "新闻关键字修改成功!" );
location.href = "admin_key.asp"
</script>
<%end if%>
<%end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -