<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="examedit.aspx.cs" Inherits="FangPage.Exam.Admin.examedit" %>

<%@ Register Assembly="FangPage.Control" Namespace="FangPage.Control" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑考试</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="styles/style.css" type="text/css" rel="stylesheet">
    <style type="text/css">
        body
        {
            background-image: url(images/main_bg.gif);
            background-repeat: repeat-x;
            background-color: #CEE7FC;
        }
    </style>
    <script language="javascript" type="text/javascript" src="../plugins/calendar/WdatePicker.js"></script>
    
    <meta content="MSHTML 6.00.3790.0" name="GENERATOR">
</head>
<body leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5">
    <form id="form1" runat="server">
    <table class="TdBg" cellspacing="1" cellpadding="0" width="100%" border="0">
        <tbody>
            <tr valign="middle">
                <td class="Tdimg" style="padding-left: 10px" height="28" colspan="2">
                    <img height="18" src="images/bbs_find.gif" width="18" align="absMiddle" border="0">
                    <strong>当前位置：<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                        » 编辑考试</strong>
                </td>
            </tr>
            <tr class="TdBgL" id="m_question">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试名称：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="title" runat="server" Width="300"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL" id="m_text1">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    单选题数：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="singlecount" runat="server" Width="120"></cc1:TextBox>&nbsp;&nbsp;每题分值:<cc1:TextBox
                        ID="singleper" runat="server" Width="120"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL" id="m_text2">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    多选题数：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="multicount" runat="server" Width="120"></cc1:TextBox>&nbsp;&nbsp;每题分值:<cc1:TextBox
                        ID="multiper" runat="server" Width="120"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL" id="m_text3">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    判断题数：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="judgecount" runat="server" Width="120"></cc1:TextBox>&nbsp;&nbsp;每题分值:<cc1:TextBox
                        ID="judgeper" runat="server" Width="120"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL" id="m_text4">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    填空题数：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="tiankongcount" runat="server" Width="120"></cc1:TextBox>&nbsp;&nbsp;每题分值:<cc1:TextBox
                        ID="tiankongper" runat="server" Width="120"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL" id="m_text5">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    问答题数：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="wendacount" runat="server" Width="120"></cc1:TextBox>&nbsp;&nbsp;每题分值:<cc1:TextBox
                        ID="wendaper" runat="server" Width="120"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试时间：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="examhour" runat="server" Width="300"></cc1:TextBox>&nbsp;&nbsp;分钟
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试期限：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    &nbsp;<asp:CheckBox ID="allowdatetime" runat="server" Text="是否使用期限限制 " />
                </td>
            </tr>
            <tr class="TdBgL" id="showdatetime" style="display: none">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    有&nbsp;效&nbsp;期&nbsp;：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:TextBox ID="starttime" runat="server" Width="132"></cc1:TextBox>&nbsp;&nbsp;至&nbsp;&nbsp;<cc1:TextBox
                        ID="endtime" runat="server" Width="132"></cc1:TextBox>
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试对象：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    &nbsp;<input type="radio" name="examusertype" onclick="changelayer('reguser');" <%if (examusertype==0){%> checked="checked"<%} %> value="0" />&nbsp;注册用户&nbsp;&nbsp;
                    <input type="radio" name="examusertype" onclick="changelayer('usergroup');" <%if (examusertype==1){%> checked="checked"<%} %> value="1" />&nbsp;用户组&nbsp;&nbsp;
                    <input type="radio" name="examusertype" onclick="changelayer('user');" <%if (examusertype==2){%> checked="checked"<%} %> value="2" />&nbsp;自定义用户
                </td>
            </tr>
            <tr class="TdBgL" id="usergroup" style="display: none">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试用户组：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:SmartTreeView ID="TreeView1" runat="server" ShowLines="True" AllowCascadeCheckbox="True">
                    </cc1:SmartTreeView>
                </td>
            </tr>
            <tr class="TdBgL" id="user" style="display: none">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试用户：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <textarea id="examuserlist" name="examuserlist" title="留空为任何人，多个用户以逗号(,)进行分隔" runat="server" style="width: 300px"
                        rows="4"></textarea>
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    重复考试：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    &nbsp;<asp:CheckBox ID="repeat" runat="server" Text="用户是否可以重复考试" />
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    选题方式：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:RadioButtonList ID="examtype" runat="server" RepeatColumns="3">
                        <asp:ListItem Value="0" Selected="True">考试时随机抽题</asp:ListItem>
                        <asp:ListItem Value="1" >机器选题</asp:ListItem>
                        <asp:ListItem Value="2">人工选题</asp:ListItem>
                    </cc1:RadioButtonList>
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    审核状态：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <cc1:RadioButtonList ID="status" runat="server" RepeatColumns="2">
                        <asp:ListItem Value="1" Selected="True">已审核</asp:ListItem>
                        <asp:ListItem Value="0" >未审核</asp:ListItem>
                    </cc1:RadioButtonList>
                </td>
            </tr>
            <tr class="TdBgL">
                <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                    考试说明：
                </td>
                <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                    <textarea id="content" name="content" title="说明文字出现在试卷的开头" runat="server" style="width: 300px"
                        rows="4"></textarea>
                </td>
            </tr>
            <tr class="TdBgL">
                <td height="35" style="width: 100px">
                    &nbsp;
                </td>
                <td style="padding-left: 10px">
                    &nbsp;
                    <cc1:Button ID="Button1" runat="server" OnClick="Button1_Click" />&nbsp;&nbsp;
                    <button class="ManagerButton" type="button" onclick="javascript:window.location.href='exammanage.aspx?sortid=<%=sortid%>';">
                        <img src="images/arrow_undo.gif" />返 回</button>
                </td>
            </tr>
        </tbody>
    </table>
    <script type="text/javascript">
     function showdatetimes()
     {
        if(form1.allowdatetime.checked==true)
        {
            showdatetime.style.display='block';

        }
        else
        {
            showdatetime.style.display='none';
        }
     } 
     
    function changelayer(objectname)
    {
        if(objectname == "usergroup")
        {
            document.getElementById("usergroup").style.display = 'block';
            document.getElementById("user").style.display = 'none';
        }
        else if(objectname == "user")
        {
            document.getElementById("usergroup").style.display = 'none';
            document.getElementById("user").style.display = 'block';
            document.getElementById("examuserlist").focus();
        }
        else
        {
            document.getElementById("usergroup").style.display = 'none';
            document.getElementById("user").style.display = 'none';
        }
     }
     showdatetimes();
     changelayer("<%=m_examusertype%>");
     
    </script>
    </form>
</body>
</html>