<%@ page language="C#" autoeventwireup="true" inherits="Questions_QuestionsInfo, App_Web_4plofzsr" stylesheettheme="Themes" theme="Themes" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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 runat="server">
    <title></title>
    <style type="text/css">
        .commentContent
        {
            text-indent: 1em;
            line-height: 25px;
            padding-left: 20px;
            padding-right: 50px;
            color: #000;
        }
        .commentContent_self
        {
            text-indent: 1em;
            line-height: 25px;
            padding-left: 20px;
            padding-right: 50px;
            color: Red;
            font-weight: bold;
        }
        .hlkReply
        {
            cursor: pointer;
            text-decoration: underline;
        }
        .panelBestAnswer
        {
            border: 1px solid #2699DC;
            padding: 10px;
        }
        .color
        {
            color: #2699DC;
        }
        #txtContentQA
        {
            height: 91px;
            width: 381px;
        }
        .Addition
        {
            font-weight: bold;
            text-decoration: underline;
        }
    </style>

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

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

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

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

    <script type="text/javascript" src="../js/jquery.pngFix.pack.js"></script>

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

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

    <script type="text/javascript">
        function perform() {
            if (window.event.keyCode == 13) {
                var obj = document.activeElement;

                document.getElementById("btnSubmit").focus();
            }
        }
        //document.onkeydown = perform 
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tablestyle">
        <tr>
            <td align="center">
                <br>
                <table width="98%" border="0" cellspacing="0" cellpadding="0" class="tablebg">
                    <tr>
                        <td width="1%" align="left" valign="top">
                            <img src="../images/right01.gif" width="4" height="116" />
                        </td>
                        <td width="99%" align="center" valign="top">
                            <br />
                            <div class="box">
                                <table cellpadding="3" cellspacing="0" border="0" style="border: solid 1px #CAE0EA;
                                    text-align: left;" width="100%">
                                    <tr>
                                        <td class="detailtitle">
                                            <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" style="padding-right: 20px; border-bottom: 1px dotted #000;">
                                            <span>所属分类：</span><asp:Label ID="lblSortName" runat="server" Text="" ForeColor="#B9B9B9"></asp:Label>&nbsp;|
                                            <span>作者：<asp:HyperLink ID="hlkUserName" runat="server"></asp:HyperLink></span>&nbsp;|
                                            <span>发布时间：</span><asp:Label ID="lblPublishTime" runat="server" Text="" ForeColor="#B9B9B9"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="line-height: 25px; font-size: 14px; font-weight: bold;">
                                            <asp:Label ID="lblIsEnd" runat="server" Text="" Width="95%"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding: 10px; text-indent: 1em; border-bottom: 1px dotted #000;
                                            word-wrap: break-word; word-break: break-all;">
                                            <asp:Label ID="lblContent" runat="server" Text="" Width="95%"></asp:Label>
                                            <br />
                                            <asp:Repeater ID="rptQuestionAddition" runat="server">
                                                <ItemTemplate>
                                                    <br />
                                                    <div style="font-size: 14px; font-weight: bold;">
                                                        问题补充：</div>
                                                    <div style="padding-left: 30px;">
                                                        <%# Eval("Content")%></div>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <%--<asp:Button ID="btnJietie" runat="server" Text="结贴" onclick="btnJietie_Click" />--%>
                                            &nbsp;<asp:Button ID="btn_returnList" runat="server" Text="返回" OnClick="btn_returnList_Click"
                                                Visible="false" />
                                            <asp:Button ID="btnTransferQuestions" runat="server" Text="问题转化为知识" OnClick="btnTransferQuestions_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="questionsAttatch" runat="server">
                                            <asp:LinkButton ID="lkbQuestionsAttatch" runat="server" OnClick="lkbQuestionsAttatch_Click"
                                                CssClass="Addition" PostBackUrl="#" ForeColor="Red">补充问题</asp:LinkButton>
                                            补充提问细节，以得到更准确的答案
                                            <br />
                                            <asp:Panel ID="panelQuestionsAttatch" runat="server">
                                                <textarea name="txtContent0" id="txtContentQA" runat="server"></textarea>
                                                <br />
                                                <asp:Button ID="btnOK" runat="server" Text="确认" OnClick="btnOK_Click" />&nbsp;
                                                <asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" />
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 14px; font-weight: bold; line-height: 35px; padding-left: 10px;">
                                            <asp:Panel ID="panelBestAnswer" runat="server" Visible="false">
                                                <span>最佳答案</span><br />
                                                用户：<asp:Label ID="lblUser_B" runat="server" Text="" CssClass="color"></asp:Label>
                                                留言于：<asp:Label ID="lblQuestionTime_B" runat="server" Text="" CssClass="color"></asp:Label><br />
                                                <table width="100%" style="border: 1px solid #2699DC;">
                                                    <tr>
                                                        <td>
                                                            <asp:Label ID="lblBestAnswer" runat="server" Width="" Text="" CssClass=""></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Panel ID="panelTrueAnswer" runat="server">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="2" id="tblTrueAnswer"
                                                    style="border: 1px solid #2699DC;">
                                                    <tr>
                                                        <td style="font-size: 14px; font-weight: bold; line-height: 35px;">
                                                            正确答案
                                                        </td>
                                                    </tr>
                                                    <asp:Repeater ID="rptTrueAnswer" runat="server" OnItemDataBound="rptTrueAnswer_ItemDataBound">
                                                        <ItemTemplate>
                                                            <tr>
                                                                <td>
                                                                    <asp:TextBox ID="txtUserID" Text='<%#Eval("UserID") %>' Visible="false" runat="server"></asp:TextBox>
                                                                    用户：<asp:Label ID="lblUserName" runat="server" Text=""></asp:Label>
                                                                    留言于：<%# Eval("CommentTime") %>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="text-indent: 30px;">
                                                                    <%#Eval("Content") %>
                                                                    <br />
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td height="20">
                                                                </td>
                                                            </tr>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </table>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 14px; padding-left: 10px; font-weight: bold; line-height: 35px;">
                                            回答列表
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" style="padding-left: 10px;">
                                            <asp:DataList ID="dlAnswerList" runat="server" DataKeyField="ID" Width="100%" BorderWidth="1px"
                                                GridLines="Both" CellPadding="4" BackColor="White" BorderStyle="None" BorderColor="#CC9966"
                                                OnItemDataBound="dlAnswerList_ItemDataBound" OnItemCommand="dlAnswerList_ItemCommand">
                                                <SelectedItemStyle Font-Bold="True" ForeColor="#663399" BackColor="#FFCC66"></SelectedItemStyle>
                                                <FooterStyle ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
                                                <ItemStyle ForeColor="#330099" BackColor="White" BorderStyle="Dotted" BorderColor="#303030"
                                                    BorderWidth="1"></ItemStyle>
                                                <ItemTemplate>
                                                    用户：<asp:Label ID="lblUser" runat="server"></asp:Label>
                                                    留言于：<asp:Label ID="lblQuestionTime" runat="server" Text='<%# Eval("CommentTime")%>'></asp:Label>
                                                    <asp:LinkButton ID="lkbtnBestAnswer" runat="server" CommandName="bestAnswer" Visible="false">选为最佳答案</asp:LinkButton>
                                                    <asp:LinkButton ID="lkbTrueAnswer" runat="server" CommandName="TrueAnswe" Visible="false">选为正确答案</asp:LinkButton><br />
                                                    <asp:Label ID="lblComment" runat="server" CssClass="commentContent" Text='<%# Eval("Content").ToString().Replace("\r\n", "<br>") %>'></asp:Label><br />
                                                    <br />
                                                    <asp:Label ID="lblUserID" runat="server" Text='<%# Eval("UserID")%>' Visible="false"></asp:Label>
                                                </ItemTemplate>
                                            </asp:DataList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <%--<asp:Button ID="btnJietie" runat="server" Text="结贴" onclick="btnJietie_Click" />--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                                <asp:Panel ID="PanelAnswer" runat="server">
                                    <table cellpadding="3" cellspacing="0" border="0" style="border: solid 1px #CAE0EA;
                                        text-align: left;" width="100%">
                                        <tr>
                                            <td style="font-size: 14px; font-weight: bold; padding-left: 10px; line-height: 35px;">
                                                发表回答
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-left: 10px;">
                                                <textarea name="txtContent" id="txtContent" cols="50" rows="10" runat="server"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-left: 10px;">
                                                <asp:TextBox ID="tbxCode" runat="server" autocomplete="off" MaxLength="6" onkeydown="perform()"
                                                    Width="52px"></asp:TextBox>
                                                &nbsp;<img border="0" src="../VerifyCode.aspx" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-left: 10px;">
                                                <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click" />
                                                <asp:Button ID="btn_returnList0" runat="server" Text="返回" Visible="false" OnClick="btn_returnList_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </div>
                        </td>
                        <td width="0%" align="right" valign="top">
                            <img src="../images/right02.gif" width="4" height="134" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <asp:TextBox ID="txtUserID" runat="server"></asp:TextBox>
    </form>
</body>

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        Validator();
    });
    function Validator() {
        $('#<%= btnSubmit.ClientID %>').bind('click', function() {

            return GetValidatorMessage();
        });
        $("#<%=txtContent.ClientID %>").textlimit(2000);
        $("#<%=txtContentQA.ClientID %>").textlimit(1000);
    }
</script>

</html>
