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

📄 delnews2.asp

📁 为了开发出适用于中小型企业的通用人才管理软件。对于已备电脑等硬件设备而无人才管理软件的企业更能带来更高的收益。此人才管理软件主要应用了DELPHI 7和SQL。解决企业管理中的员工管理
💻 ASP
字号:
<%@ Language=VBScript %>
<% If Session(strCookieURL & "www.3rom.com") = "1369852475213" and Session("count")<10 Then %> 
<!--#INCLUDE FILE="inc_Conn.asp" -->
<%
Dim strActive,strNewsID,strSql,strAffirm
strActive=Request.QueryString("active")
strNewsID=Request.QueryString("NewsID")
strAffirm=Request.QueryString("affirm")

If strNewsID="" then strNewsID=0
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="VI60_defaultClientScript" content="JavaScript">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>DelNews2</title>
</head>

<body bgcolor="#D6D3CE">
<% If strActive="Del" And strAffirm<>"Yes" Then %>
<%
strSql="Select * from News where NewsID="&strNewsID
set rs1=MyCon.execute(strSql)
If rs1.eof Then 
Call MyErr()
End If
%>
<div align="center">
<% Do while not rs1.eof %>
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%" colspan="3">您确信要删除<a href="../ReadNews.asp?NewsID=<%=rs1("NewsID")%>"><%=rs1("News_Title")%></a>吗?</td>
    </tr>
    <tr>
      <td width="33%"> </td>
      <td width="33%" align="center" nowrap><a href="DelNews2.asp?active=Del&affirm=Yes&NewsID=<%=rs1("NewsID")%>">是</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <a href="EditNews.asp">否</a></td>
      <td width="34%"> </td>
    </tr>
    <tr>
      <td width="100%" colspan="3">注意:删除后不可恢复</td>
    </tr>
  </table>
  </center>
<% rs1.movenext %>
<% Loop %>
</div>
<%
 rs1.close
 set rs1=nothing
 %>
<%ElseIf strActive="Del" And strAffirm="Yes" Then%>
<% 
strSql="Delete from News where NewsID=" & strNewsID
MyCon.execute(strSql)

If MyCon.errors.count=0 Then 
Response.redirect "index.asp"
Else
Response.write "从数据库删除内容时出错,请与管理员联系."
End If 
%>
<% End If %>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" width="755">
    <tr>
      <td width="100%" align="center"><a href="index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>
</body>

</html>
<%
MyCon.close
set MyCon=nothing
%>
<%Sub MyErr()%>
<div align="center">
  <center>
  <table border="1" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%">警告</td>
    </tr>
    <tr>
      <td width="100%" align="center">你要删除的新闻不存在</td>
    </tr>
    <tr>
      <td width="100%" align="center"><a href="index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>
<%End Sub%>
<% 
Else
Response.redirect "Login.asp"
End If
%>

⌨️ 快捷键说明

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