⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notice.asp

📁 C2C二手交易网SMRUC v2.0 全部实现了C2C电子商务功能。 特别适合高校、组织、社区实现自己的C2C电子商务。 C2C二手交易网SMRUC v2.0具有强大的用户自主发布和管理信息功能
💻 ASP
字号:
<%
if session("admin_name")="" then
    response.write "<script LANGUAGE='javascript'>alert('对不起,登陆超时!');</script>"
	response.end
end if
%>
<!--#include file="conn.asp"-->
<%
command=request.QueryString("command")
add=request.QueryString("add")
if command="delete" then
id=request.QueryString("id")

sql="delete from [notice] where notise_id="&id&""
conn.execute(sql)
message="删除成功!"

end if

if add="添加" then
notice_content=request.QueryString("content")


sql="insert into notice(notice_content,notice_date) values('"&notice_content&"','"&date()&"') "
conn.execute(sql)
message="添加成功!"

end if
%>

<html>
<head>
<link href="../css.css" rel=STYLESHEET type='text/css'>
<base target="_self">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>

<body>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from notice order by notise_id desc"
rs.open sql,conn,1,1
%>
<div align="center">
<font color="#FF0000"><%=message%></font>
  <table width="421" border="0" cellpadding="0" cellspacing="0"  bgcolor="#00FFFF">
    <tr bgcolor="#66CCFF"> 
      <td width="2">&nbsp;</td>
      <td width="263"><div align="center"><strong><font color="#000000">首页公告管理</font><font color="#FF0000">--只显示最新的一条公告</font></strong></div></td>
      <td width="82">&nbsp;</td>
      <td width="74">&nbsp;</td>
    </tr>
    <tr> 
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
    </tr>
	<%do while not rs.eof%>
    <tr> 
       <td>&nbsp;</td>
       <td><%=rs("notice_content")%></td>
       <td><%=rs("notice_date")%></td>
       <td><a href="notice.asp?command=delete&id=<%=rs("notise_id")%>">删除</a></td>
    </tr>
    <tr> 
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
    </tr>
    <%rs.movenext
	loop
	rs.close
	%>
    <tr bgcolor="#66CCFF"> 
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
<form name="form1" method="get" action="notice.asp"> 
<tr> 
     <td>&nbsp;</td>
        <td> <div align="center">
            <textarea name="content" cols="30" rows="8" id="content"></textarea>
          </div></td>
        <td>*建议100字符以内</td>
     <td><input type="submit" name="add" value="添加"></td>
    </tr>
    <tr> 
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
    </tr>
 </form>
 </table>
</div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -