usersms.asp
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:7k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <!--#include file="conn.asp"-->
  2. <!-- #include file="inc/const.asp" -->
  3. <%
  4. Response.Buffer = true
  5. dim tablebody
  6. dim boxName,smscount,smstype,readaction,turl
  7. if not founduser then
  8.    errmsg=errmsg+"<br>"+"<li>您没有<a href=login.asp target=_blank>登录</a>。"
  9. founderr=true
  10. end if
  11. stats="我的短信管理"
  12. call head()
  13. if founderr then
  14. call head_var("","")
  15. call txl_error()
  16. else
  17. call head_var("个人菜单","u_index.asp")
  18. %>
  19. <table width="<%=txl_body(0)%>" cellpadding="0" cellspacing="0" align="center" style="border:1px <%=txl_body(9)%> solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;">  
  20. <tr> 
  21. <td bgcolor=<%=txl_body(10)%> align="center" valign="top"><br>
  22. <table cellpaddin=3 cellspacing=1 class=tableborder1 width=<%=txl_body(19)%> align=center>
  23. <tr>
  24. <th width=14% height=25 id=tabletitlelink><a href=u_index.asp>个人菜单首页</a></th>
  25. <th width=14% id=tabletitlelink><a href=u_modifymy.asp>基本资料修改</a></th>
  26. <th width=14% id=tabletitlelink><a href=u_modifypsw.asp>用户密码修改</a></th>
  27. <th width=14% id=tabletitlelink><a href=u_modifyadd.asp>联系资料修改</a></th>
  28. <th width=14% id=tabletitlelink><a href=u_myskin.asp>选择界面风格</a></th>
  29. <th width=14% id=tabletitlelink><a href=usersms.asp>我的短信管理</a></th>
  30. <th width=14% id=tabletitlelink><a href=d_index.asp>我的日记管理</a></th>
  31. </tr>
  32. </table>
  33. <%
  34. call main()
  35. response.write " <br></td></tr></table>"
  36. end if
  37. call foot()
  38. sub main()
  39. smscount=1
  40. select case request("action")
  41. case "inbox"
  42. boxName="收件箱"
  43. smstype="inbox"
  44. readaction="read"
  45. turl="readsms"
  46. sql="select * from message where incept='"&trim(membername)&"' and issend=1 and delR=0 order by flag,sendtime desc"
  47. call smsbox()
  48. case "outbox"
  49. boxName="草稿箱"
  50. smstype="outbox"
  51. readaction="edit"
  52. turl="sms"
  53. sql="select * from message where sender='"&trim(membername)&"' and issend=0 and delS=0 order by sendtime desc"
  54. call smsbox()
  55. case "issend"
  56. boxName="已发送的消息"
  57. smstype="issend"
  58. readaction="outread"
  59. turl="readsms"
  60. sql="select * from message where sender='"&trim(membername)&"' and issend=1 and delS=0 order by sendtime desc"
  61. call smsbox()
  62. case "recycle"
  63. boxName="垃圾箱"
  64. smstype="recycle"
  65. readaction="read"
  66. turl="readsms"
  67. sql="select * from message where ((sender='"&trim(membername)&"' and delS=1) or (incept='"&trim(membername)&"' and delR=1)) and not delS=2 order by sendtime desc"
  68. call smsbox()
  69. case else
  70. boxName="收件箱"
  71. smstype="inbox"
  72. readaction="read"
  73. turl="readsms"
  74. sql="select * from message where incept='"&trim(membername)&"' and issend=1 and delR=0 order by flag,sendtime desc"
  75. call smsbox()
  76. end select
  77. end sub
  78. sub smsbox()
  79. dim newstyle
  80. response.write "<TABLE cellpadding=6 cellspacing=1 align=center class=tableborder1 width="&txl_body(19)&"><TBODY>"&_
  81. "<TR>"&_
  82. "<TD align=center class=tablebody1><a href=usersms.asp?action=inbox><img src="&txl_info(7)&"m_inbox.gif border=0 alt=收件箱></a> &nbsp; <a href=usersms.asp?action=outbox><img src="&txl_info(7)&"M_outbox.gif border=0 alt=发件箱></a> &nbsp; <a href=usersms.asp?action=issend><img src="&txl_info(7)&"M_issend.gif border=0 alt=已发送邮件></a>&nbsp; <a href=usersms.asp?action=recycle><img src="&txl_info(7)&"M_recycle.gif border=0 alt=废件箱></a>&nbsp; <a href=c_index.asp><img src="&txl_info(7)&"M_address.gif border=0 alt=地址簿></a>&nbsp;<a href=JavaScript:openScript('messanger.asp?action=new',500,400)><img src="&txl_info(7)&"m_write.gif border=0 alt=发送消息></a>"&_
  83.                            "</td></tr></TBODY></TABLE>"
  84. %>
  85. <form action="messanger.asp" method=post name=inbox>
  86. <table cellpadding=3 cellspacing=1 align=center class=tableborder1 width=<%=txl_body(19)%>>
  87. <tr>
  88. <th valign=middle width=30 height=25>已读</th>
  89. <th valign=middle width=100>
  90. <%if smstype="inbox" or smstype="recycle" then response.write "发件人" else response.write "收件人"%>
  91. </th>
  92. <th valign=middle width=300>主题</th>
  93. <th valign=middle width=150>日期</th>
  94. <th valign=middle width=50>大小</th>
  95. <th valign=middle width=30>操作</th>
  96. </tr>
  97. <%
  98. set rs=server.createobject("adodb.recordset")
  99. rs.open sql,conn,1,1
  100. if rs.eof and rs.bof then
  101. %>
  102. <tr>
  103. <td class=tablebody1 align=center valign=middle colspan=6 height=25>您的<%=boxname%>中没有任何内容。</td>
  104. </tr>
  105. <%else%>
  106. <%do while not rs.eof%>
  107. <%
  108. if rs("flag")=0 then
  109. tablebody="tablebody2"
  110. newstyle="font-weight:bold"
  111. else
  112. tablebody="tablebody1"
  113. newstyle="font-weight:normal"
  114. end if
  115. %>
  116. <tr>
  117. <td height=25 class=<%=tablebody%> align=center valign=middle>
  118. <%
  119. select case smstype
  120. case "inbox"
  121. if rs("flag")=0 then
  122. response.write "<img src="""&txl_info(7)&"m_news.gif"">"
  123. else
  124. response.write "<img src="""&txl_info(7)&"m_olds.gif"">"
  125. end if
  126. case "outbox"
  127. response.write "<img src="""&txl_info(7)&"m_issend_2.gif"">"
  128. case "issend"
  129. response.write "<img src="""&txl_info(7)&"m_issend_1.gif"">"
  130. case "recycle"
  131. if rs("flag")=0 then
  132. response.write "<img src="""&txl_info(7)&"m_news.gif"">"
  133. else
  134. response.write "<img src="""&txl_info(7)&"m_olds.gif"">"
  135. end if
  136. end select
  137. %>
  138. </td>
  139. <td class=<%=tablebody%> align=center valign=middle style="<%=newstyle%>">
  140. <%if smstype="inbox" or smstype="recycle" then%>
  141. <a href="userinfo.asp?name=<%=htmlencode(rs("sender"))%>" target=_blank><%=htmlencode(rs("sender"))%></a>
  142. <%else%>
  143. <a href="userinfo.asp?name=<%=htmlencode(rs("incept"))%>" target=_blank><%=htmlencode(rs("incept"))%></a>
  144. <%end if%>
  145. </td>
  146. <td class=<%=tablebody%> align=left style="<%=newstyle%>"><a href="JavaScript:openScript('messanger.asp?action=<%=readaction%>&id=<%=rs("id")%>&sender=<%=rs("sender")%>',500,400)"><%=htmlencode(rs("title"))%></a> </td>
  147. <td class=<%=tablebody%> style="<%=newstyle%>"><%=rs("sendtime")%></td>
  148. <td class=<%=tablebody%> style="<%=newstyle%>"><%=len(rs("content"))%>Byte</td>
  149. <td align=center valign=middle width=30 class=<%=tablebody%>><input type=checkbox name=id value=<%=rs("id")%>></td>
  150. </tr>
  151. <%
  152. rs.movenext
  153. loop
  154. end if
  155. rs.close
  156. set rs=nothing
  157. %>
  158. <tr> 
  159. <td align=right valign=middle colspan=6 class=tablebody2>节省每一分空间,请及时删除无用信息&nbsp;<input type=checkbox name=chkall value=on onclick="CheckAll(this.form)">选中所有显示记录&nbsp;<input type=submit name=action onclick="{if(confirm('确定删除选定的纪录吗?')){this.document.inbox.submit();return true;}return false;}" value="删除<%=replace(boxname,"箱","")%>">&nbsp;<input type=submit name=action onclick="{if(confirm('确定清除<%=boxname%>所有的纪录吗?')){this.document.inbox.submit();return true;}return false;}" value="清空<%=boxname%>"></td>
  160. </tr>
  161. </table>
  162. </form>
  163. <%
  164. end sub
  165. %>