<%@ Page language="c#" Codebehind="SurveyShow.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.SurveyShow" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<!--#include file="../../inc/encoding.inc"-->
		<title>网络调查,<%=detail.Title %></title>
		<!--#include file="../../inc/head.inc"-->
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/Survey.js" type="text/javascript"></script>
	</head>
	<body>
	    <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="1">
	        <tr>
	            <td><div><%=detail.Description %></div></td>
	        </tr>
	    </table>
		<form id="form1" method="post" action="SurveyStat.aspx" target="_blank">
		    <asp:Repeater id="rptSurveyItem" runat="server">
                <ItemTemplate>
                    <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="1" style="text-align:left;">
                        <tr>
                            <td>
                                <span class='title_<%# DataBinder.Eval(Container.DataItem,"SurveyItemID") %>'><%# DataBinder.Eval(Container.DataItem,"Title") %></span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <ul style="position:relative; text-align:left;">
                                    <asp:Repeater ID="rptOptions" runat="server" DataSource='<%# BindOptions((int)DataBinder.Eval(Container.DataItem,"SurveyItemID")) %>'>
                                        <ItemTemplate>
                                            <li style="float:left; width:22%;list-style-type:none;">
                                                <input type='<%# GetChoiceType((int)DataBinder.Eval(Container.DataItem,"SurveyItemID")) %>' name='item_<%# DataBinder.Eval(Container.DataItem,"SurveyItemID") %>' value='<%# DataBinder.Eval(Container.DataItem,"SurveyOptionID") %>' />
                                                <%# DataBinder.Eval(Container.DataItem,"OptionName") %>
                                            </li>
                                        </ItemTemplate>
                                    </asp:Repeater>
	                             </ul>
                            </td>
                        </tr>
                    </table>
                    <br />
                </ItemTemplate>
            </asp:Repeater>
            
            <input type="submit" name="submit" value="提交" />
            <input name="button" type="button" onClick="javascript:window.open('SurveyStat.aspx?SID=<%=Request.QueryString["SID"] %>');" value = "查看" />
            <input type="hidden" name="surveyID" value='<%=Request.QueryString["SID"] %>' />
            <input type="hidden" name="items" value='<%=items %>' />
		</form>
	</body>
</html>
