📄 bbssay.aspx
字号:
<% @ Import Namespace="Packaging" %>
<% @ Import Namespace="System.Data" %>
<% @ Register TagPrefix="pb" TagName="Header" Src="header.ascx" %>
<% @ Register TagPrefix="pb" TagName="Footer" Src="footer.ascx" %>
<% @ Register TagPrefix="pb" TagName="Login" Src="login.ascx" %>
<% @ Register TagPrefix="pb" TagName="Major" Src="major.ascx" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title><asp:Literal id="Ptitle" runat="server" /></title>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<link rel="stylesheet" type="text/css" href="pack.css">
</head>
<body topmargin="6" leftmargin="0" bgcolor="#eaeaea">
<form runat="server">
<pb:Header id="Header" runat="server" />
<div align="center">
<table border="0" cellpadding="0" cellspacing="1" bgColor="#006699" width="750" height="125">
<tr><td width="25%" valign="top" background="images/bd.gif" rowspan="2" height="125">
<pb:Login id="login" runat="server" />
<pb:Major id="major" runat="server" /></td>
<td width="75%" valign="top" bgcolor="#FFFFFF" height="228" background="images/ldb.gif">
<br><font color="#FF0000">Dot.Net论坛欢迎您!</font>
<br><img border="0" src="images/line.gif" width="400" height="12"><br><br>
<table border="0" cellpadding="0" cellspacing="0" width="90%" align="center" height="222">
<tr><td width="15%" align="center" height="17">主题:</td>
<td width="85%" height="17">
<asp:TextBox id="title" size="45" runat="server" maxlength="50" />
<asp:RequiredFieldValidator id="valid1" runat="server"
controlToValidate="title">(必填)</asp:RequiredFieldValidator></td></tr>
<tr><td width="15%" align="center" height="109">内容:</td>
<td width="85%" height="109">
<asp:TextBox id="content" textMode="Multiline" rows="5" cols="40" runat="server" /></td></tr>
<tr><td width="15%" align="center" height="78">请选择一个表情:</td>
<td width="85%" height="78">
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<tr><td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="0" id="e0" Checked /><img border="0" src="images/face/face0.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="1" id="e1" /><img border="0" src="images/face/face1.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="2" id="e2" /><img border="0" src="images/face/face2.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="3" id="e3" /><img border="0" src="images/face/face3.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="4" id="e4" /><img border="0" src="images/face/face4.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="5" id="e5" /><img border="0" src="images/face/face5.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="6" id="e6" /><img border="0" src="images/face/face6.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="7" id="e7" /><img border="0" src="images/face/face7.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="8" id="e8" /><img border="0" src="images/face/face8.gif" width="15" height="15"></td>
</tr>
<tr>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="9" id="e9" /><img border="0" src="images/face/face9.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="10" id="e10" /><img border="0" src="images/face/face10.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="11" id="e11" /><img border="0" src="images/face/face11.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="12" id="e12" /><img border="0" src="images/face/face12.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="13" id="e13" /><img border="0" src="images/face/face13.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="14" id="e14" /><img border="0" src="images/face/face14.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="15" id="e15" /><img border="0" src="images/face/face15.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="16" id="e16" /><img border="0" src="images/face/face16.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="17" id="e17" /><img border="0" src="images/face/face17.gif" width="15" height="15"></td>
</tr>
<tr>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="18" id="e18" /><img border="0" src="images/face/face18.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="19" id="e19" /><img border="0" src="images/face/face19.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="20" id="e20" /><img border="0" src="images/face/face20.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="21" id="e21" /><img border="0" src="images/face/face21.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="22" id="e22" /><img border="0" src="images/face/face22.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="23" id="e23" /><img border="0" src="images/face/face23.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="24" id="e24" /><img border="0" src="images/face/face24.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="25" id="e25" /><img border="0" src="images/face/face25.gif" width="15" height="15"></td>
<td width="11%"><asp:RadioButton GroupName="emot" runat="server" value="26" id="e26" /><img border="0" src="images/face/face26.gif" width="15" height="15"></td>
</tr>
</table></td></tr>
<tr><td width="100%" align="center" height="18" colspan="2">
<asp:Button id="post1" runat="server" text="POST"
onClick="post1_Click" />
<input type="reset" value="RESET"> <a href="bbs.aspx">返回论坛</a><asp:label id="mes" visible="false" style="color:red" runat="server" text="SORRY! 你没有权限修改这篇文章。" /></td></tr>
</table>
</td>
<tr><td width="75%" valign="bottom" bgcolor="#FFFFFF" height="80" align="right" background="images/ldb.gif">
<img border="0" src="images/pen.gif" width="400" height="80"><br> </td></tr>
</table>
</div>
<pb:Footer id="footer" runat="server" />
</form>
</body>
</html>
<script language="VB" runat="server">
Dim type As Integer
Dim bbsId As Integer
Sub Page_Load(Sender As Object, e As EventArgs)
If Not Request.IsAuthenticated Then
Response.Redirect("login.aspx")
End If
If Request("t")="" Then
type=1
Else
Try
type=CInt(Request("t"))
Catch
type=1
End Try
End If
If type<1 Or type>4 Then
type=1
End If
If type>1 And type<=4 Then
Try
bbsId=CInt(Request("id"))
Catch
Response.Redirect("bbs.aspx")
End Try
End If
If type=3 And Not Page.IsPostBack Then
initform()
End If
If type=4 Then
Dim MyDB As BBSDB=New BBSDB()
Dim DV As DataView=MyDB.GetBBS(bbsId)
If DV.Table.Rows.Count>0 And DV.Table.Rows(0)("BBSAuthor")=Context.User.Identity.Name Then
MyDB.DeleteBBS(BBSId)
Response.Redirect("bbs.aspx")
Else
mes.Visible=true
End If
End If
End Sub
Sub initform()
Dim MyBBS As BBSDB=New BBSDB()
Dim DV As DataView=MyBBS.GetBBS(bbsId)
If DV.Table.Rows.Count>0 Then
If Context.User.Identity.Name<>DV.Table.Rows(0)("BBSAuthor") Then
mes.Visible=true
End If
title.text=DV.Table.Rows(0)("BBStitle")
content.text=DV.Table.Rows(0)("BBSContent")
Dim face As Integer=DV.Table.Rows(0)("BBSFace")
If face=0 Then
e0.Checked=True
End If
If face=1 Then
e1.Checked=True
End If
If face=2 Then
e2.Checked=True
End If
If face=3 Then
e3.Checked=True
End If
If face=4 Then
e4.Checked=True
End If
If face=5 Then
e5.Checked=True
End If
If face=6 Then
e6.Checked=True
End If
If face=7 Then
e7.Checked=True
End If
If face=8 Then
e8.Checked=True
End If
If face=9 Then
e9.Checked=True
End If
If face=10 Then
e10.Checked=True
End If
If face=11 Then
e11.Checked=True
End If
If face=12 Then
e12.Checked=True
End If
If face=13 Then
e13.Checked=True
End If
If face=14 Then
e14.Checked=True
End If
If face=15 Then
e15.Checked=True
End If
If face=16 Then
e16.Checked=True
End If
If face=17 Then
e17.Checked=True
End If
If face=18 Then
e18.Checked=True
End If
If face=19 Then
e19.Checked=True
End If
If face=20 Then
e20.Checked=True
End If
If face=21 Then
e21.Checked=True
End If
If face=22 Then
e22.Checked=True
End If
If face=23 Then
e23.Checked=True
End If
If face=24 Then
e24.Checked=True
End If
If face=25 Then
e25.Checked=True
End If
If face=26 Then
e26.Checked=True
End If
End If
End Sub
Sub post1_Click(Sender As Object, e As EventArgs)
Dim MyBBS As BBS=New BBS()
MyBBS.Title=title.text
MyBBS.Author=Context.User.Identity.Name
MyBBS.Parent=0
MyBBS.Content=content.text
MyBBS.face=0
If e0.Checked Then
MyBBS.face=0
End If
If e1.Checked Then
MyBBS.face=1
End If
If e2.Checked Then
MyBBS.face=2
End If
If e3.Checked Then
MyBBS.face=3
End If
If e4.Checked Then
MyBBS.face=4
End If
If e5.Checked Then
MyBBS.face=5
End If
If e6.Checked Then
MyBBS.face=6
End If
If e7.Checked Then
MyBBS.face=7
End If
If e8.Checked Then
MyBBS.face=8
End If
If e9.Checked Then
MyBBS.face=9
End If
If e10.Checked Then
MyBBS.face=10
End If
If e11.Checked Then
MyBBS.face=11
End If
If e12.Checked Then
MyBBS.face=12
End If
If e13.Checked Then
MyBBS.face=13
End If
If e14.Checked Then
MyBBS.face=14
End If
If e15.Checked Then
MyBBS.face=15
End If
If e16.Checked Then
MyBBS.face=16
End If
If e17.Checked Then
MyBBS.face=17
End If
If e18.Checked Then
MyBBS.face=18
End If
If e19.Checked Then
MyBBS.face=19
End If
If e20.Checked Then
MyBBS.face=20
End If
If e21.Checked Then
MyBBS.face=21
End If
If e22.Checked Then
MyBBS.face=22
End If
If e23.Checked Then
MyBBS.face=23
End If
If e24.Checked Then
MyBBS.face=24
End If
If e25.Checked Then
MyBBS.face=25
End If
If e26.Checked Then
MyBBS.face=26
End If
Dim MyDB As BBSDB=New BBSDB()
If type=1 Then
MyDB.AddBBS(MyBBS)
ElseIf type=2 Then
MyBBS.Parent=BBSId
MyDB.AddBBS(MyBBS)
ElseIf type=3 Then
MyBBS.Id=BBSId
If mes.Visible=False Then
MyDB.ChangeBBS(MyBBS)
End If
End If
Response.Redirect("bbs.aspx")
End Sub
</script>
<style>
td {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 10pt;
}
.whiteB {
color: white;
font-weight : bold;
}
input {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 10pt;
}
td.bar {
color: green; font-weight: bold;
}
a.whiteLink:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-weight : bold;
color : white;
text-decoration : none;
}
a.whiteLink:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-weight : bold;
color : white;
text-decoration : none;
}
a.whiteLink:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-weight : bold;
color : white;
text-decoration : none;
}
a.barLink:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #CCFF99;
text-decoration : none;
}
a.barLink:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #CCFF99;
text-decoration : none;
}
a.barLink:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #CCFF99;
text-decoration : underline;
}
a.level1:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : white;
text-decoration : none;
}
a.level1:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : white;
text-decoration : none;
}
a.level1:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : white;
text-decoration : underline;
}
a.level2:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #00A71C;
text-decoration : none;
}
a.level2:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #00A71C;
text-decoration : none;
}
a.level2:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : #00A71C;
text-decoration : underline;
}
a.author:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : black;
text-decoration : none;
}
a.author:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : black;
text-decoration : none;
}
a.author:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
color : black;
text-decoration : underline;
}
</style>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -