<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True"
    EnableEventValidation="false" Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.PhotoPreview"
    CodeBehind="PhotoPreview.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","<%=TabTitle3.ClientID %>");
   var arrTrs0 = new Array("TabsBase");
   var arrTrs1 = new Array(<%= arrTrs0 %>);
   var arrTrs2 = new Array("TabsCharge");
   var arrTrs3 = new Array("TabsHitHistory");
   var arrTab = new Array(arrTrs0,arrTrs1,arrTrs2,arrTrs3);
   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" onclick="ShowTabs(2)" style="display: none">
                收费信息
            </td>
            <td id="TabTitle3" class="tabtitle" runat="server" onclick="ShowTabs(3)">
                会员访问记录
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="border">
        <tbody id="TabsBase">
            <tr class="tdbg">
                <td width="15%" class="tdbgleft" align="right">
                    <strong>图片名称</strong>：&nbsp;
                </td>
                <td width="35%">
                    <%=GetValue("Title")%>
                </td>
                <td width="50%" colspan="2" rowspan="7" align="center" valign="middle">
                    <%=GetImgPath("DefaultPicUrl", "Title")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>图片作者</strong>：&nbsp;
                </td>
                <td width="200">
                    <%=GetValue("Author")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>录入者</strong>：&nbsp;
                </td>
                <td width="200">
                    <%=GetValue("Inputer")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>编辑</strong>：&nbsp;
                </td>
                <td width="200">
                    <%=GetValue("Editor")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>更新时间</strong>：&nbsp;
                </td>
                <td width="200">
                    <%=GetValue("UpdateTime")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>评分等级</strong>：&nbsp;
                </td>
                <td width="200">
                    <%=GetValue("Stars")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>查看次数</strong>：&nbsp;
                </td>
                <td>
                    本日：<%=GetValue("DayHits")%>
                    本周：<%=GetValue("WeekHits")%>
                    本月：<%=GetValue("MonthHits")%>
                    总计：<%=GetValue("Hits")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>图片地址</strong>：&nbsp;
                </td>
                <td colspan="3">
                    <%=GetDownloadurl("PhotoUrl")%>
                </td>
            </tr>
            <tr class="tdbg">
                <td align="right" class="tdbgleft">
                    <strong>图片简介</strong>：&nbsp;
                </td>
                <td colspan="3">
                   <iframe marginwidth="5" marginheight="5" frameborder="0" name="ContentPreview" width="100%"
                        height="200px" src='ContentPreview.aspx?GeneralID=<%=Request["GeneralID"]%>&fieldName=PhotoIntro'></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" style="width:85%;word-break:break-all; word-wrap:break-word;">
                        <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="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>
