<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/System_Language.asp" -->
<!--#include file="../Include/Version.Asp" -->
<!--#include file="CheckAdmin.Asp"-->
<!--#include file="../Generate/SC_Config.Asp"-->
<%
'*********************************************
'软件名称：博科企业网站内容管理系统（BOKECMS）
'软件开发：博科网络科技工作室
'网   址：http://www.bokew.net
'服务QQ：530051328
'服务邮箱：bbfhq@163.com
'微信公众号：bokewlkj
'*********************************************
%>
<%
Select Case request.QueryString("Action")
	Case "Save"
		SaveSiteInfo
	Case Else
		ViewSiteInfo
End Select
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<%=Bokecms_Lang_Copyright(13)%>">
<meta name="author" content="<%=Bokecms_Lang_Copyright(3)%>">
<title><%=Bokecms_Lang_Copyright(1)%> <%=Soft_Version%></title>
<!--#Include file="BokeCMS_Css.Asp"-->
<link rel="stylesheet" href="../KindEditor/themes/default/default.css" />
<script src="skin_a/js/iColorPicker.js"></script>
<script charset="utf-8" src="../KindEditor/kindeditor-min.js"></script>
<script charset="utf-8" src="../KindEditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../KindEditor/plugins/code/prettify.js"></script>
<script>
KindEditor.ready(function(K) {
	var editor = K.editor({
		cssPath : '../KindEditor/plugins/code/prettify.css',
		uploadJson : '../KindEditor/asp/upload_json.asp?action=other',
		fileManagerJson : '../KindEditor/asp/file_manager_json.asp',
		allowFileManager : true
	});
	K('#image1').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				showRemote : true,
				imageUrl : K('#Ico').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#Ico').val(url);
					editor.hideDialog();
				}
			});
		});
	});
	K('#image2').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				showRemote : true,
				imageUrl : K('#SiteLogo').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#SiteLogo').val(url);
					editor.hideDialog();
				}
			});
		});
	});
});
</script>
</head>
<body>
<!--#Include file="BokeCMS_Top.Asp"-->

<!--#Include file="BokeCMS_Meun.Asp"-->
<div id="wrap">
    <!-- start: Content -->
	<%
	If InStr(CompanyAdminPurview, "|21,") = 0 Then
		response.Write ("<br /><br /><div style='height:100%; text-align:center' class='main'><font style='color:red; font-size:14px;')>"&Bokecms_Lang_System(26)&"</font></div>")
		response.End
	End If
	%>
    <div class="main">
        <div class="row ">
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i> <%=Bokecms_Lang_Copyright(14)%></li>
                <li><%=Bokecms_Lang_Copyright(2)%></li>
                <li class="active"><%=Bokecms_Lang_System(10)%></li>
            </ol>	
        </div>	 
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-gears"></i><span class="break"></span><strong><%=Bokecms_Lang_System(10)%></strong></h2>
                    </div>
                    <div class="panel-body">
                    <form action="?Action=Save" method="post" class="form-horizontal ">
                        <div class="panel-heading">
                            <h2><i class="fa fa-adjust"></i><span class="break"></span><strong><%=Bokecms_Lang_MainSite(22)%></strong></h2>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label"><%=Bokecms_Lang_MainSite(15)%>：</label>
                            <div class="col-md-6">
                                <label class="switch switchtop switch-danger">
                                    <input type="checkbox" class="switch-input" name="SiteStatus" value="-1" id="SiteStatus" <%if SiteStatus then response.write ("checked")%> />
                                    <span class="switch-label" data-on="开启" data-off="关闭"></span>
                                    <span class="switch-handle"></span>
                                </label>
                                 <span class="help-block"></span>
                            </div>
                        </div> 
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(18)%>：</label>
                            <div class="col-md-6">
                                <textarea name="Explain" id="Explain" class="form-control" rows="2" cols="80"><%=Explain%></textarea>
                                <span class="help-block"></span>
                            </div>
                        </div>

                        <div class="panel-heading">
                            <h2><i class="fa fa-cog"></i><span class="break"></span><strong><%=Bokecms_Lang_MainSite(20)%></strong></h2>
                        </div>    
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(0)%>：</label>
                            <div class="col-md-6">
                                <input name="SiteTitle" type="text" id="SiteTitle"  class="form-control" value="<%=SiteTitle%>">
                                <span class="help-block">请填写网站标题，这里的信息显示在浏览器顶部以及搜索引擎搜索出的网站主页标题</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(1)%>：</label>
                            <div class="col-md-5">
                                <input type="text" id="SiteUrl" name="SiteUrl"  class="form-control" value="<%=SiteUrl%>"> 
                                <span class="help-block">请填写您的网站网址如：www.bokew.net 请不要带[http://]</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(2)%>：</label>
                            <div class="col-md-5">
                                <input type="text" id="IcpNumber" name="IcpNumber"  class="form-control" value="<%=IcpNumber%>"> 
                                <span class="help-block">已备案网站请填写您在工信部申请的的备案号码, 格式：蜀ICP备11017223号</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(26)%>：</label>
                            <div class="col-md-5">
                                <input type="text" id="gaba" name="gaba"  class="form-control" value="<%=gaba%>"> 
                                <span class="help-block">在<a href="http://www.beian.gov.cn/" target="_blank">全国公安机关互联网站安全服务平台</a>申请的备案号码, 格式：京公网安备 11010102002019号</span>
                            </div>
                        </div>
                       <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(27)%>：</label>
                            <div class="col-md-5">
                                <input type="text" id="gabah" name="gabah"  class="form-control" value="<%=gabah%>"> 
                                <span class="help-block">公安备案的纯数字编号，格式：11010102002019</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(3)%>：</label>
                            <div class="col-md-6"> 
                                <div class="input-group">
                                    <input name="SiteLogo" type="text" id="SiteLogo" value="<%=SiteLogo%>"  class="form-control" />
                                    <span class="input-group-btn">
                                    	<button type="button" id="image2" class="btn btn-default"><%=Bokecms_Lang_System(27)%></button>
                                    </span>
                                </div>
                                <span class="help-block">请上传网站banner图标，建议PNG。Jpg格式，规格960*160像素</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(4)%>：</label>
                            <div class="col-md-6"> 
                                <div class="input-group">
                                    <input name="Ico" type="text" id="Ico" value="<%=Ico%>"  class="form-control" size="60" />
                                    <span class="input-group-btn">
                                    	<button type="button" id="image1" class="btn btn-default"><%=Bokecms_Lang_System(27)%></button>
                                    </span>
                                </div>
                                <span class="help-block">//注 32*32像素 ico格式</span>
                            </div>
                        </div>
                        <div class="form-group">
                        	<label class="col-md-2 control-label" for="text-input">分享代码：</label>
                            <div class="col-md-6">
                                <textarea name="share" id="share"  style="padding:5px;" rows="3" cols="80" class="form-control" ><%=share%></textarea>
                                <span class="help-block">此处填写分享代码（推荐用百度分享），将显示在各频道详细页面下</span>
                        	</div>
                        </div>
                        <div class="form-group">
                        	<label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(5)%>：</label>
                            <div class="col-md-6">
                                <textarea name="Stats" id="Stats"  style="padding:5px;" rows="3" cols="80" class="form-control" ><%=Stats%></textarea>
                                <span class="help-block">填写统计JS代码，显示在网站底部</span>
                        	</div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(6)%>：</label>
                            <div class="col-md-6">
								<textarea name="Keywords"  id="Keywords" class="form-control"  style="padding:5px;" rows="3" cols="80"><%=Keywords%></textarea>
                                <span class="help-block">填写keywords（网站关键词），多个关键词请用“,”分割。</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(7)%>：</label>
                            <div class="col-md-6">
                                <textarea name="Descriptions" id="Descriptions" class="form-control" style="padding:5px;" rows="3" cols="80"><%=Descriptions%></textarea>
                                <span class="help-block">填写Descriptions（网站描述），多个关键词请用“,”分割。</span>
                            </div>
                        </div>

                        <div class="panel-heading">
                            <h2><i class="fa  fa-phone"></i><span class="break"></span><strong><%=Bokecms_Lang_MainSite(21)%></strong></h2>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(8)%>：</label>
                            <div class="col-md-5">
                                <input name="ComName" type="text" id="ComName"   class="form-control" value="<%=ComName%>">
                                 <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(9)%>：</label>
                            <div class="col-md-5">
                                <input name="Address" type="text" id="Address"  class="form-control" value="<%=Address%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">邮政编码：</label>
                            <div class="col-md-5">
                                <input name="zipcode" type="text" id="zipcode"  class="form-control" value="<%=zipcode%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(10)%>：</label>
                            <div class="col-md-5">
                                <input name="Contacts" type="text" id="Contacts" class="form-control" value="<%=Contacts%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(11)%>：</label>
                            <div class="col-md-5">
                                <input name="Telephone" type="text" id="Telephone" class="form-control" value="<%=Telephone%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(12)%>：</label>
                            <div class="col-md-5">
                                <input name="Mobile" type="text" id="Mobile" class="form-control" value="<%=Mobile%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(13)%>：</label>
                            <div class="col-md-5">
                                <input name="Fax" type="text" id="Fax" class="form-control" value="<%=Fax%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(14)%>：</label>
                            <div class="col-md-5">
                                <input name="Email" type="text" id="Email" class="form-control" value="<%=Email%>">
                                <span class="help-block"></span>
                            </div>
                        </div>
                        
                        <div class="panel-heading">
                            <h2><i class="fa fa-file-text-o"></i><span class="break"></span><strong><%=Bokecms_Lang_MainSite(22)%></strong></h2>
                        </div> 
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"><%=Bokecms_Lang_MainSite(19)%>：</label>
                            <div class="col-md-6">
                                <textarea name="SiteDetail" id="SiteDetail" class="form-control" rows="6" cols="100"><%=SiteDetail%></textarea>
                                <span class="help-block">请填写网站首页企业简介，200字以内</span>
                            </div>
                        </div>
                         <div class="panel-heading">
                            <h2><i class="fa  fa-columns"></i><span class="break"></span><strong><%=Bokecms_Lang_sys_Parameters(42)%></strong></h2>
                        </div><span class="help-block">（AspJpeg组件支持：<%if IsObjInstalled("Persits.Jpeg") then%>√<%else%>×<%end if%>&nbsp;&nbsp;&nbsp;&nbsp;服务器必须支持AspJpeg组件，否则系统将自动关闭本功能）</span>
						
                        <div class="form-group">
                            <label class="col-md-2 control-label">水印类型</label>							
                            <div class="col-md-10">
                                <label class="radio-inline" for="EnableSeo0">
                                    <input name="SY_Type" id="SY_Type1" type="radio" value="0" <%If SY_Type =0 Or IsObjInstalled("Persits.Jpeg")=False Then%> checked<%End If%>>不加水印
                                </label>
                                <label class="radio-inline" for="SY_Type1">
                                    <input name="SY_Type" id="SY_Type2" type="radio" value="1" <%If SY_Type =1 Then%> checked<%End If%>> 文字水印
                                </label>
                                <label class="radio-inline" for="SY_Type2">
                                    <input name="SY_Type" id="SY_Type3" type="radio" value="2" <%If SY_Type =2 Then%> checked<%End If%>> 图片水印
                                </label>
                                 <span class="help-block">此处为水印总开关</span>
                            </div>
                        </div>    
                        <!--div class="form-group">
                            <label class="col-md-2 control-label">限制时间</label>
                            <div class="col-md-4">
                               <span class="help-int"> <input name="SY_interval" type="text" id="SY_interval" class="form-control" value="<%=SY_interval%>"> <%=SY_interval%>分钟前添加的图片重新编辑时图片不重复加水印</span>
                                <span class="help-block">&nbsp;分钟</span>
                            </div>
                        </div-->
                       <div class="form-group">
                            <label class="col-md-2 control-label">水印座标</label>
                            <div class="col-md-4">
                               <span class="help-int"> <input name="SY_X" type="text" id="SY_X" class="form-control" value="<%=SY_X%>"> 横座标像素</span><span class="help-int"><input name="SY_Y" type="text" id="SY_Y" class="form-control" value="<%=SY_Y%>"> 纵座标像素</span>                               
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">文字水印内容</label>
                            <div class="col-md-4">
                                <input name="SY_Text" type="text" id="SY_Text" class="form-control" value="<%=SY_Text%>">
                                <span class="help-block"> 文字字数不宜超过15个字符，不支持任何WEB编码标记</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">文字水印字体</label>
                            <div class="col-md-4">
			<SELECT name="SY_FontName" >
            <option value="宋体"  <% if SY_FontName="宋体" Then Response.write("Selected") %>>宋体</option>
            <option value="楷体_GB2312" <% if SY_FontName="楷体_GB2312" Then Response.write("Selected") %>>楷体</option>
            <option value="仿宋_GB2312" <% if SY_FontName="仿宋_GB2312" Then Response.write("Selected") %>>仿宋体</option>
            <option value="黑体" <% if SY_FontName="黑体" Then Response.write("Selected") %>>黑体</option>
            <option value="隶书" <% if SY_FontName="隶书" Then Response.write("Selected") %>>隶书</option>
            <option value="幼圆" <% if SY_FontName="幼圆" Then Response.write("Selected") %>>幼圆</option>
            <option value="Andale Mono" <% if SY_FontName="Andale Mono" Then Response.write("Selected") %>>Andale Mono</OPTION> 
            <option value="Arial"  <% if SY_FontName="Arial" Then Response.write("Selected") %>>Arial</OPTION> 
            <option value="Arial Black"  <% if SY_FontName="Arial Black" Then Response.write("Selected") %>>Arial Black</OPTION> 
            <option value="Book Antiqua"  <% if SY_FontName="Book Antiqua" Then Response.write("Selected") %>>Book Antiqua</OPTION>

        </SELECT>
                            </div>
                        </div>

                       <div class="form-group">
                            <label class="col-md-2 control-label">文字水印字号</label>
                            <div class="col-md-4">
                              <span class="help-int"> <input name="SY_FontSize" type="text" id="SY_FontSize" class="form-control" value="<%=SY_FontSize%>"></span>
                                <span class="help-block">&nbsp;像素</span>                         
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">文字水印颜色：</label>
                            <div>&nbsp;&nbsp;&nbsp;
                               <input id="SY_FontColor"  name="SY_FontColor" type="text" value="<%=SY_FontColor%>" style="WIDTH: 60px；background-color: <%=SY_FontColor%>；"  class="iColorPicker input" />
                                <span style="color:red">文字水印颜色设置</span>
                            </div>
                        </div>
                       <div class="form-group">
                            <label class="col-md-2 control-label">是否粗体</label>
                            <div class="col-md-4">
                  <SELECT name='SY_Bold' >
				  <OPTION value='1' <% if SY_Bold=1 Then Response.write("Selected") %>>是</OPTION>
                  <OPTION value='0' <% if SY_Bold=0 Then Response.write("Selected") %>>否</OPTION>            
                  </SELECT>                        
                            </div>
                        </div>

                       <div class="form-group">
                            <label class="col-md-2 control-label">图片水印路径名</label>
                            <div class="col-md-4">
                                <input name="SY_FileName" type="text" id="SY_FileName" class="form-control" value="<%=SY_FileName%>">
                                <span class="help-block"> 请填写图片文件的相对路径，以“\”开头，如：\images/watermark.gif</span>
                            </div>
                        </div>

                       <div class="form-group">
                            <label class="col-md-2 control-label">图片水印宽度</label>
                            <div class="col-md-4">
                              <span class="help-int"> <input name="SY_Width" type="text" id="SY_Width" class="form-control" value="<%=SY_Width%>"></span>
                                <span class="help-block">&nbsp;像素（会根据宽度自动调整高度,建议150*60透明）</span>                         
                            </div>
                        </div>
                       <div class="form-group">
                            <label class="col-md-2 control-label">图片水印透明度</label>
                            <div class="col-md-4">
                              <span class="help-int"> <input name="SY_Transparence" type="text" id="SY_Transparence" class="form-control" value="<%=SY_Transparence%>"></span>
                                <span class="help-block">&nbsp;0－1范围，1表示不透明</span>                         
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">图片水印底色：</label>
							<div>&nbsp;&nbsp;&nbsp;
                               <input id="SY_BackgroundColor"  name="SY_BackgroundColor" type="text" value="<%=SY_BackgroundColor%>" style="WIDTH: 60px；background-color: <%=SY_BackgroundColor%>；"  class="iColorPicker input" />
                                <span style="color:red">若想去除水印图片的底色，请在此选择颜色</span>
                            </div>
                        </div>
                       <div class="form-group">
                            <label class="col-md-2 control-label">图片水印坐标起点</label>
                            <div class="col-md-4"><select name="SY_coordinates" size="1">
	  <option value="0" <%if SY_coordinates=0 then%>selected="selected"<%end if%>>左上</option>
	  <option value="1" <%if SY_coordinates=1 then%>selected="selected"<%end if%>>左下</option>
	  <option value="2" <%if SY_coordinates=2 then%>selected="selected"<%end if%>>居中</option>
	  <option value="3" <%if SY_coordinates=3 then%>selected="selected"<%end if%>>右上</option>
	  <option value="4" <%if SY_coordinates=4 then%>selected="selected"<%end if%>>右下</option>
	  </select>
                                <span class="help-block"></span>                         
                            </div>
                        </div>
                         <div class="panel-heading">
                            <h2><i class="fa  fa-columns"></i><span class="break"></span><strong>板块上传图片水印开关</strong></h2>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"></label>
                            <div class="col-md-7">
							<%set rs = server.CreateObject("adodb.recordset")
                            rs.open "select * from BokeCMS_Module Order by ID asc" ,conn ,1 ,2
                            do until rs.eof%>
                <label class="checkbox-inline" for="SY_watermark<%=rs("ID")%>">
                    <input id="SY_watermark<%=rs("ID")%>" name="SY_watermark" type="checkbox" value="|<%=rs("ID")%>" <%if Instr(SY_watermark,"|"&rs("ID")&",")>0 then response.write ("checked")%>><%=rs("SystemName")%>
                </label><%rs.movenext
                            loop
                            Call CloseRs(rs)%>
		             </div>
                 </div>
                 <div class="form-group">
                        <label class="col-md-2 control-label" for="text-input"></label>
                <div class="col-md-7">
                <label class="checkbox-inline" for="SY_watermark11"><input id="SY_watermark11" name="SY_watermark" type="checkbox" value="|11"<%if Instr(SY_watermark,"|11,")>0 then response.write ("checked")%>>友情链接</label>
                <label class="checkbox-inline" for="SY_watermark12"><input id="SY_watermark12" name="SY_watermark" type="checkbox" value="|12"<%if Instr(SY_watermark,"|12,")>0 then response.write ("checked")%>>标准广告</label>
                <label class="checkbox-inline" for="SY_watermark13"><input id="SY_watermark13" name="SY_watermark" type="checkbox" value="|13"<%if Instr(SY_watermark,"|13,")>0 then response.write ("checked")%>>专题广告</label>
                <label class="checkbox-inline" for="SY_watermark14"><input id="SY_watermark14" name="SY_watermark" type="checkbox" value="|14"<%if Instr(SY_watermark,"|14,")>0 then response.write ("checked")%>>幻灯广告</label><br>
               
                <span style="color:red">此处为图片水印二级开关</span>
                            </div>
                        </div> 

                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input"></label>
					   
                        <div class="form-group">
                            <div class="col-md-2 control-label"></div>
                            <div class="col-md-10">
                                <input name="submitSaveEdit" type="submit" id="submitSaveEdit" class="btn btn-danger btn-lg" value="<%=Bokecms_Lang_MainSite(24)%>">
                                <input type="button" class="btn btn-danger btn-lg" value="<%=Bokecms_Lang_System(32)%>" onClick="history.back(-1)">
                           </div>	
                        </div>
                    </form>
            		</div>		
				</div>
            </div>
		</div>
    </div>
    <!-- end: Content -->
	<!--#Include file="BokeCMS_End.Asp"-->				
</div>
<!--#Include file="BokeCMS_Js.Asp"-->

<script>
var ColorHex=new Array('00','33','66','99','CC','FF')
var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
var current=null
function intoColor(dddd,ssss,ffff)
{	
    var ColorTable=''
    for (i=0;i<2;i++)
    {
        for (j=0;j<6;j++)
        {
            ColorTable=ColorTable+'  <tr>'
            ColorTable=ColorTable+'    <td style="width:12px; height:12px; background-Color: #000000;">'
            if (i==0){
                ColorTable=ColorTable+'    <td style="width:12px; height:12px; background-Color: #'+ColorHex[j]+ColorHex[j]+ColorHex[j]+';">'
            }
            else{
                ColorTable=ColorTable+'    <td style="width:12px; height:12px; background-Color: #'+SpColorHex[j]+';">'
            }
            ColorTable=ColorTable+'    <td style="width:12px; height:12px; background-Color: #000000;">'
            for (k=0;k<3;k++)
            {
                for (l=0;l<6;l++)
                {
                    ColorTable=ColorTable+'    <td style="width:12px; height:12px; background-Color: #'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+';">'
                }
            }
        }
    }
    ColorTable='<table width="253" border="0" cellspacing="0" cellpadding="0" style="border: 1px #000000 solid; border-bottom: none; border-collapse: collapse;" borderColor="000000">'
    +'  <tr height="30">'
    +'    <td colspan="21" bgColor="#cccccc"><table width="100%" cellpadding="0" cellspacing="1" border="0" style="border-collapse: collapse;">'
    +'        <tr>'
    +'          <td width="3"></td>'
    +'          <td><input type="text" id="DisColor" name="DisColor" size="6" disabled style="border: solid 1px #000000; background-Color: #ffff00;"></td>'
    +'          <td width="3"></td>'
    +'          <td><input type="text" id="HexColor" name="HexColor" size="7" style="border: inset 1px; font-family: Arial;" value="#000000">&nbsp;&nbsp;&nbsp;&nbsp;系统选色版</td>'
    +'          <td width="20" style="cursor:pointer" onclick="document.getElementById(\'Colorpanel\').style.visibility=\'hidden\'" title=\' 关闭\'>╳</td>'
    +'        </tr>'
    +'      </table></td>'
    +'</table>'
    +'<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; cursor: pointer;" borderColor="000000" onmouseover="doOver(event)" onmouseout="doOut()" onclick="doclick(\''+dddd+'\',\''+ssss+'\',\''+ffff+'\',event)">'
    +ColorTable+'</table>';
    Colorpanel.innerHTML=ColorTable
}
function doOver(e) {
	if( !e ) e = window.event;
	var Colorxs = e.target||e.srcElement; 
	
    if ((Colorxs.tagName=="TD") && (current!=Colorxs)) {
        if (current!=null){
            current.style.backgroundColor = current._BackGround
        }
        Colorxs._BackGround = Colorxs.style.backgroundColor
		
		document.getElementById("DisColor").style.backgroundColor= Colorxs.style.backgroundColor
		document.getElementById("HexColor").value= Colorxs.style.backgroundColor
		Colorxs.style.backgroundColor = "white"
        current = Colorxs
    }
}
function doOut() {
    if (current!=null) current.style.backgroundColor = current._BackGround
}

function doclick(dddd,ssss,ffff,e){
	if( !e ) e = window.event;
	var Colorxs = e.target||e.srcElement; 

    if (Colorxs.tagName=="TD"){
        document.getElementById(ssss).value=Colorxs._BackGround
		document.getElementById(ffff).style.color=Colorxs._BackGround
		
		Colorxs.style.backgroundColor=Colorxs._BackGround
		document.getElementById("Colorpanel").style.visibility="hidden"
        return Colorxs._BackGround
    }
}
var Colorxs

function Colorcd(dddd,ssss,ffff,e){
	var Colorpanel=document.getElementById("Colorpanel")
	
	if( !e ) e = window.event;
	var Colorxs = e.target||e.srcElement; 

	var x=e.clientX
    var y=e.clientY
	
    var rightedge = document.body.clientWidth-x;
    var bottomedge = document.body.clientHeight-y;
	if (rightedge < Colorpanel.offsetWidth){
    	var palLeft = document.body.scrollLeft + x - Colorpanel.offsetWidth;
		Colorpanel.style.left = palLeft+'px'
	}
    else{
    	var palLeft = document.body.scrollLeft + x;
		Colorpanel.style.left = palLeft+'px'
	}
    
	if (bottomedge < Colorpanel.offsetHeight){
    	var palTop = document.body.scrollTop + y - Colorpanel.offsetHeight;
		Colorpanel.style.top = palTop + 'px'
	}
    else{
		var ScrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;   
		var palTop = ScrollTop + y;
		Colorpanel.style.top = palTop + 'px'
	}
	
	Colorpanel.style.visibility = "visible";
	
    e.cancelBubble=true
    intoColor(dddd,ssss,ffff)
    return false
}
function clear_color() {
	$('#Title').css('color','');
	$('#TitleFontColor').val('');
	$('#colorpanel_title').html(' ');
}
</script>

</body>
</html>
<%
Function SaveSiteInfo()
	
    If Len(Trim(request.Form("SiteTitle")))<2 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写您的网站标题并保持至少在两个汉字以上！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("SiteUrl")))<4 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写您的公司网址！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("ComName")))<2 Then
 		Call SweetAlert("warning", "操作失败！", "请详细填写您的公司名称并保持至少在两个汉字以上！", "false", "history.back()")
       	response.End
    End If
    If Len(Trim(request.Form("Address")))<2 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写您的公司地址并保持至少在两个汉字以上！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("Telephone")))<10 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写正确的联系电话（区号加电话）！", "false", "history.back()")
        response.End
    End If
	If Len(Trim(request.Form("Mobile")))<11 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写正确的手机号码！", "false", "history.back()")
        response.End
    End If
	If Len(Trim(request.Form("Contacts")))<2 Then
		Call SweetAlert("warning", "操作失败！", "请详细填联系人并保持至少在两个汉字以上！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("Fax")))<10 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写传真号码并保持至少在10个字符以上！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("Email")))<6 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写电子邮箱地址并保持至少在6个字符以上！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("Keywords")))>250 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写网站关键词并保持在250个字符以内！", "false", "history.back()")
        response.End
    End If
    If Len(Trim(request.Form("Descriptions")))>250 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写网站描述并保持在250个字符以内！", "false", "history.back()")
        response.End
    End If
	If Len(Trim(request.Form("Stats")))>1000 Then
		Call SweetAlert("warning", "操作失败！", "请详细填写统计代码并保持在1000个字符以内！", "false", "history.back()")
        response.End
    End If
	If Len(Trim(request.Form("share")))<50 Then
		Call SweetAlert("warning", "操作失败！", "请填写分享代码！", "false", "history.back()")
        response.End
    End If	
	if Request.Form("SY_watermark")="" then
			Call SweetAlert("warning", "友情提示", "你还未选中任何一个板块水印开关！", "false", "history.back(-1)")
			response.end
	end If
    If Len(Trim(request.Form("SiteDetail")))>200 Then
		Call SweetAlert("warning", "操作失败！", "公司简介保持在200个汉字以内！", "false", "history.back()")
        response.End
    End If

	Call SiteInfo()
    Dim rs, sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select top 1 * from BokeCMS_Web"
    rs.Open sql, conn, 1, 3
	If Clng(rs("SiteStatus")) <> Clng(Request.Form("SiteStatus")) Then IsStatus = "注意你已改变网站的状态，请重新生成PC全站静态。"
	
    rs("SiteTitle") = Trim(Request.Form("SiteTitle"))
    rs("SiteUrl") = Trim(Request.Form("SiteUrl"))
    rs("ComName") = Trim(Request.Form("ComName"))
    rs("Address") = Trim(Request.Form("Address"))
    rs("zipcode") = Trim(Request.Form("zipcode"))	
    rs("Telephone") = Trim(Request.Form("Telephone"))
	rs("Mobile") = Trim(Request.Form("Mobile"))
    rs("Contacts") = Trim(Request.Form("Contacts"))
    rs("Fax") = Trim(Request.Form("Fax"))
    rs("Email") = Trim(Request.Form("Email"))
    rs("Keywords") = Trim(Request.Form("Keywords"))
    rs("Descriptions") = Trim(Request.Form("Descriptions"))
	rs("Stats") = Trim(Request.Form("Stats"))
    rs("IcpNumber") = Trim(Request.Form("IcpNumber"))
	rs("gaba") = Trim(Request.Form("gaba"))
	rs("gabah") = Trim(Request.Form("gabah"))
    rs("SiteLogo") = Trim(Request.Form("SiteLogo"))
    rs("Ico") = Trim(Request.Form("ico"))
	If Trim(Request.Form("SiteStatus")) = "-1" Then
		rs("SiteStatus") = Trim(Request.Form("SiteStatus"))
	Else
		rs("SiteStatus") = 0
	End If
    rs("Explain") = Trim(Request.Form("Explain"))
    rs("SiteDetail") = Trim(Request.Form("SiteDetail"))
rs("SY_Type")=Trim(Request.Form("SY_Type"))
'rs("SY_interval")=Trim(Request.Form("SY_interval"))
rs("SY_Text")=Trim(Request.Form("SY_Text"))
rs("SY_FontName")=Trim(Request.Form("SY_FontName"))
rs("SY_FontSize")=Trim(Request.Form("SY_FontSize"))
rs("SY_FontColor")=Trim(Request.Form("SY_FontColor"))
rs("SY_Bold")=Trim(Request.Form("SY_Bold"))
rs("SY_FileName")=Trim(Request.Form("SY_FileName"))
rs("SY_Width")=Trim(Request.Form("SY_Width"))
rs("SY_X")=Trim(Request.Form("SY_X"))
rs("SY_Y")=Trim(Request.Form("SY_Y"))
rs("SY_Transparence")=Trim(Request.Form("SY_Transparence"))
rs("SY_BackgroundColor")=Trim(Request.Form("SY_BackgroundColor"))
rs("SY_coordinates")=Trim(Request.Form("SY_coordinates"))
rs("SY_watermark")=replace(Request.Form("SY_watermark"), " ", "")& ","
rs("share")=Trim(Request.Form("share"))

    rs.update
    rs.Close
    Set rs = Nothing
Call SY()	
	If Trim(Request.Form("SiteStatus")) = "-1" Then
		Call DoDelHtml("/Maintain.html")
	Else
		Explain = "<br/><br/><p style='color:red; font-size:14px; text-align:center'>"&Trim(Request.Form("Explain"))&"</p>"
		Call WriteToUTF("/Maintain.html", Explain)
	End If
	Call SweetAlert("success", "操作成功", Bokecms_Lang_MainSite(25)&" "&IsStatus, "false", "location.replace('BokeCMS_MainSite.Asp')")
End Function

Function ViewSiteInfo()
    Dim rs, sql
    Set rs = server.CreateObject("adodb.recordset")
    sql = "select top 1 * from BokeCMS_Web"
    rs.Open sql, conn, 1, 1
    If rs.bof And rs.EOF Then
        response.Write ("<br /><br /><div align=""center""><font style=""color:red; font-size:9pt; "")>"&Bokecms_Lang_System(28)&"</font></div>")
        response.End
    Else
		SiteTitle = rs("SiteTitle")
		Keywords = rs("Keywords")
		Descriptions = rs("Descriptions")
		Stats = rs("Stats")
		SiteUrl = rs("SiteUrl")
		ComName = rs("ComName")
		Address = rs("Address")
        zipcode = rs("zipcode")
		Telephone = rs("Telephone")
		Mobile = rs("Mobile")
		Contacts = rs("Contacts")
		Fax = rs("Fax")
		Email = rs("Email")
		IcpNumber = rs("IcpNumber")
		gaba= rs("gaba")
		gabah= rs("gabah")
		SiteLogo = rs("SiteLogo")
		SiteDetail = rs("SiteDetail")
		SiteStatus = rs("SiteStatus")
		Explain = rs("Explain")
		share= rs("share")
        rs.Close : Set rs = Nothing
    End If
End Function

Function SY()
   Set ASM = server.CreateObject("Adod" & "b.St" & "ream")
    ASM.Type = 2
    ASM.mode = 3
    ASM.charset = "utf-8"
    ASM.Open    
    ASM.WriteText "<" & "%'====博科网络科技====" & vbCrLf
    ASM.WriteText "dim SY_Type,SY_interval,SY_Text,SY_FontName,SY_FontSize,SY_FontColor,SY_Bold,SY_FileName,SY_Width,SY_X,SY_Y,SY_Transparence,SY_BackgroundColor,SY_coordinates,SY_watermark "& vbCrLf
    ASM.WriteText "SY_Type = " & ReplaceConstChar(Trim(request("SY_Type"))) & "" & vbCrLf
	'ASM.WriteText "SY_interval = " & ReplaceConstChar(Trim(request("SY_interval"))) & "" & vbCrLf    
    ASM.WriteText "SY_Text = " & Chr(34) & ReplaceConstChar(Trim(request("SY_Text"))) & Chr(34) & "" & vbCrLf
    ASM.WriteText "SY_FontName = " & Chr(34) & ReplaceConstChar(Trim(request("SY_FontName"))) & Chr(34) & "" & vbCrLf
    ASM.WriteText "SY_FontSize = " & ReplaceConstChar(Trim(request("SY_FontSize"))) & "" & vbCrLf
    ASM.WriteText "SY_FontColor = " & Chr(34) & ReplaceConstChar(Trim(request("SY_FontColor"))) & Chr(34) & "" & vbCrLf    
    ASM.WriteText "SY_Bold = " & ReplaceConstChar(Trim(request("SY_Bold"))) & "" & vbCrLf
    ASM.WriteText "SY_FileName = " & Chr(34) & ReplaceConstChar(Trim(request("SY_FileName"))) & Chr(34) & "" & vbCrLf
    ASM.WriteText "SY_Width = " & ReplaceConstChar(Trim(request("SY_Width"))) & "" & vbCrLf
	ASM.WriteText "SY_X = " & ReplaceConstChar(Trim(request("SY_X"))) & "" & vbCrLf
	ASM.WriteText "SY_Y = " & ReplaceConstChar(Trim(request("SY_Y"))) & "" & vbCrLf
	ASM.WriteText "SY_Transparence = " & ReplaceConstChar(Trim(request("SY_Transparence"))) & "" & vbCrLf
    ASM.WriteText "SY_BackgroundColor = " & Chr(34) & ReplaceConstChar(Trim(request("SY_BackgroundColor"))) & Chr(34) & "" & vbCrLf
	ASM.WriteText "SY_coordinates = " & ReplaceConstChar(Trim(request("SY_coordinates"))) & "" & vbCrLf
	ASM.WriteText "SY_watermark = "  & Chr(34) & ReplaceConstChar(Trim(request("SY_watermark")))&","  & Chr(34) & "" & vbCrLf
    ASM.WriteText "%" & ">"
    ASM.SaveToFile Server.mappath("../Include/bokesy.Asp"), 2
    ASM.flush
    ASM.Close
    Set ASM = Nothing
End Function%>