<%@ page language="C#" autoeventwireup="true" inherits="Exam_User_Exam, App_Web_y-mubyy6" debug="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>考试</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/StyleSheet.css" rel="stylesheet" />
    <link href="../css/pager.css" rel="stylesheet" type="text/css" />

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script src="../jquery-1.5.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
    
    
        <asp:Button ID="Button1" CssClass="btn" runat="server" Text="返回" OnClick="Button1_Click"   style="display:none"/>
    
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="text-align: center; padding-bottom: 10px;">
                    <asp:Label ID="paper_title" runat="server" Font-Bold="true" Font-Names="宋体" Font-Size="15"
                        ForeColor="Black" Text=""></asp:Label>
                    <asp:Label ID="paper_score" runat="server" Font-Bold="true" Font-Names="宋体" Font-Size="15"
                        ForeColor="red" Text=""></asp:Label>
                </div>
                <div style="text-align: center;">
                </div>
                    <asp:DataList ID="paper_list" runat="server" OnItemDataBound="paper_list_ItemDataBound"
                        Width="75%">
                        <ItemTemplate>
                            <table border="0" cellpadding="3" cellspacing="2" width="100%">
                                <tr>
                                    <td align="left">
                                      
                                         
                                 
                                        <asp:Label ID="Label2" runat="server" Font-Bold="true" Font-Size="13" ForeColor="Black"
                                            Text='<%# "第"+(Container.ItemIndex + 1 + (int.Parse(page_indexpage.Text)-1) * 20)+"部分 "+ Eval("Typ_name") +" ("+ Eval("TidTitle") +")  共"+Eval("tishu") +"小题，每题"+Eval("Tid_Score") +"分"   %>'></asp:Label>
                                        <asp:HiddenField ID="score" runat="server" Value='<%# Eval("Tid_Score") %>' />
                                            
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:DataList ID="DataList1" runat="server" DataKeyField="Exa_Topid" OnItemDataBound="DataList1_ItemDataBound"
                                            Width="100%">
                                            <ItemTemplate>
                                              
                                                <table border="0" cellpadding="4" cellspacing="5" style="background-color: #f7fff7"
                                                    width="100%">
                                                    <tr>
                                                        <td style="border-right: darkgray 1px dashed; border-top: darkgray 1px dashed; border-left: darkgray 1px dashed;
                                                            border-bottom: darkgray 1px dashed;">
                                                            <div style="padding-top: 5px; padding-left: 10px">
                                                                <%--  <%# Eval("Topic_no") %>--%>
                                                               <%-- <%#Container.ItemIndex + 1 + (int.Parse(page_indexpage.Text)-1) * 20%>--%>
                                                                 <asp:Label ID="Label4" runat="server" Text=""></asp:Label>
                                                                 <asp:Label ID="Label1" runat="server"  Text=""></asp:Label>
                                                                <asp:HiddenField ID="fill_count"  Value="0" runat="server" />
                                                                 <asp:Panel ID="Panel4" runat="server" style="display:inline ">
                                                                 <asp:Label ID="l0" runat="server" Text=""></asp:Label>
                       <asp:TextBox ID="t0" runat="server" AutoPostBack="true" OnTextChanged="t0_TextChanged"
                           Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"></asp:TextBox>
                                                                 <asp:Label ID="l1"  Visible="false"  runat="server" Text=""></asp:Label>
                                    <asp:TextBox ID="t1" runat="server" CssClass="fill" OnTextChanged="t1_TextChanged"
                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                        Visible="false" AutoPostBack="true" ></asp:TextBox>
                                                                    <asp:Label ID="l2" Visible="false"  runat="server" Text="Label"></asp:Label>
                                                                    <asp:TextBox ID="t2" runat="server" AutoPostBack="true" OnTextChanged="t2_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l3" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t3" runat="server" AutoPostBack="true" OnTextChanged="t3_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l4"  runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t4" runat="server" AutoPostBack="true" OnTextChanged="t4_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l5" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t5" runat="server" AutoPostBack="true" OnTextChanged="t5_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l6" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t6" runat="server" AutoPostBack="true" OnTextChanged="t6_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                    <asp:Label ID="l7" runat="server" Text="" Visible="false"></asp:Label>
                                                                    <asp:TextBox ID="t7" runat="server" AutoPostBack="true" OnTextChanged="t7_TextChanged"
                                                                        Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                        Visible="false"></asp:TextBox>
                                                                     <asp:Label ID="l8" runat="server" Text="" Visible="false"></asp:Label>
                                                                     <asp:TextBox ID="t8" runat="server" AutoPostBack="true" OnTextChanged="t8_TextChanged"
                                                                         Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                         Visible="false"></asp:TextBox>
                                                                     <asp:Label ID="l9" runat="server" Text="" Visible="false"></asp:Label>
                                                                     <asp:TextBox ID="t9" runat="server" AutoPostBack="true" OnTextChanged="t9_TextChanged"
                                                                         Style="border: none; border-bottom: 1px solid DarkGray; background-color: #f7fff7"
                                                                         Visible="false"></asp:TextBox>
                                                                </asp:Panel>
                                                                <%#"【章节：" + Eval("K_Name") + " 题型：" + Eval("Typ_name") + "】"%>
                                                            </div>
                                                            <div style="padding-top: 5px; padding-left: 10px">
                                                                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                    <td id="kk" runat="server" style="background-color: Gainsboro; border-right: darkgray 1px solid;
                                                        border-top: darkgray 1px solid; border-left: darkgray 1px solid; border-bottom: darkgray 1px solid;">
                                                      
                                                        <asp:Panel ID="Panel2" runat="server">
                                                       <asp:RadioButtonList ID="singchoose" AutoPostBack="true"   TextAlign="Left" style="display:inline " runat="server" RepeatColumns="10" ValidationGroup="singchoose" OnSelectedIndexChanged="singchoose_SelectedIndexChanged">
                                                              </asp:RadioButtonList>
                                                        <asp:CheckBoxList ID="doubchoose" AutoPostBack="true"  runat="server" RepeatColumns="10" Style="display: inline"
                                                            TextAlign="Left" OnSelectedIndexChanged="doubchoose_SelectedIndexChanged">
                                                        </asp:CheckBoxList>
                                                        </asp:Panel>
                                                        <asp:Panel ID="Panel3" runat="server">
                                              <asp:TextBox ID="fill1"   AutoPostBack="true"    runat="server" class="text1" OnTextChanged="fill1_TextChanged"
                                                  Rows="6" TextMode="MultiLine" Width="600">
                                              </asp:TextBox> 
                                                        </asp:Panel>
                                                        
                                                    </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: Gainsboro; border-right: darkgray 1px solid; border-top: darkgray 1px solid;
                                                            border-left: darkgray 1px solid; border-bottom: darkgray 1px solid;">
                                                            <div style="padding-top: 5px; padding-left: 10px">
                                                                <span style="color: Red; font-weight: bolder;">答案：</span>
                                                                <asp:Label ID="Label3" runat="server" Font-Bold="true" ForeColor="Red" Text="Label"></asp:Label>
                                                                <asp:HiddenField ID="answer" runat="server" />
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="background-color: Gainsboro; border-right: darkgray 1px solid; border-top: darkgray 1px solid;
                                                            border-left: darkgray 1px solid; border-bottom: darkgray 1px solid;">
                                                            <div style="padding-top: 5px; padding-left: 10px">
                                                                <span style="color: black; font-weight: bolder;">关键词：</span><%# Eval("Top_KeyWord")%>
                                                                <asp:HiddenField ID="guanjianci" runat="server" />
                                                                
                                                                
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                             
                                            </ItemTemplate>
                                        </asp:DataList>
                                    </td>
                                </tr>
                            </table>
                            
                        </ItemTemplate>
                    </asp:DataList>
                    <asp:Panel ID="Panel1" runat="server" Visible="false" Width="100%">
                        <div class="paginator">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left">
                                        <webdiyer:aspnetpager id="PagerButtom" runat="server" alwaysshow="True" bordercolor="Aqua"
                                            cssclass="paginator" custominfoclass="" custominfohtml="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
                                            custominfosectionwidth="" firstpagetext="首页" horizontalalign="Right" lastpagetext="尾页"
                                            layouttype="Table" morebuttonsclass="" nextpagetext="下一页" numericbuttoncount="10"
                                            onpagechanged="Pager_PageChanged" pageindexboxclass="cpb" pagesize="20" prevpagetext="上一页"
                                            showcustominfosection="Right" showpageindexbox="Always">
</webdiyer:aspnetpager>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                    <asp:HiddenField ID="IsEdit" runat="server" />
                    <asp:HiddenField ID="modify" runat="server" />
               
            </ContentTemplate>
            <Triggers>
              <asp:AsyncPostBackTrigger ControlID="Button2" />
            </Triggers>
        </asp:UpdatePanel>
        <asp:Button ID="Button2" runat="server" Text="提交试卷" CssClass="btn"  OnClick="Button2_Click" />
    </div>
    

        <script language="JavaScript" type="text/javascript">   
        var maxtime = 100*60-3 //一个小时，按秒计算  
        function CountDown()
        {   
            if(maxtime>=0)
            {   
                minutes = Math.floor(maxtime/60);   
                seconds = Math.floor(maxtime%60);   
                document.all["timer"].innerHTML="计时："+minutes+"分"+seconds+"秒"; 
                if(maxtime == 5*60) alert('注意，距离考试结束还有5分钟！请及时答题，做好交卷准备。');   
                --maxtime;   
            }   
            else
            {   
                clearInterval(timer);   
                alert("考试时间到，强制交卷！");
                submitExam2();//交卷
                //window.opener= null;window.open("", "_self");window.close();
            }   
        }   
        setInterval("CountDown()",1000);   
        </script>
    </form>
    <div style="left: 266.5px; bottom: 0px; position: fixed;">
        <div id="ExamTool">
            <div style="float: left; margin-left: 50px; width: 730px;">
                <span id="TypeListBottom">
                    <input id="btnbottom1" class="button_r" onclick="btnClick('1','单选题')" type="button"
                        value="单选题"><input id="btnbottom2" class="button_b" onclick="btnClick('2','多选题')"
                            type="button" value="多选题"><input id="btnbottom4" class="button_b" onclick="btnClick('4','填空题')"
                                type="button" value="填空题"><input id="btnbottom5" class="button_b" onclick="btnClick('5','简答题')"
                                    type="button" value="简答题"><input id="btnbottom6" class="button_b" onclick="btnClick('6','阅读理解')"
                                        type="button" value="阅读理解"><input id="btnbottom15" class="button_b" onclick="btnClick('15','打字题')"
                                            type="button" value="打字题"></span>
                <img id="viewHelpBottom" alt="" src="../App_Image/Public/help.gif" title="查看【考试帮助】">
                <input id="checkExam" class="button_g" type="button" value="检测答卷">
                <input id="submitExam" class="button_r_b" type="button" value="提交试卷">
            </div>
            <div id="timer" style="float: right; width: auto; color: #ff0000; margin-right: 10px;">
                计时：94分3秒</div>
        </div>
    </div>
    <asp:Label ID="lb_pageid" runat="server" Text="" Visible="false"></asp:Label>
    <asp:Label ID="recordcount" runat="server" Visible="false"></asp:Label>
    <asp:Label ID="page_indexpage" runat="server" Text="1" Visible="false"></asp:Label>
    <asp:Label ID="page_count" runat="server" Text="0" Visible="false"></asp:Label>
<asp:Label ID="l2" runat="server" ></asp:Label>
</body>
</html>
