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

📄 qydy.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><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 "save_data"
          Call save_data()
end select
%>

</td>
</tr>
</talbe>
<%sub main()%>
<table border="0" cellspacing="2" width="572" 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="100" align="center"><strong>类别标识</strong></td>
          <td bgcolor=#ffffcc width="200" align="center"><strong>操作</strong></td>
        </tr>
<form name="form1" method=post action="qydy.asp?action=save_data" target=_self>
        <tr>
          <td bgcolor=#ccccff width="30"  height="28"><input class=input1 type=text size=5 id="czid" name="czid" readonly></td>
          <td bgcolor=#ccccff width="240"><input class=input1 type=text size=38 name="cotype"></td>
          <td bgcolor=#ccccff width="100"><input class=input1 type=text size=14 name="lbid"></td>
          <td bgcolor=#ccccff width="200" align=center><input class=button9 type=submit value="Addnew" name="dz">&nbsp;<input  class=button9 type=submit value="Delete" name="dz">&nbsp;<input  class=button9 type=submit value="Edit" name="dz"></td>
        </tr>
<%
SET rs=server.createobject("adodb.recordset")
sql="select * from qylb 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;"><%=rs("cotype")%></div></td>
          <td bgcolor=#ffffff width="100"><div style="margin-left:5px;"><%=rs("lbid")%></div></td>
          <td bgcolor=#ffffff width="200" align="center">
<input type=radio name="dd" onclick="czid.value='<%=rs("id")%>';cotype.value='<%=rs("cotype")%>';lbid.value='<%=rs("lbid")%>'"></td>
        </tr>
<%
rs.movenext
wend
end if
%>
</form>
</table>

<%end sub%>

<%sub save_data()%>
<%
czid=request.form("czid")

if czid<>"" then

if request("dz")="Delete" then
conn.execute "delete from qylb where id="&czid
end if

if request("dz")="Edit" then
set rs=server.createobject("adodb.recordset")
sql="select * from qylb where id="&czid
rs.open sql,conn,1,3
if request("cotype")<>"" then
rs("cotype")=request("cotype")
end if
if request("lbid")<>"" then
rs("lbid")=request("lbid")
end if
rs.update
rs.close
set rs=nothing
end if

elseif request("cotype")<>"" and request("lbid")<>"" and request("dz")="Addnew" then

set rs=server.createobject("adodb.recordset")
sql="select * from qylb"
rs.open sql,conn,1,3
rs.addnew
rs("cotype")=request("cotype")
rs("lbid")=request("lbid")
rs.update
rs.close
set rs=nothing
end if
response.redirect "qydy.asp"
%>
<%end sub%>

</div>

</body>
</html>




⌨️ 快捷键说明

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