<%@ Page Language="c#" Inherits="Web.Wpdcc.manageWatermark" CodeBehind="manageWatermark.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>Set UploadFilesProperty</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/head.htm"-->

    <link rel="stylesheet" href="../../Wpedt/WpdccEditor/themes/default/default.css" />
    <style>
        #ColorPicker {
            z-index: 1; /*修改拾色器显示层级*/
        }
    </style>
    <style>
        .ke-input-text {
            padding: 0px 0px !important;
        }
        /*编辑器上传弹出框文本框样式*/
    </style>
    <script language="javascript" src="../../Js/ColorPicker.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../Wpedt/WpdccEditor/kindeditor.js"></script>

    <script type="text/javascript" src="../../Wpedt/WpdccEditor/lang/zh_CN.js" charset="utf-8"></script>

    <script type="text/javascript" language="javascript">
        //自定义上传图片控件加载，支持自定义上传图片功能需先引用三个文件，[themes/default/default.css] [kindeditor.js] [lang/zh_CN.js]
        KindEditor.ready(function (K) {
            var editor = K.editor({
                uploadJson: '../../Wpedt/WpdccEditor/aspnet/upload_json.ashx',
                fileManagerJson: '../../Wpedt/WpdccEditor/aspnet/file_manager_json.ashx',
                allowFileManager: true
            });
            K('#uploadimg').click(function () {
                editor.loadPlugin('zdywatermark', function () {
                    editor.plugin.zdywatermarkDialog({
                        zdywatermarkUrl: K('#watermarkimageName').val(),
                        clickFn: function (url) {
                            K('#watermarkimageName').val(url);
                            editor.hideDialog();
                            change();//加载预览图片
                        }
                    });
                });
            });

        });

    </script>

    <script language="javascript" type="text/javascript">
        //保存前验证（改用统一验证js）
        function editCheck() {
            if (checkAllValidate()) {
                return true;
            }
            else {
                return false;
            }
        }

        function setcolor(type) {
            var arr = showModalDialog("../../Wpedt/WpdccEditor/Dialog/selcolor.htm", "", "dialogWidth:300px; dialogHeight:260px; status:0");
            if (arr != null) {
                var button = eval("document.system." + type);
                button.value = arr;
                var table = eval(type + "Table");
                table.bgColor = arr;
            }
        }

        function setTableColor(type) {

            var button = eval("document.system." + type);
            var table = eval(type + "Table");
            table.bgColor = button.value;
        }


        //加载预览图片
        function change() {
            if (document.system.watermarkimageName.value != "") {
                var arr = document.system.watermarkimageName.value;
                document.getElementById("watermarkPic").innerHTML = "<img src=" + arr + " height='60' width='170' />";
            }
        }

    </script>

</head>
<body>
    <div class="main-content-inner">
        <!-- #section:basics/content.breadcrumbs -->
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="ace-icon fa  fa-desktop"></i>
                    <a href="../welcome.aspx">主页</a>
                </li>
                <li>网站高级属性设置
                </li>
                <li class="active">水印设置</li>
            </ul>
            <!-- /.breadcrumb -->

            <!-- /section:basics/content.searchbox -->
        </div>
        <!-- /section:basics/content.breadcrumbs -->
        <div class="page-content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="edit-func-box func-box">
                        <form id="system" method="post" runat="server">
                            <!-- #section:elements.tab.option -->
                            <div class="tabbable">
                                <ul class="nav nav-tabs" id="myTab4">
                                    <li>
                                        <a aria-expanded="false" href="manageUploadFilesProperty.aspx" data-toggle="tab">上传限制</a>
                                    </li>
                                    <li class="active">
                                        <a aria-expanded="false" href="manageWatermark.aspx" data-toggle="tab">水印设置</a>
                                    </li>
                                    <li>
                                        <a aria-expanded="false" href="manageMessageBoardProperty.aspx" data-toggle="tab">留言本</a>
                                    </li>
                                    <li>
                                        <a aria-expanded="false" href="manageMobile.aspx" data-toggle="tab">手机微站</a>
                                    </li>
                                    <li>
                                        <a aria-expanded="false" href="manageSSOProperty.aspx" data-toggle="tab">单点登录</a>
                                    </li>
                                    <li>
                                        <a aria-expanded="false" href="manageRegService.aspx" data-toggle="tab">服务注册管理</a>
                                    </li>
                                    <li>
                                        <a aria-expanded="false" href="manageSMTP.aspx" data-toggle="tab">邮件服务参数设置</a>
                                    </li>
                                </ul>
                            </div>
                            <!-- /section:elements.tab.option -->
                            <div class="bd tab-content">
                                <table class="edit-table">
                                    <tr>
                                        <th width="15%">水印类型：
                                        </th>
                                        <td width="35%">
                                            <asp:DropDownList ID="watermarkStat" runat="server" CssClass="input-md">
                                                <asp:ListItem Value="0" Selected="True">文字</asp:ListItem>
                                                <asp:ListItem Value="1">图片</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                        <th width="15%">是否启用水印：
                                        </th>
                                        <td width="35%">
                                            <asp:DropDownList ID="watermarkUseMode" runat="server" CssClass="input-md">
                                                <asp:ListItem Value="0">强制不启用</asp:ListItem>
                                                <asp:ListItem Value="1">强制启用</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">由用户选择</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>文字水印内容：
                                        </th>
                                        <td>
                                            <asp:TextBox ID="watermarkText" runat="server" class="input-md"></asp:TextBox>
                                        </td>
                                        <th>文字水印字体：
                                        </th>
                                        <td>
                                            <asp:DropDownList ID="watermarkFont" runat="server" CssClass="input-md">
                                                <asp:ListItem Value="宋体">宋体</asp:ListItem>
                                                <asp:ListItem Value="黑体">黑体</asp:ListItem>
                                                <asp:ListItem Value="楷体_GB2312">楷体</asp:ListItem>
                                                <asp:ListItem Value="仿宋_GB2312">仿宋</asp:ListItem>
                                                <asp:ListItem Value="隶书">隶书</asp:ListItem>
                                                <asp:ListItem Value="幼圆">幼圆</asp:ListItem>
                                                <asp:ListItem Value="Arial">Arial</asp:ListItem>
                                                <asp:ListItem Value="Arial Black">Arial Black</asp:ListItem>
                                                <asp:ListItem Value="Arial Narrow">Arial Narrow</asp:ListItem>
                                                <asp:ListItem Value="Brush Script MT">Brush Script MT</asp:ListItem>
                                                <asp:ListItem Value="Century Gothic">Century Gothic</asp:ListItem>
                                                <asp:ListItem Value="Comic Sans MS">Comic Sans MS</asp:ListItem>
                                                <asp:ListItem Value="Courier">Courier</asp:ListItem>
                                                <asp:ListItem Value="Courier New">Courier New</asp:ListItem>
                                                <asp:ListItem Value="MS Sans Serif">MS Sans Serif</asp:ListItem>
                                                <asp:ListItem Value="Script">Script</asp:ListItem>
                                                <asp:ListItem Value="System">System</asp:ListItem>
                                                <asp:ListItem Value="Times New Roman">Times New Roman</asp:ListItem>
                                                <asp:ListItem Value="Verdana">Verdana</asp:ListItem>
                                                <asp:ListItem Value="Wide Latin">Wide Latin</asp:ListItem>
                                                <asp:ListItem Value="Wingdings">Wingdings</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>文字水印字体颜色：
                                        </th>
                                        <td>
                                            <asp:TextBox ID="watermarkFontColor" runat="server" class="input-md "></asp:TextBox>&nbsp;<script>CreateCPBtn('watermarkFontColor');</script>

                                        </td>
                                        <th>文字水印阴影颜色：
                                        </th>
                                        <td>
                                            <asp:TextBox ID="watermarkShadowColor" runat="server" class="input-md "></asp:TextBox>&nbsp;<script>CreateCPBtn('watermarkShadowColor');</script>

                                        </td>
                                    </tr>
                                    <tr>
                                        <th>文字水印字体大小：
                                        </th>
                                        <td>
                                            <asp:TextBox ID="watermarkFontSize" runat="server" class="input-mini" notNull="true"
                                                dataType="integer" minValue="1" maxValue="99" msgname="水印字体大小">15</asp:TextBox>
                                            <span class="tip">px</span>
                                        </td>
                                        <th>文字水印阴影大小：
                                        </th>
                                        <td>
                                            <asp:TextBox ID="watermarkShadowSize" runat="server" class="input-mini"
                                                notNull="true" dataType="integer" minValue="1" msgname="水印阴影大小"></asp:TextBox>
                                            <span class="tip">px</span>
                                        </td>
                                    </tr>
                                    <tr>
                                    </tr>
                                    <tr>
                                        <th>水印图片：
                                        </th>
                                        <td>
                                            <div id="watermarkPic" class="cboxElement" data-rel="colorbox" runat="server"></div>
                                            <a id="uploadimg" class="btn btn-primary btn-xs"><i class="ace-icon fa fa-cloud-upload"></i>上传 </a>
                                            <input id="watermarkimageName" type="hidden" name="Hidden1" runat="server" />
                                            <span class="tip">推荐尺寸170*60px左右且画质较好的图片</span>
                                        </td>
                                        <th>水印位置：
                                        </th>
                                        <td>
                                            <asp:DropDownList ID="watermarkPlace" runat="server" CssClass="input-md">
                                                <asp:ListItem Value="LT">左上</asp:ListItem>
                                                <asp:ListItem Value="LM">左中</asp:ListItem>
                                                <asp:ListItem Value="LB">左下</asp:ListItem>
                                                <asp:ListItem Value="TM">中上</asp:ListItem>
                                                <asp:ListItem Value="MM">居中</asp:ListItem>
                                                <asp:ListItem Value="BM">中下</asp:ListItem>
                                                <asp:ListItem Value="RT">右上</asp:ListItem>
                                                <asp:ListItem Value="RM">右中</asp:ListItem>
                                                <asp:ListItem Value="RB">右下</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>水印图片透明效果：
                                        </th>
                                        <td colspan="3">
                                            <asp:TextBox ID="watermarkClarity" runat="server" class="input-mini" notNull="true"
                                                dataType="integer" minValue="1" maxValue="10" MaxLength="2" msgname="水印图片透明效果">5</asp:TextBox>
                                            <span class="tip">有效范围1-10,1表示强透明，10表示不透明</span>
                                        </td>
                                    </tr>
                                    <%--<tr id="trInfo" runat="server">
                                        <td align="center" colspan="2" height="24">
                                            <asp:Label ID="lblInfo" runat="server" ForeColor="red"></asp:Label>
                                        </td>
                                    </tr>--%>
                                </table>
                                <div class="ft">
                                    <div class="action-field btn-pl">
                                        <asp:Button ID="btnSave" class="btn btn-sm btn-primary" runat="server" Text="修 改" OnClientClick="return editCheck();" OnClick="btn_Click"></asp:Button>&nbsp;
                                    <asp:Button ID="btnReset" class="btn btn-sm btn-primary" runat="server" Text="重 载" OnClick="btn_Click"></asp:Button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!-- PAGE CONTENT ENDS -->
                </div>
            </div>
        </div>
        <!-- /.page-content -->
    </div>
</body>
</html>
