affiche.asp
资源名称:1.rar [点击查看]
上传用户:ziqing_518
上传日期:2022-08-09
资源大小:446k
文件大小:10k
源码类别:
多媒体编程
开发平台:
ASP/ASPX
- <!--#include file="db/user.asp" -->
- <!--#include file="config.asp" -->
- <!--#include file="ubb.asp" -->
- <!--#include file="md5.asp" -->
- <!--#include file="function.asp" -->
- <!--#include file="top.asp" -->
- <!--#include file="admin/js.asp" -->
- <%
- if request.QueryString("post")<>"" then
- if request.cookies("nicedown")("admin")<>"" then
- set rs=conn.execute("select * from admin where admin='"& request.cookies("nicedown")("admin") &"'")
- strsQx=rs("qx")
- set rs=conn.execute("select * from config where id="&int(strsQx))
- if rs("boolAff")=False then
- 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>"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
- response.end
- end if
- select case request.QueryString("post")
- case "del"
- sql="delete from affiche where id="&request.QueryString("id")
- conn.execute sql
- 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>"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
- response.end
- case else
- if request.QueryString("save")="ready" then
- if request.QueryString("id")<>"" then
- sql="select affiche.title,affiche.show from affiche where id="&request.QueryString("id")
- rs=conn.execute(sql)
- strRtitle=rs("title")
- strRshow=rs("show")
- strSumber="修改公告"
- strForm="affiche.asp?id="&request.QueryString("id")&"&post=edit&save=ok"
- else
- strRtitle=""
- strRshow=""
- strSumber="添加公告"
- strForm="affiche.asp?post=add&save=ok"
- end if%>
- <table width="90%" border="0" cellspacing="0" cellpadding="0">
- <form name="frmAnnounce" method="post" action="<%=strForm%>">
- <tr>
- <td width="232"><img src="images/a_01.gif" width="232" height="40"></td>
- <td width="322" valign="baseline" background="images/a-02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="center" class="shadow1"> </td>
- </tr>
- </table></td>
- <td width="232"><img src="images/a_02.gif" width="231" height="40"></td>
- </tr>
- <tr>
- <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20" rowspan="3" background="images/a04.gif"> </td>
- <td width="200" align="center" bgcolor="#B3D464">标题: </td>
- <td width="545" bgcolor="#B3D464">
- <input name="title" type="text" size="62" value="<%=strRtitle%>"></td>
- <td width="22" rowspan="3" background="images/a8.gif"> </td>
- </tr>
- <tr>
- <td width="200" align="center" bgcolor="#B3D464">内容: </td>
- <td width="545" bgcolor="#B3D464">
- <img border="0" onclick=bold() src="./images/btg/bold.gif" alt="粗体" width="23" height="22">
- <img border="0" onclick=italicize() src="./images/btg/italicize.gif" alt="斜体" width="23" height="22">
- <img border="0" onclick=underline() src="./images/btg/underline.gif" alt="下划线" width="23" height="22">
- <img border="0" onclick=showcode() src="./images/btg/code.gif" alt="插入代码" width="23" height="22">
- <img border="0" onclick=quote() src="./images/btg/quote.gif" alt="引用" width="23" height="22">
- <img border="0" onclick=setfly() src="./images/btg/fly.gif" alt="飞行字" width="23" height="22">
- <img border="0" onclick=glow() src="./images/btg/glow.gif" alt="发光字" width="23" height="22">
- <img border="0" onclick=move() src="./images/btg/move.gif" alt="移动字" width="23" height="22">
- <img border="0" onclick=shadow() src="./images/btg/shadow.gif" alt="阴影字" width="23" height="22">
- <img border="0" onclick=list() src="./images/btg/list.gif" alt="列表" width="23" height="22">
- <img border="0" onclick=center() src="./images/btg/center.gif" alt="居中" width="23" height="22">
- <br>
- <img border="0" onclick=showsize() src="./images/btg/font.gif" alt="改变字体大小" width="23" height="22">
- <img border="0" onclick=hyperlink() src="./images/btg/url.gif" alt="插入连接" width="23" height="22">
- <img border="0" onclick=image() src="./images/btg/image.gif" alt="插入图片" width="23" height="22">
- <img border="0" onclick=flash() src="./images/btg/swf.gif" alt="插入FLASH" width="23" height="22">
- <img border="0" onclick=email() src="./images/btg/email.gif" alt="插入E-mail" width="23" height="22">
- <img border="0" onclick=showface() src="./images/btg/smilie.gif" alt="心情图标" width="23" height="22">
- <img border="0" onclick=mp() src="./images/btg/media.gif" alt="Media Player视频文件" width="23" height="22">
- <img border="0" onclick=rm() src="./images/btg/real.gif" alt="realplay视频文件" width="23" height="22">
- <img border="0" onclick=qt() src="./images/btg/qs.gif" alt="QuickTime视频文件" width="23" height="22">
- <img border="0" onclick=sk() src="./images/btg/shockwave.gif" alt="Shockwave文件" width="23" height="22">
- <img border="0" src="./images/btg/help.gif" alt="在线帮助" width="23" height="22"><br>
- <textarea name="brief" cols="60" rows="8"><%=strRshow%></textarea></td>
- </tr>
- <tr>
- <td colspan="2" align="center" bgcolor="#B3D464"><input type="submit" name="Submit" value="<%=strSumber%>">
- <input type="reset" name="Submit2" value="重新填写"></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20"><img src="images/index_019.gif" width="20" height="17"></td>
- <td width="746" background="images/index_020.gif"> </td>
- <td width="20"><img src="images/a11.gif" width="20" height="17"></td>
- </tr>
- </table></td>
- </tr>
- </form>
- </table>
- <%
- response.end
- elseif request.QueryString("save")="ok" then
- if request.form("title")<>"" and request.form("brief")<>"" then
- strTitle=request.form("title")
- strShow=request.form("brief")
- dateTime=now()
- strAdmin=request.cookies("nicedown")("admin")
- else
- response.write("请填写完整公告内容再提交……")
- response.end
- end if
- if request.QueryString("post")="add" then
- sql="insert into affiche(title,show,times,name) values('"&strTitle&"','"&strShow&"','"&dateTime&"','"&strAdmin&"')"
- else
- strId=request.QueryString("id")
- sql="update affiche set title='"&strTitle&"',show='"&strShow&"',times='"&dateTime&"',name='"&strAdmin&"' where id="&strId
- end if
- conn.execute sql
- 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>"&_
- "<META HTTP-EQUIV=REFRESH CONTENT='2;URL=affiche.asp'>")
- response.end
- end if
- end select
- end if
- end if
- Set rs4 = Server.CreateObject("ADODB.Recordset")
- sql4="select * from affiche order by times desc"
- rs4.open sql4,conn,1,1
- if rs4.eof then
- boolAfor=True
- numAfor=1
- else
- boolAfor=False
- numAfor=rs4.recordcount
- end if
- for i= 1 to numAfor
- if boolAfor=True then
- strAtitle="还没有公告"
- strAshow="请进管理区来发布一个公告(必须是管理员)。<BR>当你发布一次公告后,本公告就会自动消失,无需你手动删除!"
- dateAtime=now()
- strAname="本站的默认公告"
- else
- strAid=rs4("id")
- strAtitle=rs4("title")
- if boolUbb_1=True then
- strAshow=UBBCode(rs4("show"))
- else
- strAshow=rs4("show")
- end if
- dateAtime=rs4("times")
- strAname=rs4("name")
- end if
- %>
- <table width="90%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="232"><img src="images/a_01.gif" width="232" height="40"></td>
- <td width="322" valign="baseline" background="images/a-02.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="center" class="shadow1"><strong><%=strAtitle%></strong></td>
- </tr>
- </table></td>
- <td width="232"><img src="images/a_02.gif" width="231" height="40"></td>
- </tr>
- <tr>
- <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20" rowspan="5" background="images/a04.gif"> </td>
- <td colspan="2" bgcolor="#B3D464"><hr width="90%" size="1" noshade></td>
- <td width="20" rowspan="5" background="images/a8.gif"> </td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#B3D464"> </td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#B3D464"><blockquote><%=strAshow%></blockquote></td>
- </tr>
- <tr>
- <td colspan="2" bgcolor="#B3D464"><hr width="90%" size="1" noshade></td>
- </tr>
- <tr>
- <td width="450" align="left" bgcolor="#B3D464"> <blockquote>
- <p><strong>发布人</strong>:<%=strAname%> <%
- if request.cookies("nicedown")("admin")<>"" then
- set rs=conn.execute("select * from admin where admin='"& request.cookies("nicedown")("admin") &"'")
- strsQx=rs("qx")
- set rs=conn.execute("select * from config where id="&int(strsQx))
- if rs("boolAff")=True then
- response.write("<a href=affiche.asp?post=add&save=ready><img border='0' src='images/a_add.gif' width='52' height='16'></a>"& vbCRLF & _
- "<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 & _
- "<a href='affiche.asp?id="&strAid&"&post=edit&save=ready'><img border='0' src='images/a_edit.gif' width='52' height='16'></a>")
- end if
- end if%><br>
- </p>
- </blockquote></td>
- <td width="278" align="right" bgcolor="#B3D464"><blockquote>
- <p><strong>发布时间</strong>:<%=dateAtime%></p>
- </blockquote></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20"><img src="images/index_019.gif" width="20" height="17"></td>
- <td width="746" background="images/index_020.gif"> </td>
- <td width="20"><img src="images/a11.gif" width="20" height="17"></td>
- </tr>
- </table></td>
- </tr>
- </table>
- <%
- if boolAfor=False then
- rs4.movenext
- end if
- if rs4.eof then
- exit for
- end if
- next
- rs4.close
- set rs4=nothing
- %>
- </body>
- </html>