affiche.asp
资源名称:1.rar [点击查看]
上传用户:ziqing_518
上传日期:2022-08-09
资源大小:446k
文件大小:10k
源码类别:

多媒体编程

开发平台:

ASP/ASPX

  1. <!--#include file="db/user.asp" -->
  2. <!--#include file="config.asp" -->
  3. <!--#include file="ubb.asp" -->
  4. <!--#include file="md5.asp" -->
  5. <!--#include file="function.asp" -->
  6. <!--#include file="top.asp" -->
  7. <!--#include file="admin/js.asp" -->
  8. <%
  9. if request.QueryString("post")<>"" then
  10. if request.cookies("nicedown")("admin")<>"" then
  11. set rs=conn.execute("select * from admin where admin='"& request.cookies("nicedown")("admin") &"'")
  12. strsQx=rs("qx")
  13. set rs=conn.execute("select * from config where id="&int(strsQx))
  14. if rs("boolAff")=False then
  15. response.write("<table width=""40%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"" bgcolor=""#000000""><tr><td align=""center"" bgcolor=""#B3D464"">对不起你没有权限进行操作<br>2秒钟后返回</td></tr></table>"&_
  16. "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
  17. response.end
  18. end if
  19. select case request.QueryString("post")
  20. case "del"
  21. sql="delete from affiche where id="&request.QueryString("id")
  22. conn.execute sql
  23. response.write("<table width=""40%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"" bgcolor=""#000000""><tr><td align=""center"" bgcolor=""#B3D464"">您的操作已经完成<br>2秒钟后返回</td></tr></table>"&_
  24. "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
  25. response.end
  26. case else
  27. if request.QueryString("save")="ready" then
  28. if request.QueryString("id")<>"" then
  29. sql="select affiche.title,affiche.show from affiche where id="&request.QueryString("id")
  30. rs=conn.execute(sql)
  31. strRtitle=rs("title")
  32. strRshow=rs("show")
  33. strSumber="修改公告"
  34. strForm="affiche.asp?id="&request.QueryString("id")&"&post=edit&save=ok"
  35. else
  36. strRtitle=""
  37. strRshow=""
  38. strSumber="添加公告"
  39. strForm="affiche.asp?post=add&save=ok"
  40. end if%>
  41. <table width="90%" border="0" cellspacing="0" cellpadding="0">
  42. <form name="frmAnnounce" method="post" action="<%=strForm%>">
  43.   <tr> 
  44.     <td width="232"><img src="images/a_01.gif" width="232" height="40"></td>
  45.     <td width="322" valign="baseline" background="images/a-02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  46.         <tr>
  47.           <td align="center" class="shadow1">&nbsp;</td>
  48.         </tr>
  49.       </table></td>
  50.     <td width="232"><img src="images/a_02.gif" width="231" height="40"></td>
  51.   </tr>
  52.   <tr> 
  53.     <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  54.           <tr> 
  55.             <td width="20" rowspan="3" background="images/a04.gif">&nbsp;</td>
  56.             <td width="200" align="center" bgcolor="#B3D464">标题: </td>
  57.             <td width="545" bgcolor="#B3D464">
  58. <input name="title" type="text" size="62" value="<%=strRtitle%>"></td>
  59.             <td width="22" rowspan="3" background="images/a8.gif">&nbsp;</td>
  60.           </tr>
  61.           <tr> 
  62.             <td width="200" align="center" bgcolor="#B3D464">内容: </td>
  63.             <td width="545" bgcolor="#B3D464">
  64. <img border="0" onclick=bold() src="./images/btg/bold.gif" alt="粗体" width="23" height="22">
  65. <img border="0" onclick=italicize() src="./images/btg/italicize.gif" alt="斜体" width="23" height="22">
  66. <img border="0" onclick=underline() src="./images/btg/underline.gif" alt="下划线" width="23" height="22">
  67. <img border="0" onclick=showcode() src="./images/btg/code.gif" alt="插入代码" width="23" height="22">
  68. <img border="0" onclick=quote() src="./images/btg/quote.gif" alt="引用" width="23" height="22">
  69. <img border="0" onclick=setfly() src="./images/btg/fly.gif" alt="飞行字" width="23" height="22">
  70. <img border="0" onclick=glow() src="./images/btg/glow.gif" alt="发光字" width="23" height="22">
  71. <img border="0" onclick=move() src="./images/btg/move.gif" alt="移动字" width="23" height="22">
  72. <img border="0" onclick=shadow() src="./images/btg/shadow.gif" alt="阴影字" width="23" height="22">
  73. <img border="0" onclick=list() src="./images/btg/list.gif" alt="列表" width="23" height="22">
  74. <img border="0" onclick=center() src="./images/btg/center.gif" alt="居中" width="23" height="22">
  75. <br>
  76. <img border="0" onclick=showsize() src="./images/btg/font.gif" alt="改变字体大小" width="23" height="22">
  77. <img border="0" onclick=hyperlink() src="./images/btg/url.gif" alt="插入连接" width="23" height="22">
  78. <img border="0" onclick=image() src="./images/btg/image.gif" alt="插入图片" width="23" height="22">
  79. <img border="0" onclick=flash() src="./images/btg/swf.gif" alt="插入FLASH" width="23" height="22">
  80. <img border="0" onclick=email() src="./images/btg/email.gif" alt="插入E-mail" width="23" height="22">
  81. <img border="0" onclick=showface() src="./images/btg/smilie.gif" alt="心情图标" width="23" height="22">
  82. <img border="0" onclick=mp() src="./images/btg/media.gif" alt="Media Player视频文件" width="23" height="22">
  83. <img border="0" onclick=rm() src="./images/btg/real.gif" alt="realplay视频文件" width="23" height="22">
  84. <img border="0" onclick=qt() src="./images/btg/qs.gif" alt="QuickTime视频文件" width="23" height="22">
  85. <img border="0" onclick=sk() src="./images/btg/shockwave.gif" alt="Shockwave文件" width="23" height="22">
  86. <img border="0" src="./images/btg/help.gif" alt="在线帮助" width="23" height="22"><br>
  87. <textarea name="brief" cols="60" rows="8"><%=strRshow%></textarea></td>
  88.           </tr>
  89.           <tr> 
  90.             <td colspan="2" align="center" bgcolor="#B3D464"><input type="submit" name="Submit" value="<%=strSumber%>">
  91.               <input type="reset" name="Submit2" value="重新填写"></td>
  92.           </tr>
  93.         </table></td>
  94.   </tr>
  95.   <tr> 
  96.     <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  97.         <tr>
  98.           <td width="20"><img src="images/index_019.gif" width="20" height="17"></td>
  99.           <td width="746" background="images/index_020.gif">&nbsp;</td>
  100.           <td width="20"><img src="images/a11.gif" width="20" height="17"></td>
  101.         </tr>
  102.       </table></td>
  103.   </tr>
  104.  </form>
  105. </table>
  106. <%
  107. response.end
  108. elseif request.QueryString("save")="ok" then
  109. if request.form("title")<>"" and request.form("brief")<>"" then
  110. strTitle=request.form("title")
  111. strShow=request.form("brief")
  112. dateTime=now()
  113. strAdmin=request.cookies("nicedown")("admin")
  114. else
  115. response.write("请填写完整公告内容再提交……")
  116. response.end
  117. end if
  118. if request.QueryString("post")="add" then
  119. sql="insert into affiche(title,show,times,name) values('"&strTitle&"','"&strShow&"','"&dateTime&"','"&strAdmin&"')"
  120. else
  121. strId=request.QueryString("id")
  122. sql="update affiche set title='"&strTitle&"',show='"&strShow&"',times='"&dateTime&"',name='"&strAdmin&"' where id="&strId
  123. end if
  124. conn.execute sql
  125. response.write("<table width=""40%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"" bgcolor=""#000000""><tr><td align=""center"" bgcolor=""#B3D464"">您的操作已经完成<br>2秒钟后返回</td></tr></table>"&_
  126. "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
  127. response.end
  128. end if
  129. end select
  130. end if
  131. end if
  132. Set rs4 = Server.CreateObject("ADODB.Recordset")
  133. sql4="select * from affiche order by times desc"
  134. rs4.open sql4,conn,1,1
  135. if rs4.eof then
  136. boolAfor=True
  137. numAfor=1
  138. else
  139. boolAfor=False
  140. numAfor=rs4.recordcount
  141. end if
  142. for i= 1 to numAfor
  143. if boolAfor=True then
  144. strAtitle="还没有公告"
  145. strAshow="请进管理区来发布一个公告(必须是管理员)。<BR>当你发布一次公告后,本公告就会自动消失,无需你手动删除!"
  146. dateAtime=now()
  147. strAname="本站的默认公告"
  148. else
  149. strAid=rs4("id")
  150. strAtitle=rs4("title")
  151. if boolUbb_1=True then
  152. strAshow=UBBCode(rs4("show"))
  153. else
  154. strAshow=rs4("show")
  155. end if
  156. dateAtime=rs4("times")
  157. strAname=rs4("name")
  158. end if
  159. %>
  160. <table width="90%" border="0" cellspacing="0" cellpadding="0">
  161.   <tr> 
  162.     <td width="232"><img src="images/a_01.gif" width="232" height="40"></td>
  163.     <td width="322" valign="baseline" background="images/a-02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  164.         <tr>
  165.           <td align="center" class="shadow1"><strong><%=strAtitle%></strong></td>
  166.         </tr>
  167.       </table></td>
  168.     <td width="232"><img src="images/a_02.gif" width="231" height="40"></td>
  169.   </tr>
  170.   <tr> 
  171.     <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  172.         <tr> 
  173.           <td width="20" rowspan="5" background="images/a04.gif">&nbsp;</td>
  174.           <td colspan="2" bgcolor="#B3D464"><hr width="90%" size="1" noshade></td>
  175.           <td width="20" rowspan="5" background="images/a8.gif">&nbsp;</td>
  176.         </tr>
  177.         <tr> 
  178.           <td colspan="2" bgcolor="#B3D464">&nbsp;</td>
  179.         </tr>
  180.         <tr> 
  181.           <td colspan="2" bgcolor="#B3D464"><blockquote><%=strAshow%></blockquote></td>
  182.         </tr>
  183.         <tr> 
  184.           <td colspan="2" bgcolor="#B3D464"><hr width="90%" size="1" noshade></td>
  185.         </tr>
  186.         <tr> 
  187.           <td width="450" align="left" bgcolor="#B3D464"> <blockquote> 
  188.               <p><strong>发布人</strong>:<%=strAname%>&nbsp;<%
  189. if request.cookies("nicedown")("admin")<>"" then
  190. set rs=conn.execute("select * from admin where admin='"& request.cookies("nicedown")("admin") &"'")
  191. strsQx=rs("qx")
  192. set rs=conn.execute("select * from config where id="&int(strsQx))
  193. if rs("boolAff")=True then
  194. response.write("<a href=affiche.asp?post=add&save=ready><img border='0' src='images/a_add.gif' width='52' height='16'></a>"& vbCRLF & _ 
  195. "<a href='affiche.asp?id="&strAid&"&post=del' onclick=""{if(confirm('您确定执行的操作吗?')){return true;}return false;}""><img border='0' src='images/a_delete.gif' width='52' height='16'></a>"& vbCRLF & _ 
  196. "<a href='affiche.asp?id="&strAid&"&post=edit&save=ready'><img border='0' src='images/a_edit.gif' width='52' height='16'></a>")
  197. end if
  198. end if%><br>
  199.               </p>
  200.             </blockquote></td>
  201.           <td width="278" align="right" bgcolor="#B3D464"><blockquote> 
  202.               <p><strong>发布时间</strong>:<%=dateAtime%></p>
  203.             </blockquote></td>
  204.         </tr>
  205.       </table></td>
  206.   </tr>
  207.   <tr> 
  208.     <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  209.         <tr>
  210.           <td width="20"><img src="images/index_019.gif" width="20" height="17"></td>
  211.           <td width="746" background="images/index_020.gif">&nbsp;</td>
  212.           <td width="20"><img src="images/a11.gif" width="20" height="17"></td>
  213.         </tr>
  214.       </table></td>
  215.   </tr>
  216. </table>
  217. <%
  218. if boolAfor=False then
  219. rs4.movenext
  220. end if
  221. if rs4.eof then
  222. exit for
  223. end if
  224. next
  225. rs4.close
  226. set rs4=nothing
  227. %>
  228. </body>
  229. </html>