<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Exam.Admin_ZGMonitor" Title="考试监控管理" Codebehind="KS.ZGMonitor.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <div id="manage_top" class="menu_top_fixed">
       <ul class="titleTab">
          <li><a href="KS.SJScore.aspx">成绩管理</a></li>
          <li><a href="KS.ZGSJPG.aspx">试卷批改</a></li>
          <li class="curr"><a href="KS.ZGMonitor.aspx">实时监控</a></li>
          <li><a href="KS.SJTotal.aspx">成绩排名/分析</a></li>
          <li><a href="KS.SJTrainingRecord.aspx">随机练习记录</a></li>
          <li><a href="KS.ExamCtbs.aspx">错题记录</a></li>
          <li><a href="KS.SJReviews.aspx">考后心得</a></li>
       </ul>
    </div>  
    <div class="menu_top_fixed_height"></div>
    <asp:Panel ID="ListPanel" runat="server" Width="100%">        
        <style>
            .categorynav{line-height:25px;width:97%;margin:0 auto;margin-bottom:10px;border:1px solid #DEEFFA;background-color:#F7FBFE;padding:5px 0px 5px 10px; height:100%; overflow:hidden;}
            ul,li{padding:0px;margin:0px}
            .categorynav li{width:160px;float:left;}
        </style>
        <div class="content-area">
            <div class="myTitle">
                实时监控管理
                <!--当前位置：<asp:Label ID="LabNav" runat="server"></asp:Label>-->
            </div>
            <div class="quickSearch">
               <asp:DropDownList ID="DrpClassID" runat="server" onchange="location.href='?classid='+this.value;" Style="width:130px;margin-right:8px;">
                 <asp:ListItem Value="0">--按分类查看--</asp:ListItem>
                 </asp:DropDownList>
                 <asp:TextBox runat="server" ID="TxtKeyWord" CssClass="textbox" /> 
                <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="开始搜索" onclick="BtnSearch_Click"  />
            </div>
            <asp:Repeater ID="Repeater1" runat="server">
            <HeaderTemplate>
            <div class="categorynav">
                <ul>
            </HeaderTemplate>
            <ItemTemplate>   
                <li><img align="absmiddle" src="../../sysimg/tree/folderclosed.gif" /><a href='?classid=<%# Eval("classid") %>'><%#Eval("classname")%></a></li>
            </ItemTemplate>
            <FooterTemplate>
                <asp:Label ID="lblEmptyZP" Text="<a href='javascript:history.back()'> &laquo;返回上一级</a> | " CssClass="text_hei_12" runat="server" Visible='<%#bool.Parse((Repeater1.Items.Count==0).ToString())%>'></asp:Label>
                </ul>
            </div>
            </FooterTemplate>
            </asp:Repeater>
            <KS:ksgv id="list" cssclass="CTable" runat="server" AutoGenerateColumns="False" 
                EmptyDataText="没有添加任何试卷!" PagerType="CustomNumeric" Width="99%" 
                HorizontalAlign="Center" GridLines="None" OnRowCommand="List_RowCommand" 
                OnRowCreated="List_RowCreated" onrowdatabound="list_RowDataBound">
                <Columns>
                    <asp:BoundField HeaderText="试卷ID号" DataField="ID" >
                        <itemstyle horizontalalign="Center" Width="100"/>
                    </asp:BoundField>
                    
                    <asp:TemplateField HeaderText="试卷名称">
                        <itemtemplate>
                            [<%# MyCache.GetCacheSJCategory(Convert.ToInt32(Eval("classid")),1) %>]
                            <a href="<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("examview",Convert.ToInt32(Eval("id").ToString())) %>" target="_blank"><%# Utils.CutStr(Convert.ToString(Eval("title")),40) %></a>
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="总分" DataFormatString="{0}分" DataField="score" >
                        <itemstyle horizontalalign="Center" Width="120"/>
                    </asp:BoundField>
                    <asp:BoundField HeaderText="时间" DataFormatString="{0}分钟" DataField="KSSJ" >
                        <itemstyle horizontalalign="Center" Width="100"/>
                    </asp:BoundField>
        
                    <asp:TemplateField HeaderText="开考时间">
                        <itemstyle horizontalalign="Center" Width="150"/>
                        <itemtemplate>
                            <%# GetExamStatus(Utils.StrToInt(Eval("OpenTimeLimit")),Utils.StrToDateTime(Eval("TimeLimitBegin")), Utils.StrToDateTime(Eval("TimeLimitEnd")))%>
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="参加人数">
                        <itemstyle horizontalalign="Center" Width="100"/>
                        <itemtemplate>
                            <%# GetEnterExamNum(Convert.ToInt16(Eval("id"))) %> 人
                        </itemtemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <itemstyle horizontalalign="Center" Width="150"/>
                        <itemtemplate>
                            <a href="KS.ZGMonitorItem.Aspx?sjid=<%#Eval("id") %>" class="greenFont">进入监控</a>
                        </itemtemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="CTitle" />
                <EmptyDataRowStyle CssClass="emptycss" />
            </KS:ksgv>
        	<KS:Page ID="Page1" runat="server" />
        </div>
    </asp:Panel>
</asp:Content>