<!--{foreach (System.Data.DataRow dr in DisplayContent)} -->
<!--{if(dr["depth"].ToString() == "1")}-->
<table class="tablebox border" cellspacing="0" cellpadding="0">
	<!--{else}-->
	<table class="tablebox border" cellspacing="0" cellpadding="0">
		<!--{endif}-->
		<!--<%TopReplayId=dr["id"].ToString() ;%>-->
		<tr>
			<td class="infoleft leftcolor" valign="top" rowspan="4">
				<!--{if((bool)dr["isanonymous"] && (!(dr["name"].ToString().ToLower()==user.Name.ToLower() || user.IsMaster || user.IsSuperMaster  || IsAdmin) || dr["name"].ToString() == "游客" ))}--><br />
				<P>(匿名发帖：<%=(dr["ip"].ToString().Substring(0, 8))%>)</P>
				<br />
				<img src="templates/<%=CurrentTemplateName%>/skins/<%=CurrentSkinName%>/images/anyon.gif" /><br />
				<!--{else}-->
				<span class="username">
					<img src="templates/<%=CurrentTemplateName%>/images/<%=dr["onlinepath"].ToString()%>" style="float:right; margin-right:5px;" alt="<%=dr["onlinestr"]%>" /><a href="user_info.aspx?name=<%=Server.UrlEncode(dr["name"].ToString())%>"><%=dr["name"].ToString()%></a>
				</span>
				<span>
					<a href="user_info.aspx?name=<%=Server.UrlEncode(dr["name"].ToString())%>"><img src="<%=Server.UrlDecode(dr["facepath"].ToString())%>" onerror="ImageOnError(this,'files/uploadfaces/userface/noface.gif')"  width="<%=dr["userwidth"].ToString()%>" height="<%=dr["userheight"].ToString()%>"/></a></span>
				<span>
					<img src="templates/<%=CurrentTemplateName%>/images/level/<%=dr["star"].ToString()%>" title="积分:<%=int.Parse(dr["experience"].ToString())<0?"0":dr["experience"].ToString()%>" alt="积分:<%=int.Parse(dr["experience"].ToString())<0?"0":dr["experience"].ToString()%>" ></span>
				<%=(user.UserBaseStrategy.UserRole_pop_strategy[(int)PopStrategyEnum.AllowCustomHonor] == "1" && string.Empty!=dr["rank"].ToString() ? "<span>头衔："+ TextEncode(dr["rank"].ToString()) +"</span>" : "")%>
				<span>
					等级：<%=dr["rolename"]%></span>
				<span>
					文章：<%=dr["post"]%></span>
				<span>
					积分：<%=int.Parse(dr["experience"].ToString())<0?"0":dr["experience"].ToString()%></span>
				<span>
					注册：<%=DateTime.Parse(dr["jointime"].ToString()).ToString("yyyy年M月d日")%></span>
					<!--{if(UserExexp.GetVisibleExexp(dr["name"].ToString())!=null)}-->
						<!--{foreach(ExexpInfo expinfo in UserExexp.GetVisibleExexp(dr["name"].ToString()))}-->
						    <span><%=expinfo.Name%>：<%=expinfo.Value%>&nbsp;<%=expinfo.Unit%>
							</span>
						  <!--{endfor}-->
						<!--{endif}-->
				<!--{if((bool)dr["isanonymous"])}-->
				(匿名发帖) 
				<!--{endif}-->
				<!--{endif}-->
			</td>
			<td class="usermenu">
				<em><a href="javascript:setFontSize('Msg<%=dr["id"]%>',0);">小</a>&nbsp; <a href="javascript:setFontSize('Msg<%=dr["id"]%>',1);">
						大</a>&nbsp; 
					<!--{if(dr["depth"].ToString() == "1")}-->
					楼主 
					<!--{else}-->
					第&nbsp;<span class="t2"><%=dr["depth"]%></span>&nbsp;楼 
					<!--{endif}-->
				</em>
				<!--<%		
					string qq="",msn="",homepage="";
					try{
						string[] infos = dr["info"].ToString().Split('	');
						homepage=infos[0];
						qq = infos[1];
						msn = EmailEncode(infos[2]);
					}catch{}
					%>-->
				<!--{if((bool)dr["isanonymous"] && (!(dr["name"].ToString().ToLower()==user.Name.ToLower() || user.IsMaster || user.IsSuperMaster  || IsAdmin) || dr["name"].ToString() == "游客" ))}--><br />
				<a href="#">匿名</a> | 
				<!--{else}-->
				<a href="user_info.aspx?name=<%=Server.UrlEncode(dr["name"].ToString())%>">个人展示</a>
				| 
				<!--{endif}-->
				<!--{if(qq==string.Empty)}-->
				<a alt="<%=dr["name"].ToString()%>没有设置QQ" style="cursor:pointer" title="<%=dr["name"].ToString()%>没有设置QQ">QQ</a>
		<!--{else}-->
				<a href="tencent://message/?uin=<%=qq%>&Site=<%=Config.Settings["bbsName"]%>&Menu=yes" title="点击Q我">QQ</a>
				<!--{endif}-->
				| <a href="mailto:<%=dr["email"]%>">邮箱</a> | 
				<!--{if(homepage==string.Empty)}-->
				 <a style="cursor:pointer" alt="<%=dr["name"].ToString()%>没有设置自己的主页" title="<%=dr["name"].ToString()%>没有设置自己的主页">主页</a>
				<!--{else}-->
				<a href="<%=homepage%>">主页</a>
				<!--{endif}-->
				<!--{if(user.Name.Trim()!=dr["name"].ToString().ToLower().Trim())}-->
				| <a href="message_send.aspx?recipient=<%=dr["name"]%>&TB_iframe=true&height=335&width=530" id="msgsend1" class="thickbox" title="发送短消息">
					发短信</a> | <a onclick="AddFrend('additem.aspx','item=friend&style=new_style&uid=<%=dr["UserId"]%>&name=<%=dr["name"]%>')" style="cursor:hand">
					加为好友</a><!--{endif}-->
			</td>
		</tr>
		<tr>
			<td class="inforight" valign="top">
				<!--{if(dr["depth"].ToString() == "1" && "" != signedpic)}-->
				<div class="ntprint" onclick="this.style.display=<%=( "" == signedpic ? "'none'" : "''")%>;" style="color:red"><img src="<%=(Dvbbs.Utils.Config.uploadfiles + signedpic)%>" alt="点击关闭鉴定图章" title="点击关闭鉴定图章" />
					<br>
					<b>鉴定次数（<%=signedcount%>）</b>，<a href="topic.aspx?topicid=<%=TopicID%>&signed=true" target="_self"  style="color:red"><b>顶</b></a></div>
				<!--{endif}-->
				<!--{if(dr["depth"].ToString() == "1")}-->
				<h1><%=(""==IconId?"":"<img src=\"templates/"+CurrentTemplateName + "/images/editor/topicface/face"+IconId+".gif\" />")%>
					<%=TopicTitle%>
				</h1>
				<!--{endif}-->
				<div id="Msg<%=dr["id"]%>" name="content" class="bitem" style="<%=mFontSize%><%=mLineHight%> ;overflow:hidden; width:100%;">
					<%=dr["content"]%>
				</div>
			</td>
		</tr>
		<tr>
			<td class="signed">
				<!--{if((dr["signature"].ToString().Length >0) || dr["signature"].ToString().Trim() != "")}-->
				<img src="templates/<%=CurrentTemplateName%>/images/sigline.gif">
				<p><%=dr["signature"]%></p>
				<!--{endif}-->
				<br />
				<img src="templates/<%=CurrentTemplateName%>/images/mini_query.gif" onclick="openScript('vpi.aspx?topicid=<%=TopicID%>&repid=<%=dr["id"]%>&pstr=<%=_currentposttable%>&topreid=<%=dr["id"]%>&a=0',600,450)" style="cursor:pointer" />&nbsp; 
				悬赏金币帖，共送出 <b class="fon1">
					<%=repostmoney%>
				</b>个金币<br />
				<!--{if(dr["repostmoney"].ToString() != "-1" && user.Name.ToLower()==topicAuthor.ToLower())}-->
				<div id="mthePostend" name="mthePostend" style="float:left;padding:5px;">
					<input type="button" value=" 结 帖 " onclick="thePostend('vpi.aspx?topicid=<%=TopicID%>&repid=<%=dr["id"]%>&pstr=<%=_currentposttable%>&topreid=<%=dr["id"]%>&a=3','mthePostend')" class="button_off" onFocus="IEvent('focus',this)" onBlur="IEvent('blur',this)" onMouseOver="IEvent('mouseover',this)"	onMouseOut="IEvent('mouseout',this)" />
					<!--{else}-->
					<!--{if(dr["repostmoney"].ToString() == "-1")}-->
					<!--<%rewordred=true;%>-->
					<font color="red">&nbsp;&nbsp;已结帖</font> 
					<!--{endif}-->
					<!--{endif}-->
				</div>
			</td>
		</tr>
		<tr>
			<td class="usermenu2">
				<div style="float:left">
					<!--{if(null != AdsSetting && AdsSetting.IsEnableRand)}-->
					<!--{if(AdsSetting.TimeRand)}-->
					<!--<%
					        Random rnd=new Random();
					        int rndlength=AdsSetting.CodeRandList.Length;					        
					    %>-->
					<%=AdsSetting.CodeRandList[rnd.Next(rndlength)]%>
					</script> 
					<!--{endif}-->
					<!--{endif}-->
				</div>
				<div class="td1" style="float:right;text-align:right;">
					<font class="fon2" alt="发表时间">
						<%=dr["addtime"]%>
					</font>
					&nbsp;&nbsp;<a href="topicother.aspx?action_type=prosecution">举报</a>
					<!--{if(!user.IsGuest)}-->
					<!--{if(!IsLock)}-->
					&nbsp;&nbsp;<a href="<%=addreply%>">回复</a>&nbsp;&nbsp;<a href="topic_addreply.aspx?replyid=<%=dr["id"]%>&amp;topicid=<%=TopicID.ToString()%>">	引用</a> 
					<!--{endif}-->
					<!--{endif}-->
					<!--{if(user.GetUserLimitValue((int)PopStrategyEnum.AllowMask) == "1" )}-->
					 &nbsp;&nbsp;<a href="topic_action.aspx?topicid=<%=base.TopicID.ToString()%>&amp;replyid=<%=dr["id"]%>&amp;action=lonemask">屏蔽该帖</a>
					 <!--{endif}-->		
					 <!--{if(user.GetUserLimitValue((int)PopStrategyEnum.AllowDisMask) == "1" )}-->					 
					 &nbsp;&nbsp;<a href="topic_action.aspx?topicid=<%=base.TopicID.ToString()%>&amp;replyid=<%=dr["id"]%>&amp;action=dislonemask">解除该帖屏蔽</a>
					<!--{endif}-->
					<!--{if( user.GetUserLimitValue((int)PopStrategyEnum.AllowEditTopic) == "1" || (user.Name != "游客" &&  dr["name"].ToString().ToLower()==user.Name))}-->
					<!-- {if (1 == _TplPager.CurrentPage && (null == EditUrl || string.Empty == EditUrl))} -->
					&nbsp;&nbsp;<a href="<%=EditUrl="topic_edit.aspx?action=edittopic&replyid="+ dr["id"].ToString()%>&amp;topicid=<%=TopicID.ToString()%>">编辑</a>
					<!-- {else} -->
					&nbsp;&nbsp;<a href="<%=EditUrl="topic_edit.aspx?action=editreply&replyid="+ dr["id"].ToString()%>&amp;topicid=<%=TopicID.ToString()%>">编辑</a>
					<!-- {endif} -->
					<!--{else}-->
					<!--<% EditUrl="topic_edit.aspx"; %>-->
					<!--{endif}-->
					<!--{if( user.GetUserLimitValue((int)PopStrategyEnum.AllowDeleteTopic) == "1" )}-->
					<!-- {if (1 == _TplPager.CurrentPage && (null == DeleteUrl || string.Empty == DeleteUrl))} -->
					&nbsp;&nbsp;<a href="<%=(DeleteUrl = "topic_delete.aspx?dept=1&topicid=" + dr["topicid"].ToString())%>">删除</a> 
					<!-- {else} -->
					&nbsp;&nbsp;<a href="<%="topic_delete.aspx?dept=1&topicid=" + dr["topicid"].ToString() +"&replyid=" + dr["id"].ToString()%>">删除</a> 
					<!-- {endif} -->
					<!--{endif}-->
					<!--{if(IsAdmin)}-->
					&nbsp;&nbsp;<span title="<%=dr["ip"]%>">IP</span>
					<!--{endif}-->
					&nbsp;&nbsp;<a href="topic.aspx?topicid=<%=dr["topicid"].ToString()%>#" title="回到顶部"><img src="templates/<%=CurrentTemplateName%>/images/gotop.gif" alt="顶端" /></a>&nbsp;&nbsp;
				</div>
				<%=dr["ads"]%>
			</td>
		</tr>
	</table>
	<!--<%break;%>-->
	<!--{endforeach}-->
	<!--主体内容循环结束-->
	<br />
	<div class="tablebox border">
		<table width="100%" border="0" cellpadding="5" cellspacing="0">
			<tr>
				<th>
					主题回复</th>
			</tr>
		</table>
		<!--主体内容循环开始-->
		<div id="action_998871" name="action_998871" style="display:block">
			<!--{if(1 == DisplayContent.Length)}-->
			<div style="padding:5px;text-align:center">当前活动还没有回复。</div>
			<!--{endif}-->
			<!--{foreach (System.Data.DataRow dr in DisplayContent)} -->
			<!--{if(dr["depth"].ToString() == "1")}-->
			<!--<% continue;%>-->
			<!--{endif}-->
			<table class="mainbox tableborder" cellspacing="0" cellpadding="0" name="loopedreplies">
				<tr>
					<td style="border-top:0px;background:#F3F6FA;height:25px;border-bottom:1px solid #D7DCDD;">
						<div style="float:left">
							&nbsp;&nbsp;<a href="message_send.aspx?recipient=<%=dr["name"]%>&TB_iframe=true&height=335&width=530" class="thickbox" title="发送短消息"><img src="templates/<%=CurrentTemplateName%>/images/msg.gif" alt="发送短消息"/></a>
							<span class="t2">
								<%=dr["depth"]%>
							</span>
							楼 <a href="user_info.aspx?name=<%=dr["name"]%>" title="查看用户个人信息"><b>
									<%=dr["name"]%>
								</b></a><font class="fon2">[<%=dr["addtime"]%>] 说：</font>
						</div>
						<div class="td1" style="float:right">
							&nbsp;&nbsp;<a href="topicother.aspx?action_type=prosecution">举报</a> 
							<!--{if(!IsLock)}-->
							&nbsp;&nbsp;<a href="<%=addreply%>">回复</a>&nbsp;&nbsp;<a href="topic_addreply.aspx?replyid=<%=dr["id"]%>&amp;topicid=<%=TopicID.ToString()%>">引用</a>
							<!--{endif}-->
							<!--{if(user.GetUserLimitValue((int)PopStrategyEnum.AllowMask) == "1" )}-->
							&nbsp;&nbsp;<a href="topic_action.aspx?topicid=<%=base.TopicID.ToString()%>&amp;replyid=<%=dr["id"]%>&amp;action=lonemask">屏蔽该帖</a>
							<!--{endif}-->	
							<!--{if(user.GetUserLimitValue((int)PopStrategyEnum.AllowDisMask) == "1" )}-->
							&nbsp;&nbsp;<a href="topic_action.aspx?topicid=<%=base.TopicID.ToString()%>&amp;replyid=<%=dr["id"]%>&amp;action=dislonemask">解除该帖屏蔽</a>
							<!--{endif}-->	
							<!--{if( user.GetUserLimitValue((int)PopStrategyEnum.AllowEditReply) == "1"|| (user.Name != "游客" &&  dr["name"].ToString().ToLower()==user.Name))}-->
							<!-- {if (1 == _TplPager.CurrentPage && (null == EditUrl || string.Empty == EditUrl))} -->
							&nbsp;&nbsp;<a href="<%=(EditUrl = "topic_edit.aspx?action=edittopic&replyid=" + dr["id"].ToString())%>&amp;topicid=<%=TopicID.ToString()%>">编辑</a> 
							<!-- {else} -->
							&nbsp;&nbsp;<a href="<%="topic_edit.aspx?action=editreply&replyid=" + dr["id"].ToString()%>&amp;topicid=<%=TopicID.ToString()%>">编辑</a> 
							<!-- {endif} -->
							<!--{endif}-->
							<!--{if( user.GetUserLimitValue((int)PopStrategyEnum.AllowDeleteReply) == "1")}-->
							<!-- {if (1 == _TplPager.CurrentPage && (null == DeleteUrl || string.Empty == DeleteUrl))} -->
							&nbsp;&nbsp;<a href="<%=(DeleteUrl = "topic_delete.aspx?dept=0&topicid=" + dr["topicid"].ToString() +"&topicid=" + dr["topicid"].ToString())%>">删除</a> 
							<!-- {else} -->
							&nbsp;&nbsp;<a href="<%="topic_delete.aspx?dept=0&topicid=" + dr["topicid"].ToString() +"&replyid=" + dr["id"].ToString()%>">删除</a> 
							<!-- {endif} -->
							<!--{endif}-->
							<!--{if(IsAdmin)}-->
							&nbsp;&nbsp;<span title="<%=dr["ip"]%>">IP</span>
							<!--{endif}-->
							&nbsp;&nbsp;<a href="topic.aspx?topicid=<%=dr["topicid"].ToString()%>#"><img src="templates/<%=CurrentTemplateName%>/images/gotop.gif" alt="顶端" /></a>&nbsp;&nbsp;
						</div>
					</td>
				</tr>
				<tr>
					<td style="background-color:#FFFFFF;">
						<div class="postcontent">
							<%=dr["content"]%>
						</div>
					</td>
				</tr>
				<tr>
					<td align="right" style="background-color:#FFFFFF;">
						<!--{if(!user.IsGuest && (topicAuthor.ToLower() == user.Name && ! rewordred && dr["name"].ToString()!=topicAuthor))}-->
						&nbsp;<a href="vpi.aspx?topicid=<%=TopicID%>&repid=<%=dr["id"]%>&pstr=<%=_currentposttable%>&topreid=<%=TopReplayId%>&a=1" target="_blank">悬赏金币</a>
						&nbsp; 
						<!--{endif}-->
						&nbsp;&nbsp;<font class="fon2">获得 <b class="fon1">
								<%=dr["repostmoney"]%>
							</b>个金币</font> &nbsp;&nbsp;<img src="templates/<%=CurrentTemplateName%>/images/mini_query.gif" onclick="openScript('vpi.aspx?topicid=<%=TopicID%>&repid=<%=dr["id"]%>&pstr=<%=_currentposttable%>&topreid=<%=TopReplayId%>&a=0',600,450)" style="cursor:pointer" alt="查看该信息"/>
						&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
			</table>
			<br />
			<!--{endforeach}-->
		</div>
	</div>
</table>
<script language="javascript">
function openScript(url, width, height)
{
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}
</script>
<script>
var Request = new Object();
Request.send = function(url, method, callback, data)
{
	var req;
	if (window.XMLHttpRequest)
	{
		req = new XMLHttpRequest();
		if (req.overrideMimeType)
		{ 
			req.overrideMimeType("text/html"); 
		} 
	}
	else if (window.ActiveXObject)
	{
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}

	req.onreadystatechange = function() {
		//alert(req.readyState);
		if (req.readyState == 4)
		{
			if (req.status < 400)
			{
				(method=="POST") ? callback(req) : callback(req,data);
			}
			else
			{
				//if(req.status!=12002)
				//alert("There was a problem loading data :\n" + req.status+ "/" + req.statusText);
			}
		}
	}

	if (method=="POST")
	{
		req.open("POST", url, true);
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		req.send(data);
	}
	else
	{
		req.open("GET", url, true);
		req.send(null);
	}
	return req;
}

Request.sendPOST = function(url, data, callback){
	Request.send(url, "POST", callback, data);
}
Request.sendGET = function(url, callback, args){	
	return Request.send(url, "GET", callback, args);
}

function cend(response,data)
{
	if('success' == response.responseText)
	{
		$(data).innerHTML = '<font color=red>&nbsp;&nbsp;已结帖</font>';
	}
	else
	{
		$(data).innerHTML = '&nbsp;&nbsp;处理出错，请稍候再试。';
	}
}
function thePostend(url, div)
{
	$(div).innerHTML = "&nbsp;&nbsp;action...";
	Request.sendGET(url,cend,div);
}
</script>
