<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True"
    EnableEventValidation="false" ValidateRequest="false" Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.ContentView"
    CodeBehind="ContentView.aspx.cs" Title="查看内容" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="Server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" CurrentNode="查看内容"
        runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="Server">

<script language="JavaScript" type="text/JavaScript">
   var tID=0;
   var arrTabTitle = new Array("TabTitle0", "TabTitle1", "<%= TabTitle5.ClientID %>", "<%= TabTitle6.ClientID %>", "<%=TabTitle7.ClientID %>","TabTitle8");
   var arrTrs0 = new Array(<%= arrTrs0 %>);
   var arrTrs1 = new Array(<%= arrTrs1 %>);
   var arrTrs2 = new Array("TabsCharge");
   var arrTrs3 = new Array("TabsSign");
   var arrTrs4 = new Array("TabsHitHistory");
   var arrTrs5 = new Array("TabsNotApproveOpinion");
   var arrTab = new Array(arrTrs0, arrTrs1, arrTrs2, arrTrs3, arrTrs4, arrTrs5);
   function ShowTabs(ID)
   {
       if(ID!=tID)
       {
           document.getElementById(arrTabTitle[tID].toString()).className = "tabtitle";
           document.getElementById(arrTabTitle[ID].toString()).className = "titlemouseover";
           
           for (var i = 0; i < arrTab.length; i++) 
           {
                var tab = arrTab[i];
                if(i==ID)
                {
                    for (var j = 0; j < tab.length; j++) 
                    {
                       document.getElementById(tab[j].toString()).style.display = "";
                    }
                }
                else
                {
                    for (var j = 0; j < tab.length; j++) 
                    {
                       document.getElementById(tab[j].toString()).style.display = "none";
                    }
                }
           }
           
           tID=ID;
        }
    }
    
    function ShowDownstageContent(url)
    {
        window.open(url,'_blank');
    }
    </script>

    <div style="padding-top: 5px;">
    </div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr align="center">
            <td id="TabTitle0" class="titlemouseover" onclick="ShowTabs(0)">
                基本信息
            </td>
            <td id="TabTitle1" class="tabtitle" onclick="ShowTabs(1)">
                属性信息
            </td>
            <td id="TabTitle5" class="tabtitle" runat="server" onclick="ShowTabs(2)">
                收费选项
            </td>
            <td id="TabTitle6" runat="server" class="tabtitle" onclick="ShowTabs(3)">
                签收选项
            </td>
            <td id="TabTitle7" class="tabtitle" runat="server" onclick="ShowTabs(4)">
                会员访问记录
            </td>
            <td id="TabTitle8" class="tabtitle" onclick="ShowTabs(5)">退稿意见
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="border">
        <asp:Repeater ID="RptContent" runat="server" OnItemDataBound="RptContent_ItemDataBound">
            <ItemTemplate>
                <tr id="Tab" runat="server" class="tdbg">
                    <td class="tdbgleft" style="width: 15%;" align="right">
                        <strong>
                            <%# Eval("FieldAlias")%>
                            ：&nbsp;</strong>
                    </td>
                    <td class="tdbg" align="left" style="min-height: 100%; word-break: break-all; white-space: normal;
                        white-space: normal; word-wrap: break-word; line-break: strict;">
                        <asp:Literal ID="LitContentText" runat="server"></asp:Literal><asp:Panel ID="PnlContent"
                            runat="server">
                        </asp:Panel>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tbody id="TabsCharge" style="display: none">
            <pec:ContentCharge ID="ContentCharge" runat="server" />
        </tbody>
        <tbody id="TabsSign" style="display: none">
            <tr class="tdbg">
                <td class="tdbgleft" align="right" style="width: 150px;">
                    <strong>文档类型：&nbsp;</strong>
                </td>
                <td class="tdbg" align="left">
                    <asp:Label ID="LblSigninType" runat="server"></asp:Label>
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right" style="width: 150px;">
                    <strong>优先级：&nbsp;</strong><br />
                </td>
                <td class="tdbg" align="left">
                    <asp:Label ID="LblPriority" runat="server"></asp:Label>
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right" style="width: 150px;">
                    <strong>签收截止日期：&nbsp;</strong><br />
                </td>
                <td class="tdbg" align="left">
                    <asp:Label ID="LblEndTime" runat="server"></asp:Label>
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right" style="width: 150px;">
                    <strong>签收状态：&nbsp;</strong><br />
                </td>
                <td class="tdbg" align="left">
                    <asp:Label ID="LblStatus" runat="server"></asp:Label>
                </td>
            </tr>
            <tr class="tdbg">
                <td class="tdbgleft" align="right" style="width: 150px;">
                    <strong>签收记录：&nbsp;</strong>
                </td>
                <td class="tdbg" align="left">
                    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="border">
                        <tr class="tdbgleft">
                            <td align="center">
                                签收用户
                            </td>
                            <td align="center">
                                是否签收
                            </td>
                            <td align="center">
                                签收时间
                            </td>
                            <td align="center">
                                签收IP
                            </td>
                        </tr>
                        <asp:Repeater ID="RptSigninLog" runat="server">
                            <ItemTemplate>
                                <tr class="tdbg">
                                    <td align="left">
                                        <%#Eval("UserName") %>
                                    </td>
                                    <td align="center">
                                        <%#(bool)Eval("IsSignin") ? "<span style=\"color:blue\"><b>√</b></span>" : "<span style=\"color:Red\"><b>×</b></span>"%>
                                    </td>
                                    <td align="center">
                                        <%#(bool)Eval("IsSignin") ? Eval("SigninTime").ToString() : "" %>
                                    </td>
                                    <td align="center">
                                        <%#Eval("IP") %>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </td>
            </tr>
        </tbody>
        <tbody id="TabsHitHistory" style="display: none">
            <pec:ShowUserHitHistory id="showUserHitHistory" runat="server" />
        </tbody>
        <tbody id="TabsNotApproveOpinion" style="display: none">
            <tr>
                <td>
                    <asp:Repeater ID="RetNotApproveOpinion" runat="server">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
                                <tr class="title">
                                    <td>退稿意见</td>
                                    <td>退稿人</td>
                                    <td>退稿时间</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="tdbg">
                                <td style="max-width: 800px;"><%# Eval("NotApproveOpinion")%></td>
                                <td style="width: 70px;"><%# Eval("Inputer")%></td>
                                <td style="width: 135px;"><%# Eval("NotApproveTime", "{0:yyyy-MM-dd HH:mm:ss}")%></td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </tbody>
    </table>
    <br />
    <pe:ExtendedNodeButton ID="EBtnModify" Text="修改/审核" IsChecked="false" NodeId='<%# Eval("NodeID")%>'
        OperateCode="ContentManage" OnClick="EBtnModify_Click" runat="server" />
    <pe:ExtendedNodeButton ID="EBtnDelete" Text="删除" IsChecked="false" NodeId='<%# Eval("NodeID")%>'
        OperateCode="ContentManage" OnClientClick="return confirm('确定要删除该信息吗？')" OnClick="EBtnDelete_Click"
        runat="server" />
        <asp:Button ID="EBtnRejection" Text="退稿" runat="server" OnClientClick="return ShowLayer('divNotApproveOpinion')" />
    <pe:ExtendedNodeButton ID="EBtnCheck" Text="审核通过" IsChecked="false" NodeId='<%# Eval("NodeID")%>'
        OperateCode="ContentManage" OnClientClick="return confirm('确定要审核通过该信息吗？')" OnClick="EBtnCheck_Click"
        runat="server" />
    <asp:Button ID="ShowDownstageContent" runat="server" Text="前台预览" />
    <pe:ExtendedButton ID="EBtnClear" Text="彻底删除" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
        OperateCode="CategoryRecycleInfoManage" OnClientClick="return confirm('确定要删除该信息吗？')"
        runat="server" />
    <pe:ExtendedButton ID="EbtnBack" Text="还原" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
        OperateCode="CategoryRecycleInfoManage" runat="server" />
    <br />
    <br />
    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="border">
        <tr>
            <td class="tdbg">
                <li>上一篇：<asp:HyperLink ID="LnkGetPrevInfo" runat="server"></asp:HyperLink></li>
                <li>下一篇：<asp:HyperLink ID="LnkGetNextInfo" runat="server"></asp:HyperLink></li>
            </td>
        </tr>
    </table>
    <br />
    <!-- 显示评论树开始 -->
    <pec:CommentManage ID="CommentManage" runat="server" />
    <!-- 显示评论树结束 -->
    <div id="divNotApproveOpinion" class="OrderPopupTips">
        <table width="100%">
            <tr>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;退稿原因：
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:TextBox ID="TxtRemark" runat="server" Width="80%" Height="40px" TextMode="MultiLine"
                        MaxLength="255"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <pe:ExtendedButton IsChecked="true" OperateCode="None" ID="BtnNotApproveOpinion" runat="server"
                        Text="确认退稿" Visible="true" OnClick="EBtnRejection_Click" />&nbsp;&nbsp;&nbsp;&nbsp;<input
                            type="button" class="inputbutton" name="hide" value=" 取消 " onclick="javascript: document.getElementById('divNotApproveOpinion').style.visibility = 'hidden';" />
                </td>
            </tr>
        </table>
    </div>

    <script type="text/javascript">
        function ShowLayer(id) {
            id = "#" + id;
            var j = jQuery.noConflict();
            var leftPosition = parseInt((j(document).width() - j(id).width()) / 2);
            var topPosition = parseInt(j(document).scrollTop() + 250);
            j(id).css({ "left": leftPosition.toString() + "px", "top": topPosition.toString() + "px", "visibility": "visible" });
            return false;
        }
    </script>
</asp:Content>
