📄 delmsg.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%if Session("MM_Username")="" then Response.Write "<script Language=Javascript>alert('您已空闲时间超过5分钟或尚未登陆。');location.href = 'javascript:close();';</script>"%>
<!--#include file="myzb.asp" -->
<%' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Delete Record: declare variables
if (CStr(Request("MM_delete")) = "form1" And CStr(Request("MM_recordId")) <> "") Then
MM_editConnection = MM_myzb_STRING
MM_editTable = "ms"
MM_editColumn = "jsr"
MM_recordId = "'" + Request.Form("MM_recordId") + "'"
MM_editRedirectUrl = "msgok.asp"
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete")) <> "" And CStr(Request("MM_recordId")) <> "") Then
' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_myzb_STRING
Recordset1.Source = "SELECT * FROM ms where jsr='"&Session("MM_Username")&"'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
if Recordset1.eof then
response.Write"<script Language=Javascript>alert('没有数据');location.href = 'javascript:history.go(-1)';</script>"
else
while not Recordset1.eof
response.write("")
Recordset1.movenext
wend
end if
Recordset1_numRows = 0
%>
<HTML>
<HEAD>
<TITLE>清空消息盒</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
.mm_botton{
border-top: #c4cccc 3px double;
border-right: #acb5b5 3px double;
border-bottom: #6f7777 3px double;
border-left: #acb5b5 3px double;
background: url(images/background_form_element.gif) #fefefe repeat-x;
font:12px tahoma;
padding-top:3px;
padding-bottom:3px;
padding-left:3px;
padding-right:5px;
text-decoration: none;
color:#666666;
}
.mm_botton:link{
color:#666666;
}
.mm_botton:hover{
border-top: #aedf9a 3px double;
border-right: #94da78 3px double;
border-bottom: #6ab94b 3px double;
border-left: #94da78 3px double;
text-decoration:none;
color:#999999;
}
<!--
body {
background-image: url(images/bg.gif);
}
body,td,th {
font-size: 12px;
}
a:link {
text-decoration: none;
color: #0000FF;
}
a:visited {
text-decoration: none;
color: #0066FF;
}
a:hover {
text-decoration: underline;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
.style3 {color: #0000FF}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (未标题-1) -->
<TABLE WIDTH=418 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<br><TD COLSPAN=2><div align="center" class="style3">|<a href="msg.asp">::我的消息盒::</a>|::<a href="fmsg.asp">发送消息::</a>|::<a href="delmsg.asp">清空消息盒::</a>|</div></TD>
</TR>
<TR>
<TD width="48" align="center" valign="top"><img src="images/sc.gif" alt="我的消息盒" width="48" height="48"></TD>
<TD width="370" align="center" valign="top"><form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1">
<p> </p>
<p align="center">
<input name="Submit" type="submit" class="mm_botton" value="删除我的全部消息">
</p>
<input name="jsr" type="hidden" id="jsr" value="<%=Session("MM_Username")%>">
<input type="hidden" name="MM_delete" value="form1">
<input type="hidden" name="MM_recordId" value="<%=Session("MM_Username")%>">
</form></TD>
</TR>
</TABLE>
</BODY>
</HTML>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -