<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProductPic.aspx.cs" Inherits="Admin_Product_ProductPic"
    EnableViewState="true" %>

<%@ Register Src="../Controls/EditionItem.ascx" TagName="EditionItem" TagPrefix="uc2" %>
<%@ Register Assembly="SnSee.Control" Namespace="SnSee.Control" TagPrefix="cc1" %>
<%@ 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 id="Head1" runat="server">
    <title></title>
    <link href="../Stylesheet/Main.css" rel="stylesheet" type="text/css" />

    <script src="../Javascript/Common.js" type="text/javascript" language="JavaScript"></script>

</head>
<body>
    <form id="form1" runat="server">
        <ul class="tool">
            <li onmousemove="this.className='tool_li_ac'" onmouseout="this.className=''">
                <img src="../Images/icon_add.gif" width="14" height="14" align="absmiddle" />
                <a href="Product.aspx?ProductClassParentID=<%=ProductClassParentID %>" title="增加产品">增加产品</a></li>
            <li onmousemove="this.className='tool_li_ac'" onmouseout="this.className=''" id="boxDel"
                runat="server" visible="false">
                <img src="../Images/icon_del.gif" width="12" height="12" align="absmiddle" />
                <asp:LinkButton ID="lbtnDel" runat="server" OnClick="lbtnDel_Click" OnClientClick="return confirm('当产品放入回收站时，同时将当前产品所在全部语言版本的产品也将放入回收站，确定要操作吗？')"
                    ToolTip="将当前产品放入回收站">放入回收站</asp:LinkButton></li>
            <li>
                <div class="tool_back">
                    <a href="javaScript:history.back(-1)">返回上一步</a></div>
            </li>
        </ul>
        <div class="main_body">
            <h1>
                <asp:Literal ID="litTitle" runat="server" Text="上传产品相关图片"></asp:Literal></h1>
            <div class="item">
                <ul class="item_list">
                    <li class="item_list_cell margin_left_2px">
                        <div>
                            <a href="Product.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">第一步：产品基本资料</a>
                        </div>
                    </li>
                    <li class="item_list_cell">
                        <div>
                            <a href="ProductEdition.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">第二步：填写产品不同语言版本资料</a>
                        </div>
                    </li>
                    <li class="item_list_cell_ac">
                        <div>
                            <a href="ProductPic.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>">产品其它相关图片</a>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="item_body">
                <div class="ht">
                </div>
                <asp:Panel ID="pnlPicAll" runat="server" Visible="false">
                    <div class="item">
                        <ul class="item_list">
                            <li class="item_list_cell_ac" id="pnlTitlePic" runat="server">
                                <div>
                                    <a href="ProductPic.aspx?ID=<%=ProductBaseID %>&ProductPicBaseID=<%=ProductPicBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>&Ac=Pic">
                                        图片上传</a>
                                </div>
                            </li>
                            <li class="item_list_cell margin_left_2px" id="pnlTitlePicInfo" runat="server">
                                <div>
                                    <a href="ProductPic.aspx?ID=<%=ProductBaseID %>&ProductPicBaseID=<%=ProductPicBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>&Ac=PicInfo">
                                        图片资料填写</a>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <asp:Panel ID="pnlPic" runat="server" Visible="false">
                        <div class="item_body">
                            <ul class="item_body_list" id="item_body_list">
                                <asp:Panel ID="pnlPicPath1" runat="server">
                                    <li><span class="item_body_list_left">&nbsp;&nbsp;&nbsp;大图：</span> <span class="item_body_list_right">
                                        <asp:FileUpload ID="fuPicPath1" runat="server" Width="380px" />
                                        <asp:Literal ID="litMustProductPicPath1" runat="server">*</asp:Literal>
                                        (尺寸：<%=SnSee.Config.ProductConfig.ProductOtherPicPath1Width%>×<%=SnSee.Config.ProductConfig.ProductOtherPicPath1Height%>)
                                    </span></li>
                                    <li><span class="item_body_list_left">自动生成：</span><span class="item_body_list_right">
                                        <asp:CheckBox ID="chkIsMakeProductPicPath1" runat="server" Text="自动生成大图" CssClass="input_no" />
                                        <asp:CheckBox ID="chkIsMakeProductPicPath2" runat="server" Text="自动生成中图" CssClass="input_no"
                                            onclick="ShowObject(this, 'pnlPicPath2')" />
                                        <asp:CheckBox ID="chkIsMakeProductPicPath3" runat="server" Text="自动生成小图" CssClass="input_no"
                                            onclick="ShowObject(this, 'pnlPicPath3')" />
                                        (注：自动生成图片时将会按照系统设置的尺寸生成，生成的图片有质量损失) </span></li>
                                    <li runat="server" id="boxPicPath1" visible="false" style="height: 150px; overflow: scroll;
                                        width: 680px;">
                                        <asp:Image ID="imgPicPath1" runat="server" /></li>
                                </asp:Panel>
                                <asp:Panel ID="pnlPicPath2" runat="server">
                                    <li class="ac"><span class="item_body_list_left">&nbsp;&nbsp;&nbsp;中图：</span> <span
                                        class="item_body_list_right">
                                        <asp:FileUpload ID="fuPicPath2" runat="server" Width="380px" />
                                        <asp:Literal ID="litMustProductPicPath2" runat="server">*</asp:Literal>
                                        (尺寸：<%=SnSee.Config.ProductConfig.ProductOtherPicPath2Width%>×<%=SnSee.Config.ProductConfig.ProductOtherPicPath2Height%>)
                                    </span></li>
                                    <li class="ac" runat="server" id="boxPicPath2" visible="false" style="height: 150px;
                                        overflow: scroll; width: 680px;">
                                        <asp:Image ID="imgPicPath2" runat="server" /></li>
                                </asp:Panel>
                                <asp:Panel ID="pnlPicPath3" runat="server">
                                    <li><span class="item_body_list_left">* 小图：</span> <span class="item_body_list_right">
                                        <asp:FileUpload ID="fuPicPath3" runat="server" Width="380px" />
                                        <asp:Literal ID="litMustProductPicPath3" runat="server">*</asp:Literal>
                                        (尺寸：<%=SnSee.Config.ProductConfig.ProductOtherPicPath3Width%>×<%=SnSee.Config.ProductConfig.ProductOtherPicPath3Height%>)
                                    </span></li>
                                    <li runat="server" id="boxPicPath3" visible="false" style="height: 150px; overflow: scroll;
                                        width: 680px;">
                                        <asp:Image ID="imgPicPath3" runat="server" /></li>
                                </asp:Panel>
                            </ul>
                            <div class="padding8px align_center font_bold ht_color">
                                <asp:LinkButton ID="lbtnSavePic" runat="server" CssClass="btn_bg" OnClick="lbtnSavePic_Click">保存产品相关图片，进入下一步：图片资料填写</asp:LinkButton></div>
                        </div>
                    </asp:Panel>
                    <asp:Panel ID="pnlPicInfo" runat="server" Visible="false">
                        <div class="item">
                            <ul class="item_list">
                                <li>
                                    <div>
                                        <uc2:EditionItem ID="EditionItem1" runat="server" />
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="item_body" id="Div1" runat="server">
                            <ul class="item_body_list">
                                <li><span class="item_body_list_left">图片分类：</span> <span class="item_body_list_right">
                                    <asp:DropDownList ID="dropProductPicClass" runat="server" DataTextField="ClassName"
                                        DataValueField="ID">
                                    </asp:DropDownList>
                                </span></li>
                                <li><span class="item_body_list_left">标题：</span> <span class="item_body_list_right">
                                    <asp:TextBox ID="txtTitle" runat="server" Width="380px"></asp:TextBox>
                                </span></li>
                                <li class="ac"><span class="item_body_list_left">排序：</span> <span class="item_body_list_right">
                                    <asp:TextBox ID="txtSortOrder" runat="server" Width="60px" Text="0"></asp:TextBox>
                                </span></li>
                                <li class="ac"><span class="item_body_list_left">描述：</span></li>
                                <li class="align_center">
                                    <FCKeditorV2:FCKeditor ID="txtBody" runat="server" Height="200px" Width="99%">
                                    </FCKeditorV2:FCKeditor>
                                </li>
                                <li><span class="item_body_list_left">状态：</span> <span class="item_body_list_right">
                                    <asp:DropDownList ID="dropState" runat="server">
                                        <asp:ListItem Value="1">启用</asp:ListItem>
                                        <asp:ListItem Value="0">不启用</asp:ListItem>
                                    </asp:DropDownList>
                                    * </span></li>
                            </ul>
                            <div class="padding8px align_center font_bold ht_color">
                                <asp:LinkButton ID="lbtnSavePicInfo" runat="server" CssClass="btn_bg" OnClick="lbtnSavePicInfo_Click">保存产品相关图片资料</asp:LinkButton></div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <asp:Panel ID="pnlPicList" runat="server">
                    <div class="item">
                        <ul class="item_list">
                            <li class="item_list_cell margin_left_2px">
                                <div>
                                    <a href="ProductPicBaseList.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>">相关图片基础资料列表</a>
                                </div>
                            </li>
                            <li>
                                <div>
                                    <uc2:EditionItem ID="EditionItem2" runat="server" />
                                </div>
                            </li>
                            <li style="margin-left: 10px;">
                                <div>
                                    搜索：<asp:DropDownList ID="dropProductPicClass2" runat="server" DataTextField="ClassName"
                                        DataValueField="ID">
                                    </asp:DropDownList>
                                    <asp:TextBox ID="txtKeyword" runat="server" Width="100px"></asp:TextBox>
                                    <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn_bg" OnClick="lbtnSearch_Click">搜索</asp:LinkButton>
                                </div>
                            </li>
                        </ul>
                        <li class="float_right font_bold"><a href="ProductPic.aspx?ID=<%=ProductBaseID %>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID %>&Ac=Pic">
                            + 增加图片</a>&nbsp;&nbsp;</li>
                    </div>
                    <div class="divbox2">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbbox">
                            <tr>
                                <th width="20%" id="boxOtherPicPath3" runat="server">
                                    产品图片
                                </th>
                                <th width="15%">
                                    所属分类
                                </th>
                                <th>
                                    标题
                                </th>
                                <th width="8%">
                                    状态
                                </th>
                                <th width="8%">
                                    排序
                                </th>
                                <th width="7%">
                                    操作
                                </th>
                            </tr>
                            <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand">
                                <ItemTemplate>
                                    <tr>
                                        <td align="center" id="boxOtherPicPath3" runat="server" visible="<%#SnSee.Config.ProductConfig.ProductOtherPicPath3Open %>">
                                            <img src="<%#Eval("PicPath3") %>" width="80" border="0" />
                                        </td>
                                        <td align="center">
                                            <%#Eval("ClassName")%>
                                        </td>
                                        <td align="center">
                                            <%#Eval("Title")%>
                                        </td>
                                        <td align="center">
                                            <%#Eval("State") != DBNull.Value && Eval("State").ToString()=="1" ? "启用":"未启用"%>
                                        </td>
                                        <td align="center">
                                            <%#Eval("SortOrder") %>
                                        </td>
                                        <td align="center">
                                            <a href="ProductPic.aspx?ID=<%#Eval("ProductBaseID")%>&ProductPicBaseID=<%#Eval("ProductPicBaseID")%>&ProductClassParentID=<%=ProductClassParentID %>&EditionID=<%=EditionID%>&Ac=PicInfo"
                                                title="编辑当前产品图片">
                                                <img src="../images/icon_bj.gif" border="0" align="absmiddle" /></a>
                                            <asp:LinkButton ID="lbtnDel" runat="server" ToolTip="将当前图片彻底删除" CommandArgument='<%#Eval("ProductPicListID")%>'
                                                CommandName="Delete_Command" OnClientClick="return confirm('确认将当前图片彻底删除？')"><img src="../images/icon_sc.gif" border="0" align="absmiddle" /></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                    <div class="webpage">
                        <cc1:WebPage ID="WebPage1" runat="server" PageSize="20">
                        </cc1:WebPage>
                    </div>
                </asp:Panel>
            </div>
            <div class="ht">
            </div>
            <ul class="ac_intro" runat="server" id="boxPageExplain">
                <li class="ac_intro_title">说明：</li>
                <li class="ac_intro_item">增加产品共分为三步，如下：</li>
                <li class="ac_intro_item">1. 上传产品基础资料；</li>
                <li class="ac_intro_item">2. 填写产品不同语言版本资料；</li>
                <li class="ac_intro_item">3. 产品如果存在其它相关图片，请在“产品其它相关图片”项上传图片；</li>
            </ul>
        </div>
    </form>

    <script language="javascript" type="text/javascript">
        LiColor("item_body_list");
    </script>

</body>
</html>
