<!--#include file="_header.html"-->
<!--<%
if(ViewAction=="viewresult")
{
%>-->
<br />
<table cellspacing="0" cellpadding="0" class="tablebox border"  id="Table2" enableViewState="false" > 
	<tr id="list_title" style="width:100%">
		<th width="30%" align=left><b>问题</b></th>
		<th width="40%" align=left><b>选项</b></th>
		<th width="30%" align="left"><b>得票</b></th>
	</tr>
	<!--<%
	int objid=0;
	string votetitle,votetype,votecontent;
	
	foreach(string voteitem in this.GetVoteItem(VoteID))
	{
		if(Vote.VoteType==2)
		{
			votetitle=voteitem.Replace("@@","@").Split('@')[0];
			votetype=voteitem.Replace("@@","@").Split('@')[1];
			votecontent=voteitem.Replace("@@","@").Split('@')[2];   
		}
		else
		{
			votetype="";
			votetitle=voteitem.Replace("@@","@").Split('@')[0];     
			votecontent=voteitem.Replace("@@","@").Split('@')[1];  
		}
	%>-->
	<tr>
    <td align=left>
			<!--{if(Vote.VoteType==2)}-->
				[<!--{if(votetype=="0")}-->单选<!--{endif}-->
				<!--{if(votetype=="1")}-->多选<!--{endif}-->
				<!--{if(votetype=="2")}-->问答<!--{endif}-->]
			<!--{endif}--><%=votetitle%>
    </td>
    <td align=left>
    <!--<% 
			string[] voteData=votecontent.Split('$');
			if(Vote.VoteType==2)
			{
				for(int i=0;i<voteData.Length-1;i++)
				{
					if(votetype != "2")
						Response.Write("选项"+(i+1)+"：" + voteData[i] + "<br/>");  
					else if(votetype == "2")
						Response.Write("答案："+ voteData[i] +"<br/>")       ;
				}
			}
			else
			{
				for(int i=0;i<voteData.Length-1;i++)
				{
					Response.Write("<span style='color:red;'>选项"+(i+1)+"：</span>"+voteData[i]+"<br/>"); 
				}
		}
    %>-->   
    </td>
    <td align="left">
			<!--<%
						 
			for(int j=0;j<voteData.Length-1;j++)
			{
				if(Vote.GetVoteTotal(objid)==0)
				{
					Response.Write("还没有人投过票!");
				}
				else 
				{
				 
				
					%>-->
				    <img src="templates/<%=CurrentTemplateName%>/images/bar/bar3.gif" height="11" width="<%=(Int32.Parse(Vote.GetTickets(objid)[j])) * 85 / Vote.GetVoteTotal(objid)%>%" align="absmiddle" />
					<span class="t2" style="padding-left:0px;font-weight:bold;font-family:tahoma;font-size:11px;">&nbsp;<%=Vote.GetTickets(objid)[j].Trim()%></span>票(<span class="t2 small"><%=(Int32.Parse(Vote.GetTickets(objid)[j])) * 100 / Vote.GetVoteTotal(objid)%>%</span>)
					<br/>
				<!--<%
				}
			}%>-->
    </td>
   </tr>
  <!--<%objid=objid+1;
  		}
		
  %>-->  
 </table>
<!--<%
}else
{
%>-->
<!--<%
if(ViewAction=="myinjoin")
{
%>-->
	<!--{if(Get("header")==string.Empty)}-->
<br />	
  <table class="tablebox border" cellspacing="0" cellpadding="0" border="0" ID="Table7">
	<tr height="22">
	  <th colspan="5"><%=user.Name%>,欢迎您，以下是您参与的调查</th>
	</tr>
	</table>       
  <!--{endif}-->  
<!--{if(Get("header")==string.Empty)}-->
<table width="100%" cellspacing="0" class="tablebox border" border="0" id="Table9" enableViewState="false">
 <tr class="tdcolor">
 <th align=left width=60%>
 <b>调查主题</b>
  </th>
  <th width=20%><b>发起人</b></th>
  <th width=20%><b>发起时间</b></th>
 </tr>
 <!--{else}-->
 <table cellspacing="0" class="tablebox border" cellpadding="0" border="0" align="left" width="100%" ID="Table1">	
 <tr class="td_title">
		<td width="50%">调查主题</td>
		<td align="center"  width="25%">发起人</td>    
        <td align="center"  width="25%">发起时间</td>
  </tr>
 <!--{endif}-->
 
	<!--<%
	System.Data.DataTable vdt=GetVoteID(UID);
	for(int i=0;i<vdt.Rows.Count;i++)
	{
		System.Data.DataTable tdt=GetTopicInfo(Int32.Parse(vdt.Rows[i]["voteid"].ToString()));
		%>-->
		<!--{if(Get("header")==string.Empty)}-->
		<tr  height="22" >
		<!--{else}-->
		  <tr  height="22" class="dasedline">
		<!--{endif}-->
			<td><a target="_blank" href='topic.aspx?topicid=<%=tdt.Rows[0]["topicid"]%>'><%=tdt.Rows[0]["title"]%></a></td>
			<td align="center"><a href="user_info.aspx?name=<%=tdt.Rows[0]["postusername"]%>" target="_blank"><%=tdt.Rows[0]["postusername"]%></a></td>
			<td align="center"><%=tdt.Rows[0]["dateandtime"]%></td>
		</tr>     
	<!--<%
	}
	%>-->
	<tr class="td_title">
	  <td colspan="3">	    
	<!--#include file="_temppager.htm"-->
	  </td>
	</tr>
	</table> 
<!--<%
}
else
{
if(OnlyAll==false)  
{
%>-->
<br />
<table cellspacing="0" class="tablebox border"  id="Table3" enableViewState="false">  	
	<tr>
		<th id="list_title" style="width:100%">
			<div style="float:left"><b><%=user.Name%>,欢迎您参与这次问卷调查!</b></div>
			<div style="float:right">以下是您需要的问卷调查信息!<img src='templates/<%=CurrentTemplateName%>/images/folder_open.gif' align='absmiddle' style='cursor:hand' onclick="javascript:collapse(this, 'votetable');" /></div>
		</th>
	</tr>
	<tr>
		<td	 align=center>
			<a target="_blank" href="topic.aspx?topicid=<%=TopicId%>">返回主题帖</a>&nbsp;&nbsp;|&nbsp;&nbsp;
			<a href="vote_content.aspx?uid=<%=UID%>&topicid=<%=TopicId%>&voteid=<%=VoteID%>&action=viewall">得分排行榜</a>&nbsp;&nbsp;|&nbsp;&nbsp;
			<a href="vote_content.aspx?uid=<%=UID%>&action=viewvote&topicid=<%=TopicId%>&voteid=<%=VoteID%>">查看本问卷分值设置</a>&nbsp;&nbsp;|&nbsp;&nbsp;				
			<a href="vote_content.aspx?uid=<%=UID%>&voteid=<%=VoteID%>&topicid=<%=TopicId%>&action=allinjoin">我参与过的调查</a>
		</td>	
	</tr>
	<tr>
		<td align="center" style="line-height:22px;">
		<!--<% System.Data.DataTable idt=GetVoteInfo();%>-->
		<!-- {if (Int32.Parse(idt.Rows[0]["days"].ToString()) < 1)} -->
			本调查永不过期! 
		<!-- {else} -->
			本调查限<%=idt.Rows[0]["days"].ToString()%>天，
			<!--<%						  
				DateTime mAddTime = System.DateTime.Parse(idt.Rows[0]["addtime"].ToString());
				int  mLeftDays	= mAddTime.Date.Subtract(DateTime.Today).Days+Int32.Parse(idt.Rows[0]["days"].ToString());
			%>-->
			<!-- {if (1 == mLeftDays)} -->
				今天是期限的最后一天。
			<!-- {else if(mLeftDays<=0)} -->
			    此次调查已过期。
			<!--{else}-->
				离截止日期还有<%=mLeftDays%>天。
			<!-- {endif} -->				
		<!-- {endif} -->	
		<br/>		
			参与此次调查要求您达到条件-金钱：<span class="fon1"><b><%=idt.Rows[0]["uwealth"].ToString()%></b></span>
			积分：<span class="fon1"><b><%=idt.Rows[0]["limitexp"].ToString()%></b></span>
			文章数：<span class="fon1"><b><%=idt.Rows[0]["uarticle"].ToString()%></b></span>
			威望值：<span class="fon1"><b><%=idt.Rows[0]["upower"].ToString()%></b></span>
		</td>
	</tr>
</table>
<!--<%
if(this.ViewAction=="viewinfo") //详细得分情况
{
%>-->
<br/>
<table cellspacing="0" class="tablebox border"  id="votetable" enableViewState="false">  	
	<tr id="list_title" style="width:100%">
		<th width="40%" align=center	>
			<b>用户</b>：<a href="user_info.aspx?name=<%=userName%>" class="fon1"><%=userName%></a></th>	
		<th>
			<b>总得分</b>：<font class="fon1"><%=GetVoteScore()%></font>
		</th>	
		<th>
			<b>参与时间</b>：<font class="fon3"><%=GetVoteTime()%></font></th>			
	</tr>
	
	<!--<%
	  int objid=0;
	  foreach(string voteitem in this.GetVoteItem(VoteID))
	  {
	    string votetitle=voteitem.Replace("@@","@").Split('@')[0]; //大标题
	    string votetype=voteitem.Replace("@@","@").Split('@')[1]; //类型
	    string votecontent=voteitem.Replace("@@","@").Split('@')[2];  //小标题
	    string votescore=voteitem.Replace("@@","@").Split('@')[3]; //得分	      
	%>-->
	<tr>
		<td width="40%"><font color=blue><%=objid+1%></font>&nbsp;&nbsp;.&nbsp;<%=votetitle%></td>
		<td width="60%" colspan="2">
	    <!--<%	      
	       string votepos=this.GetVoteOption().ToString().Replace("$$","$").Split('|')[objid]; //获取投了哪一项	   
	       if(votetype=="0")
	       {	     	           
	            Response.Write("单选: "+votecontent.Replace("$$","$").Split('$')[Int32.Parse(votepos)]);
	            Response.Write("&nbsp;&nbsp;---得分：<font color=red>"+votescore.Replace("$$","$").Split('$')[Int32.Parse(votepos)]+"</font>");
	       }
	       if(votetype=="1")
	       {
	         string[] vote_pos=votepos.Replace("$$","$").Split('$');
	          for(int i=0;i<vote_pos.Length-1;i++)
	          {	          
	             Response.Write("多选：" + votecontent.Replace("$$","$").Split('$')[Int32.Parse(vote_pos[i])]);
	             Response.Write("&nbsp;&nbsp;---得分: <font color=red>"+votescore.Replace("$$","$").Split('$')[Int32.Parse(vote_pos[i])]+"</font>");
	             Response.Write("<br/>");
	          }
	       }
	       if(votetype=="2")
	       {
	     
	          Response.Write("用户回答:<br/>");
	          Response.Write("<div id='d1'style='border:1px dashed blue;padding:3px;background:#FAFCC7;'>"+votepos+"</div><br/>");
	          Response.Write("答案：<br/>");
	          Response.Write("<div id='d1'style='border:1px dashed red;padding:3px;background:#FAFCC7;'>"+votecontent.Replace("$","")+"</div><br/>");
	          
	       }
	    %>-->
	 </td>
	</tr>
	<!--<%
		objid=objid+1;
		}
	%>-->	
</table> 
<!--<%
 }
 else if(ViewAction=="viewall")   //得分排行　榜
 {
 %>-->
 <br/>
 <table cellspacing="0" cellpadding="0" class="tablebox border"  id="votetable" enableViewState="false"> 
	<tr id="list_title" class="list5" style="width:100%">	
		<th width="30%" align=center>
			<b>用户名</b>
		</th>
		<th width="40%" align=center>
			<b>得分(排行榜)</b>
		</th>
		<th width="30%" align=center>
			<b>所选择项目</b>
		</th>						
	</tr>	
	<!--<% 
	  System.Data.DataTable sdt=this.GetVoteScore(VoteID);
	  for(int i=0;i<sdt.Rows.Count;i++)
	  {
	%>-->
		<tr>	
			<td align=center>
				<a href="user_info.aspx?name=<%=GetUserName(Int32.Parse(sdt.Rows[i]["userid"].ToString()))%>"><%=GetUserName(Int32.Parse(sdt.Rows[i]["userid"].ToString()))%></a>
			</td>	   
			<td align=center>
				<span style="color:red;margin-right:5px;"> <%=sdt.Rows[i]["votescore"].ToString()%></span><span class="fon2">[<%=i+1%>]</span>
			</td>
			<td align=center>
					<a href="vote_content.aspx?topicid=<%=TopicId%>&voteid=<%=VoteID%>&uid=<%=Int32.Parse(sdt.Rows[i]["userid"].ToString())%>&action=viewinfo">
					查看该用户问卷调查信息</a>
			</td>	   
		</tr>
	<!--<%
		} 
 %>-->
</table> 
<!--{if((_TplPager.Total/_TplPager.Per)>1)}-->
<!--#include file="_temppager.htm"-->
<!--{endif}-->
<!--<%
}	 
else if(ViewAction=="viewvote") //问卷分会设置
{
 %>-->
 <br/>
 <table cellspacing="0" cellpadding="0" class="tablebox border"  id="votetable" enableViewState="false"> 
	<tr id="list_title" style="width:100%">
		<th width="30%" align="left"><b>调查问题</b></th>
		<th width="40%" align="left"><b>调查选项</b></th>
		<th width="30%" align="left"><b>得分设置</b></th>
	</tr>
   <!--<%
    foreach(string voteitem in this.GetVoteItem(VoteID))
   {
      string votetitle=voteitem.Replace("@@","@").Split('@')[0];
      string votetype=voteitem.Replace("@@","@").Split('@')[1];
      string votecontent=voteitem.Replace("@@","@").Split('@')[2];
      string votescore=voteitem.Replace("@@","@").Split('@')[3];
    %>-->
    <tr>
			<td align=left>
				[<!--{if(votetype=="0")}-->单选<!--{endif}-->
				<!--{if(votetype=="1")}-->多选<!--{endif}-->
				<!--{if(votetype=="2")}-->问答<!--{endif}-->]
				<%=votetitle%></td>
			<td >
				<!--<%
				string[] voteData=votecontent.Split('$');
				for(int i=0;i<voteData.Length-1;i++)
				{
					if(votetype!="2")
					Response.Write("选项"+(i+1)+"："+voteData[i]+"<br/>");  
					else if(votetype=="2")
					Response.Write("答案："+voteData[i]+"<br/>")       ;
				}
				%>-->    
    </td>
    <td align=left>
			<!--<%
			string[] voteScore=votescore.Split('$');
			for(int j=0;j<voteScore.Length-1;j++)
			{
				Response.Write("分值："+voteScore[j]+"<br/>");
			}
			%>-->
    </td>
	</tr> 
  <!--<%
  }
  %>-->  
 </table>
 <!--<%
 }
 else if(ViewAction=="allinjoin")  //参与过的调查
 {
 %>-->
	<br/>
	<table cellspacing="0" cellpadding="0" class="tablebox border"  id="votetable" enableViewState="false"> 
	<tr id="list_title"  style="width:100%">
		<th align="left" width="60%"><b>主题</b></th>
		<th align="left" width="20%"><b>发帖人</b></th>
		<th align="left" width="20%"><b>发帖时间</b></th>
	</tr> 
	<!--<%
		System.Data.DataTable vdt=GetVoteID(UID);
		for(int i=0;i<vdt.Rows.Count;i++)
		{
			System.Data.DataTable tdt=GetTopicInfo(Int32.Parse(vdt.Rows[i]["voteid"].ToString()));
		%>-->
		<tr>  
			<td align="left"><a target="_blank" href='topic.aspx?topicid=<%=tdt.Rows[0]["topicid"]%>'><%=tdt.Rows[0]["title"]%></a></td>
			<td align="left"><a href="user_info.aspx?name=<%=tdt.Rows[0]["postusername"]%>" target="_blank"><%=tdt.Rows[0]["postusername"]%></a></td>
			<td align="left"><%=tdt.Rows[0]["dateandtime"]%></td>
		</tr>     
		<!--<%
		}
		%>-->
	</table>
	<!--{if((_TplPager.Total/_TplPager.Per)>1)}-->
		<!--#include file="_temppager.htm"-->
	<!--{endif}-->
	<!--<%
		} 
}
else               //如果是单独的投票时
{
%>-->
<br />
<table cellspacing="0" cellpadding="0" class="tablebox border"  id="Table4" enableViewState="false"> 
	<tr>
		<th id="list_title" style="width:100%">
			<div style="float:left"><b><%=user.Name%>,欢迎您参与这次投票</b></div>
			<div style="float:right">以下是您需要的信息,此投票不统计得分!<img src='templates/<%=CurrentTemplateName%>/images/folder_open.gif' align='absmiddle' style='cursor:hand' onclick="javascript:collapse(this, 'votetable');" /></div>
		</th>
	</tr>
	<tr>
		<td	 align=center>
			<a target="_blank" href="topic.aspx?topicid=<%=TopicId%>">返回主题帖</a>&nbsp;&nbsp;|&nbsp;&nbsp;
			<a href="vote_content.aspx?uid=<%=UID%>&voteid=<%=VoteID%>&topicid=<%=TopicId%>&action=myinjoin">我参与过的调查</a>
		</td>	
	</tr>
	<tr>
	<td align="center" style="line-height:22px;">
	<!--<% System.Data.DataTable idt=GetVoteInfo();%>-->
	<!-- {if (Int32.Parse(idt.Rows[0]["days"].ToString()) < 1)} -->
		本次投票永不过期。
		<!-- {else} -->
		本调查限<%=idt.Rows[0]["days"].ToString()%>天，
		<!--<%
			DateTime mAddTime=System.DateTime.Parse(idt.Rows[0]["addtime"].ToString());
			int  mLeftDays	= mAddTime.Date.Subtract(DateTime.Today).Days + Int32.Parse(idt.Rows[0]["days"].ToString());
		%>-->
		<!-- {if (1 == mLeftDays)} -->
			今天是期限的最后一天。
		<!-- {else} -->
				离截止日期还有<%=mLeftDays%>天。
		<!-- {endif} -->				
	<!-- {endif} -->
	<br/>		
			参与此次投票要求您达到条件-金钱：<span class="fon1"><b><%=idt.Rows[0]["uwealth"].ToString()%></b></span>
			积分：<span class="fon1"><b><%=idt.Rows[0]["limitexp"].ToString()%></b></span>
			文章数：<span class="fon1"><b><%=idt.Rows[0]["uarticle"].ToString()%></b></span>
			威望值：<span class="fon1"><b><%=idt.Rows[0]["upower"].ToString()%></b></span>
		</td>
</tr>
</table>
<br/>
<table cellspacing="0" cellpadding="0" class="tablebox border"  id="votetable" enableViewState="false"> 
	<tr>
		<th id="list_title" >参与投票的会员</th>
	</tr>
	<!--{foreach(string uname in GetAllUsers().Split(','))}-->
	<tr>
		<td><a href="user_info.aspx?name=<%=uname%>" target="_blank"><%=uname%></a></td>
	</tr>
	<!--{endforeach}-->
</table> 
<!--<%}}}%>-->

<!--#include file="_footer.html"-->


