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

📄 del_diary.asp

📁 日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。 2、日记加密:当日记添加时
💻 ASP
字号:
<!--#include file="top.asp"-->

<% if request("action")="del" then
   call del()
   else
   call main()
   end if

sub del()
   id=request("id")

   set rs=server.createobject("ADODB.recordset") 
       rs.Open "SELECT * FROM diary Where id="&id,conn,1,3 

   if  not rs("userid")=session("userid") then 
%>
<script language=vbscript>
  MsgBox "呵呵~~~!想干吗呢?登陆超时请重新登陆,或者此则日记不是你的吧!"
  location.href = "javascript:history.back()"
</script>
<%
   else
   rs.close
   
   str="delete from diary where id="&id
   conn.execute(str)
   str="delete from say where diaryid="&id
   conn.execute(str)
%>
<script language=vbscript>
  MsgBox "你已经成功删除该则日记,请点击返回!"
  location.href = "diary.asp?user=<%=session("username")%>"
</script>
<%
   end if
end sub

sub main()
%>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top bgColor=#ffffff height=16>
      <TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=609 height=18 align=center 
            bgColor=#999999 border=0>
              <TBODY>
              <TR>
                <TD>
                  <DIV align=left></DIV></TD></TR></TBODY></TABLE>
</TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD vAlign=top bgColor=#ffffff>
      <FORM action=del_diary.asp?action=del method=post>
      <TABLE cellSpacing=0 cellPadding=2 width="96%" align=center border=0>
        <TBODY>
        <TR>
          <TD width=13 clasee="td">&nbsp;</TD>
          <TD width=603>&nbsp;</TD></TR>
        <TR>
          <TD width=13 clasee="td">&nbsp;</TD>
          <TD width=603>&nbsp;</TD></TR>
        <TR>
          <TD width=13 clasee="td">
            <DIV align=right></DIV></TD>
          <TD width=603>
            <DIV align=center><FONT color=#993300><INPUT type=hidden value=<%=request("id")%>
            name=id> 您确实要删除此篇日记吗?</FONT></DIV></TD></TR>
        <TR>
          <TD colSpan=2>
            <DIV align=center><INPUT type=image height=21 src="images/tijiao.gif" width=74 border=0>
               <A href="#" onclick=history.back()><IMG 
            height=21 src="images/fanhui.gif" width=74 border=0></A></DIV></TD></TR>
        <TR>
          <TD colSpan=2>&nbsp;</TD></TR>
        <TR>
          <TD colSpan=2>&nbsp;</TD></TR></TBODY></TABLE></FORM></TD></TR>
  <TR>
    <TD bgColor=#ffffff height=16>
      <TABLE cellSpacing=0 cellPadding=3 width=609 align=center bgColor=#9c9a9d 
      border=0>
        <TBODY>
<!--#include file="foot.asp"-->
</TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD height=2><IMG height=8 src="images/top01.gif" 
        width=617></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
        </BODY></HTML>
<%end sub%>

⌨️ 快捷键说明

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