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

<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","<%=TabTitle2.ClientID %>","<%=TabTitle3.ClientID%>","TabTitle4","<%= TabTitle5.ClientID%>");
   var arrTrs0 = new Array("TabsBase");
   var arrTrs1 = new Array(<%= arrTrs0 %>);
   var arrTrs2 = new Array("TabsCharge");
   var arrTrs3 = new Array("TabsSign");
   var arrTrs4 = new Array("TabsCorrelativeItem");
   var arrTrs5 = new Array("TabsHitHistory");
   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="TabTitle2" class="tabtitle" runat="server" onclick="ShowTabs(2)">
                收费信息
            </td>
            <td id="TabTitle3" class="tabtitle" runat="server" onclick="ShowTabs(3)">
                签收信息
            </td>
            <td id="TabTitle4" class="tabtitle" onclick="ShowTabs(4)">
                相关信息
            </td>
            <td id="TabTitle5" class="tabtitle" runat="server" onclick="ShowTabs(5)">
                会员访问记录
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="border">
        <tbody id="TabsBase">
            <tr align="center" class="tdbg">
                <td height="40" colspan="2">
                    <font size="4"><b>
                        <asp:Literal ID="LtrTitle" runat="server"></asp:Literal>
                    </b></font>
                </td>
            </tr>
            <tr align="center" class="tdbg">
                <td colspan="2">
                    作者：<asp:Literal ID="LtrAuthor" runat="server"></asp:Literal>
                    录入者：<asp:Literal ID="LtrInputer" runat="server"></asp:Literal>
                    编辑：<asp:Literal ID="LtrEditor" runat="server"></asp:Literal>
                    文章来源：<asp:Literal ID="LtrCopyFrom" runat="server"></asp:Literal>
                    点击数：<asp:Literal ID="LtrHits" runat="server"></asp:Literal>
                    更新时间：<asp:Literal ID="LtrUpdateTime" runat="server"></asp:Literal>
                    评分等级：<asp:Literal ID="LtrStars" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr class="tdbg">
                <td colspan="2">
                    <iframe marginwidth="5" marginheight="5" frameborder="0" name="ContentPreview" width="100%"
                        height="500px" src='ContentPreview.aspx?GeneralID=<%=Request["GeneralID"]%>&fieldName=Content'>
                    </iframe>
                </td>
            </tr>
        </tbody>
        <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>
                            <asp:Literal ID="LtrFieldAlias" Text='<%# Eval("FieldAlias")%>' runat="server"></asp:Literal>
                            ：&nbsp;</strong>
                    </td>
                    <td class="tdbg" align="left">
                        <pe:ExtendedLiteral ID="LitContentText" runat="server"></pe:ExtendedLiteral><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">
            <pec:ContentSigin ID="ContentSigin" runat="server" />
        </tbody>
        <tbody id="TabsCorrelativeItem" style="display: none">
            <tr>
                <td>
                    <asp:Repeater ID="RptCorrelativeItem" runat="server" OnItemDataBound="RptCorrelativeItem_ItemDataBound">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
                                <tr align="center" class="title">
                                    <td style="width: 90%">
                                        名称/标题
                                    </td>
                                    <td>
                                        排序
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="tdbg">
                                <td>
                                    <div class="linkType">
                                        <pe:ExtendedLabel ID="LblTitle" runat="server" HtmlEncode="false"></pe:ExtendedLabel>
                                    </div>
                                    <asp:HiddenField ID="GeneralId" runat="server" Value='<%# Eval("GeneralId")%>' />
                                    <asp:HiddenField ID="hdnModelId" Value='<%# Eval("ModelId")%>' runat="server" />
                                </td>
                                <td align="center">
                                    <asp:Label ID="LblOrderId" runat="server"></asp:Label>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </tbody>
        <tbody id="TabsHitHistory" style="display: none">
            <pec:ShowUserHitHistory id="showUserHitHistory" runat="server" />
        </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" OnClick="EBtnRejection_Click" />
    <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="前台预览" />
    <div id="Div1" style="display: none;">
        <pe:ExtendedNodeButton ID="EBtnMove" Text=" 移动 " IsChecked="true" NodeId='<%# Eval("NodeID")%>'
            OperateCode="ContentManage" OnClick="EBtnMove_Click" runat="server" />
        <pe:ExtendedNodeButton ID="EBtnBack" Text="直接退稿" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
            OperateCode="ContentManage" OnClick="EBtnBack_Click" runat="server" />
        <pe:ExtendedNodeButton ID="EBtnCPass" Text="取消审核" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
            OperateCode="ContentManage" OnClick="EBtnCPass_Click" runat="server" />
        <pe:ExtendedNodeButton ID="EBtnTop" Text="设为固顶" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
            OperateCode="ContentManage" OnClick="EBtnTop_Click" runat="server" />
        <pe:ExtendedNodeButton ID="EBtnEltiy" Text="设为推荐" IsChecked="true" NodeId='<%# Eval("NodeID")%>'
            OperateCode="ContentManage" OnClick="EBtnEltiy_Click" runat="server" />
    </div>
    <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" />
</asp:Content>
