<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_QuestionAuditMng.aspx.cs" Inherits="Webdisk.admin.Admin_QuestionAuditMng" %>
<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<html>
<head>
    <title>
        <%=type%>
    </title>
    <link href="images/Site_Css.css" type="text/css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link href="images/Css.css" type="text/css" rel="stylesheet">
    <meta content="MSHTML 6.00.6000.16544" name="GENERATOR">
    <style type="text/css">
        .style4
        {
            color: #ff0000;
        }
        body,form
        {
            overflow:hidden;
            margin:0px;
            }
    </style>
	<script src="../js/calendar.js" type="text/javascript"></script>
    <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="../js/Common.js" type="text/javascript"></script>
    <script language="javascript" src="../js/function.js" type="text/javascript"></script>
    <script language="JAVASCRIPT">
        function Result() {
            Webdisk.admin.admin_file.GetBmAll(document.all.company.value, get_Result_CallBack);
        }

        function get_Result_CallBack(response) {
            if (response.value != null) {
                document.all("dept").length = 0;
                document.all("dept").options.add(new Option("全部部门", ""));
                var ds = response.value;
                if (ds != null && typeof (ds) == "object") {
                    for (var i = 0; i < ds.Rows.length; i++) {
                        var name = ds.Rows[i].knamem;
                        var id = ds.Rows[i].id;
                        document.all("dept").options.add(new Option(name, id));
                    }
                    document.all.hiddept.value = document.all.dept.value;
                }
            }
            return
        }
        function getUrlParam(paramName) {
            var s = location.search;
            if (s != null) {
                var sarr = s.substr(1).split("&");
                var tarr;
                for (i = 0; i < sarr.length; i++) {
                    tarr = sarr[i].split("=");
                    if (tarr.length == 2 && tarr[0].toLowerCase() == paramName) {
                        return tarr[1];
                    }
                }
                return "";
            }
        }
        function gosearch() {
            var str = "";
            if ((getUrlParam('page') != null) && (getUrlParam('page') != "")) str = str + "&page=" + getUrlParam('page');
            if ((getUrlParam('share') != null) && (getUrlParam('share') != "")) str = str + "&share=" + getUrlParam('share');
            if (document.all.filename.value != "") str = str + "&filename=" + document.all.filename.value;
            if (document.all.username.value != "") str = str + "&username=" + document.all.username.value;
            if (document.all.txttime1.value != "") str = str + "&txttime1=" + document.all.txttime1.value;
            if (document.all.txttime2.value != "") str = str + "&txttime2=" + document.all.txttime2.value;
            if (document.all.txtsize1.value != "") str = str + "&txtsize1=" + document.all.txtsize1.value;
            if (document.all.txtsize2.value != "") str = str + "&txtsize2=" + document.all.txtsize2.value;
            if (document.all.txttype.value != "") str = str + "&txttype=" + document.all.txttype.value;
            if (document.all.txtnote.value != "") str = str + "&txtnote=" + document.all.txtnote.value;
            if (document.all.hiddept.value != "") str = str + "&dept=" + document.all.hiddept.value;

            str = "?" + str.substring(1, str.length);
            window.location = 'admin_file.aspx' + str;
        }
    </script>
</head>
<body bgcolor="#ffffff" topmargin="5" marginheight="0" marginwidth="0">
    <form id="Form2" name="Form1" method="post" runat="server">
    <div>
    </div>
    <div>
        <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tbody>
                <tr>
                    <td class="menubar_title">
                        <img hspace="3" src="images/default.gif" align="absMiddle" vspace="3" border="0">&nbsp;
                        <%=type%>
                    </td>
                    <td class="menubar_readme_text" valign="bottom">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="menubar_function_text" height="1">
                        &nbsp;
                    </td>
                    <td class="menubar_menu_td" align="right">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="2" height="5">
                    </td>
                </tr>
            </tbody>
        </table>
        <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tbody>
                <tr>
                    <td background="images/tab_top_bg.gif" height="22">
                        <table cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                                <tr>
                                    <!--按钮　Start-->
                                    <td>
                                        <table height="22" cellspacing="0" cellpadding="0" border="0">
                                            <tbody>
                                                <tr>
                                                    <td width="3">
                                                        <img id="tabImgLeft__0" height="22" src="images/tab_unactive_left.gif" width="3">
                                                    </td>
                                                    <td class="tab" id="tabLabel__0" onclick="javascript:tabClick(0,2)" background="images/tab_unactive_bg.gif"
                                                        unselectable="on">
                                                        问题审核
                                                    </td>
                                                    <td width="3">
                                                        <img id="tabImgRight__0" height="22" src="images/tab_unactive_right.gif" width="3">
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                    <td>
                                        <table height="22" cellspacing="0" cellpadding="0" border="0">
                                            <tbody>
                                                <tr>
                                                    <td width="3">
                                                        <img id="tabImgLeft__1" height="22" src="images/tab_unactive_left.gif" width="3">
                                                    </td>
                                                    <td class="tab" id="tabLabel__1" onclick="javascript:tabClick(1,2)" background="images/tab_unactive_bg.gif"
                                                        unselectable="on">
                                                        答案审核
                                                    </td>
                                                    <td width="3">
                                                        <img id="tabImgRight__1" height="22" src="images/tab_unactive_right.gif" width="3">
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td bgcolor="#ffffff">
                        <table cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tbody>
                                <tr>
                                    <td width="1" background="images/tab_bg.gif">
                                        <img height="1" src="images/tab_bg.gif" width="1">
                                    </td>
                                    <td class="borderstyle" valign="top" height="100">
                                        <div id="tabContent__0">
                                            <asp:DataGrid ID="QuestionDG" runat="server" AllowSorting="True" PageSize="20"
                                                AutoGenerateColumns="False" CssClass="GridBody" Width="100%">
                                                <AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
                                                <ItemStyle CssClass="GridItem"></ItemStyle>
                                                <HeaderStyle CssClass="GridHead"></HeaderStyle>
                                                <Columns>
                                                    <asp:TemplateColumn HeaderText="选择">
                                                        <HeaderStyle HorizontalAlign="Center" Width="3%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="3%"></ItemStyle>
                                                        <HeaderTemplate>
                                                            <input type="checkbox" name="chkSelect" id="chkSelect" onclick='checkAll(0);' />
                                                        </HeaderTemplate>
                                                        <ItemTemplate >
                                                            <input id="chkSelect" onclick="AddRemoveValues(this)" type="checkbox" value='<%#DataBinder.Eval(Container.DataItem,"id")%>'
                                                                name="checkbox">
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn SortExpression="question" HeaderText="问题">
                                                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        <ItemTemplate>
                                                            <%# DataBinder.Eval(Container, "DataItem.question").ToString()%>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn SortExpression="questionUser" HeaderText="提问者">
                                                        <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
                                                        <ItemTemplate>
                                                            <%# DataBinder.Eval(Container, "DataItem.questionUser")%>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:BoundColumn DataField="QuestionDateTime" SortExpression="QuestionDateTime" HeaderText="提问时间">
                                                        <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
                                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                    </asp:BoundColumn>
                                                    <asp:TemplateColumn SortExpression="IsAudit" HeaderText="是否已审核">
                                                        <ItemTemplate>
                                                            <%# showsh(Eval("IsAudit").ToString()) %>
                                                        </ItemTemplate>
                                                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                            Font-Underline="False" HorizontalAlign="Center" Width="7%" />
                                                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                            Font-Underline="False" HorizontalAlign="Center" width="7%"/>
                                                    </asp:TemplateColumn>
                                                </Columns>
                                                <PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
                                            </asp:DataGrid>
                                            <br>
                                            <div align="right">
                                                <webdiyer:AspNetPager ID="PQues" runat="server" PageSize="20" CssClass="page" Height="20px"
                                                    LastPageText="<font face=webdings>:</font>" NextPageText="<font face=webdings>4</font>"
                                                    PrevPageText="<font face=webdings>3</font>" FirstPageText="<font face=webdings>9</font>"
                                                    ShowBoxThreshold="21" HorizontalAlign="Right" NumericButtonCount="15" ShowCustomInfoSection="Left"
                                                    AlwaysShow="True" OnPageChanged="PQues_PageChanged">
                                                </webdiyer:AspNetPager>
                                            </div>
                                            勾选记录：
                                           <asp:Button class="formbutton" ID="btnShQues" runat="server" Text="审核问题" OnClick="btnShQues_Click" OnClientClick="return check()"></asp:Button>
                                           <asp:Button class="formbutton" ID="btnCancelShQues" runat="server" Text="取消审核" OnClick="btnCancelShQues_Click" OnClientClick="return check()"></asp:Button>
                                        </div>
                                        <div id="tabContent__1">
                                            <!-- tab start -->
                                            <asp:DataGrid ID="AnswerDG" runat="server" AllowSorting="True" PageSize="20"
                                                AutoGenerateColumns="False" CssClass="GridBody" Width="100%">
                                                <AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
                                                <ItemStyle CssClass="GridItem"></ItemStyle>
                                                <HeaderStyle CssClass="GridHead"></HeaderStyle>
                                                <Columns>
                                                    <asp:TemplateColumn HeaderText="选择">
                                                        <HeaderStyle HorizontalAlign="Center" Width="3%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="3%"></ItemStyle>
                                                        <HeaderTemplate>
                                                            <input type="checkbox" name="chkSelect" id="chkSelect" onclick='checkAll(1);' />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <input id="chkSelect" onclick="AddRemoveValues(this)" type="checkbox" value='<%#DataBinder.Eval(Container.DataItem,"id")%>'
                                                                name="checkbox">
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn SortExpression="Answer" HeaderText="答案">
                                                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                        <ItemTemplate>
                                                            <%# DataBinder.Eval(Container, "DataItem.Answer") %>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn SortExpression="AnswerUser" HeaderText="回答者">
                                                        <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
                                                        <ItemTemplate>
                                                            <%# DataBinder.Eval(Container, "DataItem.AnswerUser") %>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:BoundColumn DataField="AnswerDateTime" SortExpression="AnswerDateTime" HeaderText="回答时间">
                                                        <HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="20%"></ItemStyle>
                                                    </asp:BoundColumn>
                                                    <asp:TemplateColumn SortExpression="IsAudit" HeaderText="是否已审核">
                                                        <HeaderStyle HorizontalAlign="Center" Width="7%"></HeaderStyle>
                                                        <ItemStyle HorizontalAlign="Center" Width="7%"></ItemStyle>
                                                        <ItemTemplate>
                                                            <%# showsh(DataBinder.Eval(Container, "DataItem.IsAudit").ToString()) %>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                </Columns>
                                                <PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
                                            </asp:DataGrid>
                                            <br>
                                            <div align="right">
                                                <webdiyer:AspNetPager ID="PAns" runat="server" PageSize="20" CssClass="page" Height="20px"
                                                    LastPageText="<font face=webdings>:</font>" NextPageText="<font face=webdings>4</font>"
                                                    PrevPageText="<font face=webdings>3</font>" FirstPageText="<font face=webdings>9</font>"
                                                    ShowBoxThreshold="21" HorizontalAlign="Right" NumericButtonCount="15" ShowCustomInfoSection="Left"
                                                    AlwaysShow="True" OnPageChanged="PAns_PageChanged">
                                                </webdiyer:AspNetPager>
                                            </div>
                                            勾选记录：
                                            <asp:Button class="formbutton" ID="btnShAnswer" runat="server" Text="审核答案" OnClick="btnShAnswer_Click" OnClientClick="return check()"></asp:Button>
                                           <asp:Button class="formbutton" ID="btnCancelShAns" runat="server" Text="取消审核" OnClick="btnCancelShAns_Click" OnClientClick="return check()"></asp:Button>
                                            <!-- endregion -->
                                        </div>
                                        <!--内容框Start-->
                                    </td>
                                    <td width="1" background="images/tab_bg.gif">
                                        <img height="1" src="images/tab_bg.gif" width="1">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td background="images/tab_bg.gif" bgcolor="#ffffff">
                        <img height="1" src="images/tab_bg.gif" width="1">
                    </td>
                </tr>
            </tbody>
        </table>
        <!--选项卡 End-->
    </div>
    <input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server"/>
    <script language="javascript" type="text/javascript">
        function tabClick(idx, count) {

            for (var i_tr = 0; i_tr < count; i_tr++) {
                if (i_tr == idx) {
                    var tabImgLeft = eval('document.all.tabImgLeft__' + idx);
                    var tabImgRight = eval('document.all.tabImgRight__' + idx);
                    var tabLabel = eval('document.all.tabLabel__' + idx);
                    var tabContent = eval('document.all.tabContent__' + idx);

                    tabImgLeft.src = 'images/tab_active_left.gif';
                    tabImgRight.src = 'images/tab_active_right.gif';
                    tabLabel.background = 'images/tab_active_bg.gif';
                    tabContent.style.visibility = 'visible';
                    tabContent.style.display = 'block';
                    continue;
                }
                var tabImgLeft = eval('document.all.tabImgLeft__' + i_tr);
                var tabImgRight = eval('document.all.tabImgRight__' + i_tr);
                var tabLabel = eval('document.all.tabLabel__' + i_tr);
                var tabContent = eval('document.all.tabContent__' + i_tr);

                tabImgLeft.src = 'images/tab_unactive_left.gif';
                tabImgRight.src = 'images/tab_unactive_right.gif';
                tabLabel.background = 'images/tab_unactive_bg.gif';
                tabContent.style.visibility = 'hidden';
                tabContent.style.display = 'none';
            }
        }
        function check() {
            if ($("#HdnSelectedValues").val() == undefined || $("#HdnSelectedValues").val() == "") {
                alert("请先选择数据！");
                return false;
            }
            else return true;
        }
        tabClick(0, 2);
    </script>
    </form>
    <br>
</body>
</html>
