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

📄 webmsg_view.asp

📁 视频点播系统
💻 ASP
字号:
<!--#include file="chklogin.asp"-->
<%

call myobj.chkrq()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看站内短信</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	color: #0000FF;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<%
action_e=request.Querystring("action")
Select Case action_e
	Case ""
	  Call main()
	Case "msg_del"
	  Call msg_del()
end select
%>
<%
sub main
if request.Querystring("id")="" then
	response.write"<script language=javascript>alert('ID值无法获取');window.close();</Script>"
	response.end
end if
if myobj.ChkNum(request.Querystring("id"))=false then
	response.write"<script language=javascript>alert('ID值类型错误');window.close();</Script>"
	response.end
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from webmessage where id="&request.QueryString("id")&"",conn,1,1
if rs.eof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.write"<script>alert('该条短信并不存在');window.close();</Script>"
	response.end
else
	var_id=rs("id")
	var_msg_title=rs("msg_title")
	var_msg_body=rs("msg_body")
	var_msg_time=rs("msg_time")
	var_from_userid=rs("from_userid")
	var_to_userid=rs("to_userid")
	var_is_read=rs("is_read")
end if
rs.close

if var_to_userid="@admin@" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from webmessage where id="&request.QueryString("id")&"",conn,1,3
rs("is_read")=true
rs.update
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
%>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="500" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">查看<%if var_from_userid="@admin@" then%>发送的<%else%>接收的<%end if%>站内短信</strong></td>
  </tr>
</table>

<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7"><table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
<%if var_from_userid<>"@admin@" then%>
      <tr>
        <td height="25">发送用户:<%if var_from_userid="@admin@" then%>管理员<%else%><%=var_from_userid%><%end if%></td>
      </tr>
<%end if%>
<%if var_from_userid="@admin@" then%>
      <tr>
        <td height="25">接收用户:<%if var_to_userid="@admin@" then%>管理员<%else%><%=var_to_userid%><%end if%></td>        </tr>
      <tr>
<%end if%>
        <td height="25">是否已读:<%if var_is_read=true then%>用户已查阅该条短信<%else%>用户善未查阅该条短信<%end if%></td>
        </tr>
      <tr>
        <td height="25">发送时间:<%=var_msg_time%></td>
        </tr>
      <tr>
        <td height="30" align="center"><table width="400" height="25" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
          <tr>
            <td align="center" bgcolor="#FFFFFF"><%=var_msg_title%> </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td>
		<table width="400" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
            <tr>
              <td bgcolor="#FFFFFF"><br>                <%=myobj.formatbody(var_msg_body)%><br>
                <br>
			  </td>
            </tr>
          </table>
		  </td>
      </tr>
      <tr align="center">
        <td height="50"><%if var_to_userid="@admin@" then%><a href="webmsg_send.asp?userid=<%=var_from_userid%>">回复短信</a>  <%end if%><a href="<%=filename%>?action=msg_del&id=<%=var_id%>">删除短信</a>  <a href="vbscript:window.close()">关闭窗口</a></td>
      </tr>
    </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<%
end sub
%>
<%
sub msg_del()
conn.execute"delete from webmessage where id="&request.Querystring("id")&""
response.write"<script language=javascript>alert('短信删除成功');window.close();</Script>"
response.end
end sub
%>
</body>
</html>

⌨️ 快捷键说明

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