?? admin_bbsaddbest.aspx
字號:
<% @ Import Namespace="Packaging" %>
<% @ Import Namespace="System.Data" %>
<% @ Import Namespace="System.Xml" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>Dot.Net管理區!</title>
<link rel="stylesheet" type="text/css" href="pack.css">
</head>
<body bgcolor="#B3F0C7">
<form runat="server">
<asp:Label id="mes" runat="server" />
</form>
</body>
</html>
<script language="VB" runat="server">
Sub Page_Load(Sender As Object, e As EventArgs)
If Not Request.IsAuthenticated Then
Response.Redirect("login.aspx")
End If
Dim CounterXml As String=ConfigurationSettings.AppSettings("CounterXml")
Dim objXml As XMLDocument=New XMLDocument()
objXml.Load(CounterXml)
Dim objRootSite As XMLNode
objRootSite=objXml.documentElement.SelectSingleNode("admin")
Dim j As Integer
Dim flag As Boolean=false
For j=0 To objRootSite.ChildNodes.Count-1
If objRootSite.ChildNodes.Item(j).InnerText=Context.User.Identity.Name Then
flag=true
End If
Next
If Not flag Then
Response.Redirect("admin.aspx")
End If
Dim id As Integer
Try
id=CInt(Request("id"))
Dim MyBBS As BBSDB=New BBSDB()
Dim DV As DataView=MyBBS.GetBBS(id)
Dim DR As DataRow=DV.Table.Rows(0)
Dim MyNews As News=New News()
MyNews.NewsCat=6
MyNews.NewsAuthor=Context.User.Identity.Name
MyNews.NewsTitle=DR("BBSTitle")
MyNews.NewsContent=DR("BBSContent")+chr(10)+chr(13)+chr(10)+chr(13)+"作者:[html]<a href=# onClick=javascript:window.open('info.aspx?name="+DR("BBSAuthor")+"','','top=50,left=150,height=332,width=320,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=yes,status=0')>"+DR("BBSAuthor")+"</a>[/html]"
MyNews.NewsTime=DateTime.Now()
MyNews.NewsFrom="Dot.Net論壇"
MyNews.IsHtml=false
Dim MyDB As NewsDB=New NewsDB()
MyDB.AddNews(MyNews)
mes.Text="添加成功!"
Catch ex As Exception
mes.Text=ex.Tostring()
End Try
End Sub
</script>
<style>
span {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 10pt;
}
</style>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -