<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductShow.aspx.cs" Inherits=" KZS.Web.Manage.ProductShow" %>

<!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 runat="server">
    <title></title>
    <script src="/Common/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="/Common/ajax.js" type="text/javascript"></script>
    <link href="Template/Images/global.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript">
        function del() {
            if (confirm("真的要删除这条记录吗？删除后将无法恢复！")) {
                return true;
            }
            else {
                return false;
            }
        }

        function addText() {

            document.getElementById("MyText").innerHTML += document.getElementById("mm").innerHTML;

        }
    </script>
    <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#Btn_UrlAdd").click(function () {

                if ($("#UrlAdd").find("div").length < 4) {
                    $("#UrlAdd").append("<div>图片上传：<input type=\"file\" name=\"ShowUrl\" size=\"20\"> 链接地址：<input type=\"text\" name=\"LinkUrl\" size=\"20\"><input class=\"del\" type=\"button\" value=\"删除\" /></div>");

                }
                else
                    alert("最多只能添加三张图片！");
            });
            jQuery(".del").live("click", function () { jQuery(this).parent().remove() });
            <%if(!string.IsNullOrEmpty( Request.QueryString["Action"])){ %>
            var editor = new baidu.editor.ui.Editor({
                textarea: 'ArtContent'
            });
            editor.render("ArtContent");
            <%} %>
        });
    </script>
    <style type="text/css">
        .border
        {
            background: #ffffff;
            line-height: 120%;
            border: 1px solid #449AE8;
        }
        .tddd
        {
            font-family: 楷体_GB2312;
            color: #FF0000;
        }
    </style>
    <%-- <script language="javascript">
        function showUrlType() {
        if(document.getElementById("ShowType").value==<%=LibHelper.ShowType.图片.GetHashCode() %>)
        {
            document.getElementById("uploadfile").style.display="block";
            document.getElementById("VideoUrl").style.display="none";
        }else if(document.getElementById("ShowType").value==<%=LibHelper.ShowType.视频.GetHashCode() %>)
        {
            document.getElementById("uploadfile").style.display="none";
            document.getElementById("VideoUrl").style.display="block";
        }else
        {
            document.getElementById("uploadfile").style.display="none";
            document.getElementById("VideoUrl").style.display="none";
        }
        }
    </script>--%>
</head>
<body>
    <div id="topitem">
    </div>
    <form id="form1" runat="server">
    <div id="div_show" runat="server">
        <table border="1" width="100%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td colspan="5" class="Pager">
                    <a href="?Action=Add">添加产品</a> 搜索：<input type="text" name="sKey" value="<%=Request["sKey"] %>" />
                    <%=ShowClassId %><input type="submit" name="s" value="查找" />
                </td>
            </tr>
            <tr class="tit talc">
                <td align="center">
                    产品名称
                </td>
                <%--  <td align="center">
                    展示类型
                </td>--%>
                <td align="center">
                    产品分类
                </td>
                <td align="center">
                    添加时间
                </td>
                <td align="center">
                    操作
                </td>
            </tr>
            <%=GetProductShowList() %>
            <tr>
                <td colspan="5" id="Pager" class="Pager" runat="server">
                </td>
            </tr>
        </table>
    </div>
    <div id="div_edit" runat="server">
        <table border="1" width="80%" class="lsttab" style="border-collapse: collapse" bordercolor="#C0C0C0">
            <tr>
                <td class="tit talc" style="width: 70px;">
                    产品名称：
                </td>
                <td>
                    <input type="text" name="title" value="<%=utitle %>" style="width: 50%;" />
                </td>
            </tr>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    产品分类：
                </td>
                <td>
                    <%=ShowClassId %>
                </td>
            </tr>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    展示图片：
                </td>
                <td id="UrlAdd">
                    <div> 
                        <input id="Btn_UrlAdd" type="button" value="再加一张" />建议图像像素为：310 X 310，链接地址如不做链接可放空。<%=li_careful %></div>
                    <%=UrlString%>
                </td>
            </tr>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    产品说明：
                </td>
                <td>
                    <script id="ArtContent" type="text/plain"><%=showcontent %></script>
                </td>
            </tr>
            <%--<tr>
                 <td class="tit talc" style="width: 70px;">
                    产品标签：
                </td>
                <td>
                    <input type="text" name="labels" value="<%=labelstr %>" style="width: 50%;" />
                    <span style="color: Red">&nbsp;注意：标签与标签之间用逗号（中英文皆可）或空格隔开
                </td>
            </tr>--%>
            <tr>
                <td class="tit talc" style="width: 70px;">
                    操作
                </td>
                <td>
                    <input type="submit" name="sure" id="sure" value="确定" />
                    <input onclick="javascript:history.back();"  value="返回" type="button" />
                </td>
            </tr>
        </table>
        <div runat="server" visible="false">
            产品类型：<select size="1" name="ShowType" id="ShowType" onchange="showUrlType();">
                <option value="0">请选择</option>
                <option value="<%=LibHelper.ShowType.图片.GetHashCode() %>" <%=LibHelper.ShowType.图片.GetHashCode().ToString()==ShowType?"selected":"" %>>
                    <%=LibHelper.ShowType.图片.ToString() %></option>
                <option value="<%=LibHelper.ShowType.视频.GetHashCode() %>" <%=LibHelper.ShowType.视频.GetHashCode().ToString()==ShowType?"selected":"" %>>
                    <%=LibHelper.ShowType.视频.ToString() %></option>
            </select></div>
        <div>
            <asp:FileUpload ID="FacePic" runat="server" Visible="false" />
        </div>
        <div id="uploadfile">
        </div>
        <div id="VideoUrl">
            <%--  视频地址：<input type="text" name="ShowUrl" value="<%=uShowUrl %>" />--%>
        </div>
        <div>
        </div>
        <div id="div_sure" runat="server">
        </div>
    </div>
    <div>
        <div id="mm" style="display: none;">
            <div>
                属性名：<input id="Text1" name="attributeName" value="<%=attributeName %>" />&nbsp;属性值：<input
                    id="Text2" name="attributeValue" value="<%=attributeValue %>" /></div>
        </div>
    </div>
    <div id="MyText" runat="server">
        <input onclick="addText();" type="button" value="增加属性(Add)" />
        <%=EditAttStr%>
        <div>
            属性名：<input name="attributeName" value="" />&nbsp;属性值：<input id="attributeValue" name="attributeValue"
                value="" /></div>
    </div>
    </form>
    <%-- <script language="javascript">
        showUrlType();
    </script>--%>
</body>
</html>
