view-postflatview.ascx

来自「cnForums是功能强大的论坛。开发语言c#,三层结构。模块设计很值得学习」· ASCX 代码 · 共 266 行

ASCX
266
字号
<%@ Control Language="C#" %>
<%@ Import Namespace="AspNetForums" %>
<%@ Import Namespace="AspNetForums.Controls" %>
<%@ Import Namespace="AspNetForums.Components" %>
<%@ Import Namespace="AspNetForums.Enumerations" %>
<%@ Register TagPrefix="Forums" Namespace="AspNetForums.Controls" Assembly="AspNetForums.Controls" %>
<Forums:NavigationMenu runat="server" />
<!-- View-PostFlatView.Header.Start -->
<table width="100%" cellspacing="5" cellpadding="0" border="0">
	<tr>
		<td>
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<table class="tableBorder" width="100%" cellspacing="1" cellpadding="3">
							<tr>
								<td class="fh">
									<table width="100%" cellspacing="0" border="0" cellpadding="0">
										<tr>    
											<td align="left" valign="top">
												<asp:Label CssClass="forumName" ID="PostSubject" Runat="server" />
												<br>
												<asp:Label CssClass="txt3" ID="ForumName" Runat="server" />
											</td>
											<td align="right" valign="top" class="txt3">
												<asp:Label CssClass="forumThread" ID="ThreadStats" Runat="server" />
											</td>
										</tr>
									</table>    
									<br>   
									<Forums:BreadCrumb ShowHome="true" runat="server" />
								</td>    
							</tr>
						</table>
					</td>  				
				</tr>
			</table>	

			<Forums:Ads Zone="StandardTop" runat="server" />
		</td>
	</tr>
</table>
<!-- View-PostFlatView.Header.End -->	
<!-- View-PostFlatView.MainCentent.Start -->
<table cellpadding="1" cellspacing="0" width="100%">
	<tr>
		<td>
			<table cellpadding="3" cellspacing="0" border="0" width="100%">
				<tr>
					<td align="left" class="txt3">
						<Forums:ForumImageButton ButtonType="NewPost" runat="server" ID="NewPostButtonUp"/>
						<Forums:ForumImageButton ButtonType="Poll" runat="server" ID="NewPollButtonUp"/>
						<Forums:ForumImageButton ButtonType="Reply" runat="server" ID="ReplyTop" Visible="false"/>  
						<Forums:ForumImageButton ButtonType="Print" runat="server" /> 
						<Forums:SearchRedirect SkinFileName="Skin-SearchForum.ascx" ID="SearchRedirect" runat="server" />
						<forums:RatePost id="RatePost" runat="server" /> 
						<forums:ThreadSubscribeLinkButton runat="server"/>
					</td>                 
					<td align="right" class="txt3">
						<Forums:ForumImageButton ButtonType="PreviousTopic" ID="PrevThread" runat="server" /> 
						<Forums:ForumImageButton ID="NextThread" ButtonType="NextTopic" runat="server" />
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<Forums:VoteOptions runat="server" id="voteOptions" Visible="false"/>						

<!-- ********* Repeater.Start ************* //-->							
<asp:Repeater ID="PostRepeater" EnableViewState="false" Runat="server">      
	<ItemTemplate>
	<!-- ********* ItemTemplate.Start ************* //-->	
<table cellpadding="5" cellspacing="0" width="100%">
	<tr>
		<td>
			<table class="tableBorder" cellpadding="0" cellspacing="0" width="100%" border="0">
				<tr>			
					<td>
						<table width="100%" cellpadding="0" cellspacing="0" border="0">	
		<!-- ********* ItemTemplate.PostHeader ************* //-->								
							<tr height="20">
								<td class="threadSeparator" colspan="2" valign="middle">
									<a name='<%# DataBinder.Eval (Container.DataItem, "PostID" ) %>'></a>
									<span class="dateText">&nbsp;<img border="0" src="<%= Globals.GetSkinPath() + "/images/icon_post_show.gif"%>">&nbsp;<%# Formatter.FormatDatePost (((Post) Container.DataItem).PostDate) %></span>
								</td>
							</tr>       
						</table>
		<!-- ********* ItemTemplate.PostHeaderEnd ************* //-->
		<!-- ********* ItemTemplate.BodyRowStart ************* //-->
						<table width="100%" cellpadding="0" cellspacing="0" border="0">            
							<tr>
		<!-- ********* ItemTemplate.BodyColUserInfoStart (2 rows:start of rowspan) ************* //-->						
								<td class="fh" align="center" valign="top" width="180" nowrap>
									<div style="padding-top: 4px;">
									<Forums:UserOnlineStatus runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
									<b><%# Formatter.FormatUsername ( ((User) DataBinder.Eval (Container.DataItem, "User" )).UserID, DataBinder.Eval (Container.DataItem, "Username").ToString() ) %></b>
									<Forums:UserAvatar runat="server" Border="1" PadImage="True" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
									<div class="txt2" border="single" align="left" style="padding-left: 4px;">
										<br />
										<Forums:PostIcons runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
										<Forums:RankIcons runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' ID="Rankicons1"/>									
										<Forums:UserAttribute FormatString="<br />{0}" Attribute="Joined" runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
										<Forums:UserAttribute FormatString="<br />{0}" Attribute="Location" runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
										<Forums:UserAttribute FormatString="<br />{0}" Attribute="Posts" runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
										<Forums:RoleIcons runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' />
									</div>
									</div>
								</td>
		<!-- ********* ItemTemplate.BodyColUserInfoEnd (/2 rows:end of rowspan) ************* //-->
		<!-- ********* ItemTemplate.BodyColPostHeaderStart (1 row) ************* //-->	
								<td valign="top">
									<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
										<tr height="20">
											<td class="f">
												<table width="100%" cellpadding="2" cellspacing="0">
													<tr>
														<td class="f" align="left" width="100%">
															<span>
																<%# Formatter.PostEmoticon( (int) DataBinder.Eval (Container.DataItem, "EmoticonID" ) ) %><b><%# DataBinder.Eval (Container.DataItem, "Subject" ) %></b>
															</span>
														</td>
														<td class="f" align="right" nowrap>
															<Forums:ForumImageButton ButtonType="Reply" Post='<%# Container.DataItem %>' runat="server" ID="ReplyButton" /> <Forums:ForumImageButton runat="server" Post='<%# Container.DataItem %>' ButtonType="Quote" id="QuoteButton"/> <Forums:ForumImageButton runat="server" Post='<%# Container.DataItem %>' ButtonType="Delete" id="DeleteButton"/> <Forums:ForumImageButton runat="server" Post='<%# Container.DataItem %>' ButtonType="Edit" id="EditButton"/> 
														</td>
													</tr>
												</table>
												<table width="100%" cellpadding="2" cellspacing="0" border="0">
													<tr>
														<td class="f" align="left" nowrap>
															<Forums:PostAttachment runat="server" Post='<%# Container.DataItem %>' ID="Postattachment1"/>
														</td>
														<td align="right" class="f">
															<Forums:ModerationMenu Post='<%# (Post) Container.DataItem %>' runat="server" SkinFileName="Moderation\Skin-ModeratePost.ascx" ID="Moderationmenu2"/>
														</td>
													</tr>
												</table>
											</td>
										</tr>
				<!-- ********* ItemTemplate.BodyColPostHeaderEnd (/1 row) ************* //-->								
				<!-- ********* ItemTemplate.BodyColPostBodyStart (1 row) ************* //-->	
										<tr>
											<td>
												<table width="100%" height="100%" cellpadding="2" cellspacing="0">							
													<tr>
														<td class="fh3" colspan="10" height="100%" width="100%" valign="top">
															<table align="left" height="200" style="width:100%" cellpadding="5px" cellspacing="0">
																<tr>
																	<td class="txt4" align="left" valign="top">											
																		<Forums:PostView Post='<%# (Post) Container.DataItem %>' runat="server" />
																		<br />											
																	</td>
																</tr>
															</table>
														</td>			
													</tr>
													<tr>
														<td class="fh3" align="left" valign="bottom" width="80%" colspan="8">
															<Forums:PostImageButtons runat="server" User='<%# (User) DataBinder.Eval (Container.DataItem, "User" ) %>' ID="Postimagebuttons1"/>
														</td>
														<td class="fh3" width="10%" valign="bottom" align="right" nowrap>
															<%# Formatter.PostIPAddress ( (Post) Container.DataItem ) %>&nbsp;&nbsp;
														</td>
														<td class="fh3" width="10%" valign="bottom" align="right" class="txt5" nowrap>
															<% if ( !Users.GetUser().IsAnonymous ) { %>
															<a href="<%=Globals.GetSiteUrls().Report%>&ReportPostID=<%# ((Post) Container.DataItem).PostID %>"><%# ResourceManager.GetString("Report")%></a>&nbsp;
															<% } else {%>&nbsp;<%}%>
														</td>												
													</tr>
												</table>	
											</td>
										</tr>
									</table>
								</td>
							</tr>
		<!-- ********* ItemTemplate.BodyColPostBodyEnd (/1 row) ************* //-->
						</table>	
					</td>
				</tr>							
			</table>
		</td>
	</tr>
</table>
	<!-- ********* ItemTemplate.End ************* //-->										
	</ItemTemplate>
</asp:Repeater> 
<!-- ********* Repeater.End ************* //-->	

<table cellpadding="3" cellspacing="0" width="100%">
	<tr>
		<td valign="top" align="left" width="10px">
			<table cellpadding="3" cellspacing="0" border="0" width="100%">
				<tr>
					<td align="left" nowrap class="txt3">
						<Forums:ForumImageButton ButtonType="NewPost" runat="server" ID="NewPostButtonDown"/>
						<Forums:ForumImageButton ButtonType="Poll" runat="server" ID="NewPollButtonDown"/>
						<Forums:ForumImageButton ButtonType="Reply" runat="server" ID="ReplyDown" Visible="false"/>

					</td>
				</tr>
			</table>			
		</td>	
		<td valign="top">
<!-- TODO (EAD): Write a <asp:Panel> with an id to turn off if no paging is needed.  //-->		
			<table align="right" class="tableBorder" cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<table width="100%" cellpadding="2" cellspacing="0">
							<tr>
								<td valign="middle" class="column" nowrap>
									&nbsp;<Forums:CurrentPage Cssclass="columnText" id="CurrentPage" runat="server" />
								</td>
								<td valign="middle" align="right" class="column" nowrap>
									<Forums:Pager id="Pager" runat="server" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
<!-- END TODO  //-->			
		</td> 
	</tr>
</table>

<!--Quick reply Begin-->
<p align="center" class="txt2Bold" runat="server" id="QuickReplyBlock">
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableBorder">
  <tr>
    <td colspan="2" class="column">&nbsp; <%= ResourceManager.GetString("PostFlatView_QuickReply")%> </td>
  </tr>
  <tr>
    <td width="175" rowspan="2" valign="top" class="fh">
    <p>&nbsp;</p>
    <asp:checkbox id="SubscribeToThread" Checked="true" runat="server"/> <br/>
    <asp:checkbox id="DisableBBCode" runat="server"/> <br/>
    <asp:checkbox id="DisableEmoticon" runat="server"/> <br/>
    </td>
    <td valign="top" class="f"><span class="txt5Bold"><% = AspNetForums.Components.ResourceManager.GetString("PostFlatView_PostSubject") %> </span><asp:textbox autocomplete="off" id="QuickReplySubject" runat="server" columns="83"></asp:textbox></td>
  </tr>
  <tr>
    <td valign="top" class="fh3">
<asp:TextBox id="QuickReply" runat="server" TextMode="MultiLine" style="width:550px;height:204px"></asp:TextBox>
<br/>
<asp:Button Runat="server" id="PostButton"></asp:Button>
<asp:RequiredFieldValidator id="postBodyValidator"  Enabled="false" ControlToValidate="QuickReply"></asp:RequiredFieldValidator>
</td>
  </tr>
</table>
</p>
<!--Quick reply End-->


<table cellpadding="3" cellspacing="2" width="100%">
	<tr>
		<td valign="top" align="left" class="txt4">
			<Forums:BreadCrumb ShowHome="true" runat="server" />
		</td>
		<td valign="top" align="right" class="txt5" nowrap>
			<Forums:JumpDropDownList CssClass="txt1" runat="server" />
		</td>
	</tr>
</table>
<Forums:Ads Zone="StandardBottom" runat="server" />

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?