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

📄 ggmanage.asp

📁 关于网络渗透技术的详细讲解
💻 ASP
字号:
<%
  if session("username")="" then
  response.redirect "index.asp"
  else
	if session("flag")<>1 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="../images/style.css">
<style type="text/css">
<!--
@import url("wsbs.css");
-->
</style>
</head>

<body bgcolor=#ccccff>

<!--#include file="conn.asp"-->
<div align="center"><center>
<br>
<table border="0" cellspacing="2" width="600" cellpadding="0">
<tr>
<td>
<%
action_e=request.QueryString("action")
Select Case action_e
	Case ""
	  Call main()
        Case "addnew"
          call addnew()
        case "del"
          call del()
        case "edit"
          call edit()
end select
%>

</td>
</tr>
</talbe>
<%sub main()%>
<form name="form1" action="?action=addnew" method=post>
标题:<input type=text name="title" size=50 class=input1 maxlenth=50><br>
内容:<textarea rows="5" name="S1" cols="50" style="font-size:12px;" name="content"></textarea><br>
   <input class=button9 type=submit value="新增">&nbsp;<input class=button9 type=reset value="复位">
</form>
<table border="0" cellspacing="2" width="472" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ccccff">
        <tr>
          <td bgcolor=#ffffcc width="32"  height="28" align="center"><strong>ID</strong></td>
          <td bgcolor=#ffffcc width="240" align="center"><strong>公告通知标题</strong></td>
          <td bgcolor=#ffffcc width="200" align="center"><strong>操作</strong></td>
        </tr>
<%
SET rs=server.createobject("adodb.recordset")
sql="select * from gonggao order by id desc"
rs.open sql,conn,1,1
if not rs.eof then
while not rs.eof
%>

        <tr>
          <td bgcolor=#ffffff width="30"  height="28" align="center"><%=rs("id")%></td>
          <td bgcolor=#ffffff width="240"><div style="margin-left:5px;"><a href=showgg.asp?id=<%=rs("id")%>><%=rs("title")%></a></div></td>
          <td bgcolor=#ffffff width="200" align="center"><a href="?action=del&delid=<%=rs("id")%>">删除</a>&nbsp;</td>
        </tr>
<%
rs.movenext
wend
end if
%>
</table>

<%end sub%>
<%sub del()%>
<%end sub%>
<%sub edit()%>
<%end sub%>
<%sub addnew()%>
<%
SET rs=server.createobject("adodb.recordset")
sql="select * from gonggao"
rs.open sql,conn,1,3
'if request("title")<>"" and request("content")<>"" then
rs.addnew
rs("title")=request("title")
rs("content")=request("content")
rs.update
'end if
rs.close
set rs=nothing
response.redirect "ggmanage.asp"
%>
<%end sub%>
</div>

</body>
</html>




⌨️ 快捷键说明

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