<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="subjectedit.aspx.cs" Inherits="FangPage.Exam.Admin.subjectedit" %>
<%@ Register Assembly="FangPage.Control" Namespace="FangPage.Control" TagPrefix="cc1" %>

<!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 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>
    <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">
                    <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:DropDownList ID="typeid" runat="server">
                        </cc1:DropDownList>
                    </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">
                    <input type="radio" name="type" onclick="changelayer('danxuan');" <%if (m_type==1){%> checked="checked"<%} %> value="1" />单选题&nbsp;&nbsp;
                    <input type="radio" name="type" onclick="changelayer('duoxuan');"  <%if (m_type==2){%> checked="checked"<%} %> value="2" />多选题&nbsp;&nbsp;
                    <input type="radio" name="type" onclick="changelayer('panduan');" <%if (m_type==3){%> checked="checked"<%} %> value="3" />判断题&nbsp;&nbsp;
                    <input type="radio" name="type" onclick="changelayer('tiankong');" <%if (m_type==4){%> checked="checked"<%} %> value="4" />填空题&nbsp;&nbsp;
                    <input type="radio" name="type" onclick="changelayer('wenda');" <%if (m_type==5){%> checked="checked"<%} %> value="5" />问答题
                    </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">
                        <textarea id="question" name="question" runat="server" style="width: 300px" rows="4"></textarea>
                        <asp:CheckBox ID="ismust" runat="server" Text="必答题" />
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text1">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项A：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text1" runat="server" Width="300"></cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text2">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项B：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text2" runat="server" Width="300">
                        </cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text3">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项C：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text3" runat="server" Width="300">
                        </cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text4">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项D：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text4" runat="server" Width="300">
                        </cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text5">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项E：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text5" runat="server" Width="300">
                        </cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="m_text6">
                    <td style="padding-right: 10px; width: 100px;" height="22" align="right">
                        选项F：
                    </td>
                    <td style="padding-right: 3px; padding-left: 3px; padding-bottom: 3px; padding-top: 3px">
                        <cc1:TextBox ID="text6" runat="server" Width="300">
                        </cc1:TextBox>
                    </td>
                </tr>
                <tr class="TdBgL" id="danxuan">
                    <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="dananswer" value="A" <%if(m_type==1&&subjectinfo.Answer=="A"){%> checked="checked"<%} %> />&nbsp;A&nbsp;&nbsp;
                        <input type="radio" name="dananswer" value="B" <%if(m_type==1&&subjectinfo.Answer=="B"){%> checked="checked"<%} %> />&nbsp;B&nbsp;&nbsp;
                        <input type="radio" name="dananswer" value="C" <%if(m_type==1&&subjectinfo.Answer=="C"){%> checked="checked"<%} %> />&nbsp;C&nbsp;&nbsp;
                        <input type="radio" name="dananswer" value="D" <%if(m_type==1&&subjectinfo.Answer=="D"){%> checked="checked"<%} %> />&nbsp;D&nbsp;&nbsp;
                        <input type="radio" name="dananswer" value="E" <%if(m_type==1&&subjectinfo.Answer=="E"){%> checked="checked"<%} %> />&nbsp;E&nbsp;&nbsp;
                        <input type="radio" name="dananswer" value="F" <%if(m_type==1&&subjectinfo.Answer=="F"){%> checked="checked"<%} %> />&nbsp;F
                    </td>
                </tr>
                <tr class="TdBgL" id="duoxuan" 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">&nbsp;
                        <input type="checkbox" name="duoanswer" value="A" <%if(m_type==2&&subjectinfo.Answer.IndexOf("A")>=0){%> checked="checked"<%} %> />&nbsp;A&nbsp;&nbsp;
                        <input type="checkbox" name="duoanswer" value="B" <%if(m_type==2&&subjectinfo.Answer.IndexOf("B")>=0){%> checked="checked"<%} %> />&nbsp;B&nbsp;&nbsp;
                        <input type="checkbox" name="duoanswer" value="C" <%if(m_type==2&&subjectinfo.Answer.IndexOf("C")>=0){%> checked="checked"<%} %> />&nbsp;C&nbsp;&nbsp;
                        <input type="checkbox" name="duoanswer" value="D" <%if(m_type==2&&subjectinfo.Answer.IndexOf("D")>=0){%> checked="checked"<%} %> />&nbsp;D&nbsp;&nbsp;
                        <input type="checkbox" name="duoanswer" value="E" <%if(m_type==2&&subjectinfo.Answer.IndexOf("E")>=0){%> checked="checked"<%} %> />&nbsp;E&nbsp;&nbsp;
                        <input type="checkbox" name="duoanswer" value="F" <%if(m_type==2&&subjectinfo.Answer.IndexOf("F")>=0){%> checked="checked"<%} %> />&nbsp;F
                    </td>
                </tr>
                <tr class="TdBgL" id="panduan" 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">
                         <input type="radio" name="pananswer" value="Y" <%if(m_type==3&&subjectinfo.Answer=="Y"){%> checked="checked"<%} %> />&nbsp;正确&nbsp;&nbsp;
                         <input type="radio" name="pananswer" value="N" <%if(m_type==3&&subjectinfo.Answer=="N"){%> checked="checked"<%}%> />&nbsp;错误&nbsp;&nbsp;
                    </td>
                </tr>
                <tr class="TdBgL" id="tiankong" 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="tiananswer" name="answer" title="多个答案用英文逗号(,)分隔" runat="server" style="width: 300px" rows="4"></textarea>
                    </td>
                </tr>
                <tr class="TdBgL" id="wenda" 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="wenanswer" name="answer" 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">
                        <cc1:RadioButtonList ID="difficulty" runat="server" RepeatColumns="3">
                            <asp:ListItem Value="1" Selected="True">简单</asp:ListItem>
                            <asp:ListItem Value="2">中等</asp:ListItem>
                            <asp:ListItem Value="3">困难</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="0" Selected="True">未审核</asp:ListItem>
                            <asp:ListItem Value="1">已审核</asp:ListItem>
                        </cc1:RadioButtonList>
                    </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='<%=returnurl %>?sortid=<%=sortid%>&examid=<%=examid %>&action=<%=action %>';">
                            <img src="images/arrow_undo.gif" />返 回</button>
                    </td>
                </tr>
            </tbody>
        </table>
            <script type="text/javascript">
                function changelayer(objectname)
                {
                    if(objectname == "duoxuan")
                    {
                        document.getElementById("m_text1").style.display = 'block';
                        document.getElementById("m_text2").style.display = 'block';
                        document.getElementById("m_text3").style.display = 'block';
                        document.getElementById("m_text4").style.display = 'block';
                        document.getElementById("m_text5").style.display = 'block';
                        document.getElementById("m_text6").style.display = 'block';
                        document.getElementById("danxuan").style.display = 'none';
                        document.getElementById("duoxuan").style.display = 'block';
                        document.getElementById("panduan").style.display = 'none';
                        document.getElementById("tiankong").style.display = 'none';
                        document.getElementById("wenda").style.display = 'none';
                    }
                    else if(objectname == "panduan")
                    {
                        document.getElementById("m_text1").style.display = 'none';
                        document.getElementById("m_text2").style.display = 'none';
                        document.getElementById("m_text3").style.display = 'none';
                        document.getElementById("m_text4").style.display = 'none';
                        document.getElementById("m_text5").style.display = 'none';
                        document.getElementById("m_text6").style.display = 'none';
                        document.getElementById("danxuan").style.display = 'none';
                        document.getElementById("duoxuan").style.display = 'none';
                        document.getElementById("panduan").style.display = 'block';
                        document.getElementById("tiankong").style.display = 'none';
                        document.getElementById("wenda").style.display = 'none';
                    }
                    else if(objectname == "tiankong")
                    {
                        document.getElementById("m_text1").style.display = 'block';
                        document.getElementById("m_text2").style.display = 'block';
                        document.getElementById("m_text3").style.display = 'block';
                        document.getElementById("m_text4").style.display = 'block';
                        document.getElementById("m_text5").style.display = 'block';
                        document.getElementById("m_text6").style.display = 'block';
                        document.getElementById("danxuan").style.display = 'none';
                        document.getElementById("duoxuan").style.display = 'none';
                        document.getElementById("panduan").style.display = 'none';
                        document.getElementById("tiankong").style.display = 'block';
                        document.getElementById("wenda").style.display = 'none';
                    }
                    else if(objectname == "wenda")
                    {
                        document.getElementById("m_text1").style.display = 'none';
                        document.getElementById("m_text2").style.display = 'none';
                        document.getElementById("m_text3").style.display = 'none';
                        document.getElementById("m_text4").style.display = 'none';
                        document.getElementById("m_text5").style.display = 'none';
                        document.getElementById("m_text6").style.display = 'none';
                        document.getElementById("danxuan").style.display = 'none';
                        document.getElementById("duoxuan").style.display = 'none';
                        document.getElementById("panduan").style.display = 'none';
                        document.getElementById("tiankong").style.display = 'none';
                        document.getElementById("wenda").style.display = 'block';
                    }
                    else
                    {
                        document.getElementById("m_text1").style.display = 'block';
                        document.getElementById("m_text2").style.display = 'block';
                        document.getElementById("m_text3").style.display = 'block';
                        document.getElementById("m_text4").style.display = 'block';
                        document.getElementById("m_text5").style.display = 'block';
                        document.getElementById("m_text6").style.display = 'block';
                        document.getElementById("danxuan").style.display = 'block';
                        document.getElementById("duoxuan").style.display = 'none';
                        document.getElementById("panduan").style.display = 'none';
                        document.getElementById("tiankong").style.display = 'none';
                        document.getElementById("wenda").style.display = 'none';
                        
                    }
                };
                
                changelayer("<%=m_typename%>");
                
            </script>
    </form>
</body>
</html>
