<%@ Page Language="c#" Inherits="Web.Wpdcc.uploadFilesProperty" CodeBehind="manageUploadFilesProperty.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/adminCssEdit.htm"-->

    <script language="javascript" src="../Js/ColorPicker.js" charset="utf-8"></script>

    <link rel="stylesheet" href="../Editor/WpdccEditor/themes/default/default.css" />

    <script type="text/javascript" src="../Editor/WpdccEditor/kindeditor.js"></script>

    <script type="text/javascript" src="../Editor/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 : '../Editor/WpdccEditor/aspnet/upload_json.ashx',
				    fileManagerJson : '../Editor/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("../editor/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='18' width='70' />";
        }
    } 
    
    </script>

</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
            文件上传条件设置</div>
        <form id="system" method="post" runat="server">
        <div class="bd">
            <table class="edit-table">
                <tr>
                    <th width="15%">
                        图片格式：
                    </th>
                    <td width="85%">
                        <asp:TextBox ID="picType" class="input-txt w3" runat="server" notNull="true"
                            msgName="图片格式" ToolTip="允许上传的图片格式（对应编辑器中的单张和多张图片上传图标）"></asp:TextBox>
                            <span class="tip">中间以“|”隔开,如：gif|jpg|jpeg|bmp</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        flash格式：
                    </th>
                    <td>
                        <asp:TextBox ID="flashType" class="input-txt w3" runat="server" notNull="true"
                            msgName="flash格式" ToolTip="允许上传的flash格式，一般只有swf一种（对应编辑器中的flash图标）"></asp:TextBox>
                             <span class="tip">中间以“|”隔开</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        媒体格式：
                    </th>
                    <td>
                        <asp:TextBox ID="mediaType" class="input-txt w3" runat="server" notNull="true"
                            msgName="媒体格式" ToolTip="允许上传的视音频文件类别（对应编辑器的‘放映机’图标）"></asp:TextBox>
                            <span class="tip">中间以“|”隔开</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        附件格式：
                    </th>
                    <td>
                        <asp:TextBox ID="otherType" class="input-txt w3" runat="server" notNull="true"
                            msgName="其他格式" ToolTip="允许上传的附件文件格式（对应编辑器的‘插入文件’图标）"></asp:TextBox>
                            <span class="tip">中间以“|”隔开</span>
                    </td>
                </tr>
                <tr style="display: none;">
                    <th>
                        远程格式：
                    </th>
                    <td>
                        <asp:TextBox ID="remoteType" class="input-txt w3" runat="server"></asp:TextBox>中间以“|”隔开
                    </td>
                </tr>
                <tr>
                    <th>
                        图片上传大小限制：
                    </th>
                    <td>
                        <asp:TextBox ID="picSize" class="input-txt w3" runat="server" minValue="0"
                            MaxLength="6" dataType="integer" msgName="图片上传大小"></asp:TextBox>
                            <span class="tip">(单位为KB，0表示没有限制)</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        flash上传大小限制：
                    </th>
                    <td>
                        <asp:TextBox ID="flashSize" class="input-txt w3" runat="server" minValue="0"
                            notNull="true" MaxLength="7" dataType="integer" msgName="flash上传大小"  ></asp:TextBox>
                             <span class="tip">(单位为KB，0表示没有限制)</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        媒体文件上传大小限制：
                    </th>
                    <td>
                        <asp:TextBox ID="mediaSize" runat="server" class="input-txt w3" minValue="0"
                            notNull="true" MaxLength="7" dataType="integer" msgName="媒体文件上传大小"></asp:TextBox>
                             <span class="tip">(单位为KB，0表示没有限制)</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        其他文件上传大小限制：
                    </th>
                    <td>
                        <asp:TextBox ID="otherSize" runat="server" class="input-txt w3" minValue="0"
                            notNull="true" MaxLength="7" dataType="integer" msgName="其他文件上传大小"></asp:TextBox>
                           <span class="tip">(单位为KB，0表示没有限制)</span>
                    </td>
                </tr>
                <tr style="display: none;">
                    <th>
                        远程文件上传大小限制：
                    </th>
                    <td>
                        <asp:TextBox ID="remoteSize" runat="server" class="input-txt w1" minValue="0"
                            notNull="true" MaxLength="7" dataType="integer" msgName="远程文件上传大小"></asp:TextBox>
                            <span class="tip">(单位为KB，0表示没有限制)</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>
        <div class="hd" style="margin-top:15px;">
            网站水印设置</div>
        <div class="bd">
            <table class="edit-table">
                <tr>
                    <th width="15%">
                        水印类型：
                    </th>
                    <td width="35%">
                        <asp:DropDownList ID="watermarkStat" runat="server" CssClass="drop-txt">
                            <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="drop-txt">
                            <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-txt w1"></asp:TextBox>
                    </td>
                    <th>
                        文字水印字体：
                    </th>
                    <td>
                        <asp:DropDownList ID="watermarkFont" runat="server" CssClass="drop-txt">
                            <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-txt w1"></asp:TextBox>&nbsp;<script>CreateCPBtn('watermarkFontColor');</script>

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

                    </td>
                </tr>
                <tr>
                    <th>
                        文字水印字体大小：
                    </th>
                    <td>
                        <asp:TextBox ID="watermarkFontSize" runat="server" class="input-txt w1" notNull="true"
                            dataType="integer" minValue="1" msgname="水印字体大小">15</asp:TextBox>
                            <span class="tip">px</span>
                    </td>
                    <th>
                        文字水印阴影大小：
                    </th>
                    <td>
                        <asp:TextBox ID="watermarkShadowSize" runat="server" class="input-txt w1"
                            notNull="true" dataType="integer" minValue="1" msgname="水印阴影大小"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                </tr>
                <tr>
                    <th>
                        水印图片：
                    </th>
                    <td>
                        <div id="watermarkPic" style="display: inline; width: 70px; height: 15px" runat="server">
                        </div>
                        <a id="uploadimg" href="#" style="color: Blue">上传 </a>
                        <input id="watermarkimageName" type="hidden" name="Hidden1" runat="server" />&nbsp;&nbsp;&nbsp;
                        <span class="tip">推荐尺寸170*60px左右且画质较好的图片</span>
                    </td>
                    <th>
                        水印位置：
                    </th>
                    <td>
                        <asp:DropDownList ID="watermarkPlace" runat="server"  CssClass="drop-txt">
                            <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-txt w1" notNull="true"
                            dataType="integer" minValue="1" maxValue="10" MaxLength="2" msgname="水印图片透明效果">5</asp:TextBox>
                            <span class="tip">有效范围1-10,1表示强透明，10表示不透明</span>
                    </td>
                </tr>
            </table>
        </div>
        <div class="ft">
            <div class="action-field txt-c">
                <asp:Button ID="editSystem" class="btn" runat="server" Text="修 改" OnClientClick="return editCheck();" OnClick="editSystem_Click">
                </asp:Button>&nbsp;
                <asp:Button ID="reset" class="btn" runat="server" Text="重 载" OnClick="reset_Click">
                </asp:Button>
            </div>
            <!--/action-field-->
        </div>
        </form>
    </div>
</body>
</html>
