You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

306 lines
14 KiB
HTML

5 years ago
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
5 years ago
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.inc.js"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.before.js"></script>
5 years ago
<div class="cf main-place top_nav_list navtab_list">
5 years ago
{:W('Index/navigation',array('value'=>'Site/media', 'compare' => '', 'title' => '站点设置'))}
5 years ago
<h3 class="page_title">站点设置</h3>
<p class="description_text">说明针对PC官网的显示进行基本配置</p>
</div>
<div class="tab-wrap ">
<div class="tab_nav stabnav17112 jstabnav">
<ul>
<volist name="Think.config.PC_CONFIG_GROUP_LIST" id="group">
<li <eq name="id" value="$key">class="current"</eq>>
<a href="{:U('media',array(cate_id=>I('cate_id'),group_id=>$key))}">{$group}配置</a>
</li>
</volist>
</ul></div>
<div class="tab-content tabcon1711 tabcon17112">
<form action="{:U('save')}" method="post" class="form-horizontal">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<volist name="list" id="config">
<tr class="<eq name='config.type' value='5'></eq>">
<td class="l noticeinfo">{$config.title}</td>
<td class="r table_radio">
<switch name="config.type">
<case value="0">
<input type="text" class="" name="config[{$config.name}]" value="{$config.value}">
</case>
<case value="1">
<input type="text" class="" name="config[{$config.name}]" value="{$config.value}">
</case>
<case value="2">
<textarea name="config[{$config.name}]">{$config.value}</textarea>
</case>
<case value="3">
<textarea name="config[{$config.name}]">{$config.value}</textarea>
</case>
<case value="4">
<select name="config[{$config.name}]">
<volist name=":parse_config_attr($config['extra'])" id="vo">
<option value="{$key}" <eq name="config.value" value="$key">selected</eq>>{$vo}</option>
</volist>
</select>
</case>
<case value="5">
<!-- <div style="float:left;width:215px;padding:10px 0;">
5 years ago
<input type="file" id="upload_picture_{$config.name}">
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div class="upload-img-box">
<notempty name="config['value']">
<div class="upload-pre-item">
<span class="placeholder-graphic placeholder-graphic_{:strtolower($config['name'])}"><img src="{$config['value']|get_cover='path'}"/></span>
</div>
</notempty>
</div>-->
<if condition="$config.name eq 'PC_SET_LICENSE_PIRTURE'" >
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div id="uploader-demo" >
<div id="icon">
<div class="webuploader-pick" style="line-height: 13px" onclick="upload('icon','iconList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_LICENSE_PIRTURE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')">上传图片</div></div>
<div id="iconList" class="uploader-list" style="display: flex;"></div>
</div>
<script>
upload('icon','iconList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_LICENSE_PIRTURE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')
</script>
<elseif condition="$config.name eq 'PC_SET_FOR_THE_RECORD_PIRTURE'" />
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div id="uploader-demo" >
<div id="logo">
<div class="webuploader-pick" style="line-height: 13px" onclick="upload('logo','logoList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_FOR_THE_RECORD_PIRTURE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')">上传图片</div></div>
<div id="logoList" class="uploader-list" style="display: flex;"></div>
</div>
<script>
upload('logo','logoList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_FOR_THE_RECORD_PIRTURE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')
</script>
<elseif condition="$config.name eq 'PC_SET_QRCODE'" /> <!--色湖之媒体官网二维码-->
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div id="uploader-demo" >
<div id="qrcode">
<div class="webuploader-pick" style="line-height: 13px" onclick="upload('qrcode','qrcodeList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_QRCODE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')">上传图片</div></div>
<div id="qrcodeList" class="uploader-list" style="display: flex;"></div>
</div>
<script>
upload('qrcode','qrcodeList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_QRCODE','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')
</script>
<elseif condition="$config.name eq 'PC_SET_ICO'" />
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div id="uploader-demo" >
<div id="pcsetico">
<div class="webuploader-pick" style="" onclick="upload('pcsetico','pcseticonList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_ICO','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')">上传图片</div></div>
<div id="pcseticonList" class="uploader-list" style="display: flex;"></div>
</div>
<script>
upload('pcsetico','pcseticonList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_ICO','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')
</script>
<elseif condition="$config.name eq 'PC_SET_LOGO_FOOT'" />
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div id="uploader-demo" >
<div id="logofoot">
<div class="webuploader-pick" style="line-height: 13px" onclick="upload('logofoot','logofootList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_LOGO_FOOT','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')">上传图片</div></div>
<div id="logofootList" class="uploader-list" style="display: flex;"></div>
</div>
<script>
upload('logofoot','logofootList',5,'{$config.value}','{$config.valuedata}','icon_data','PC_SET_LOGO_FOOT','{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}')
</script>
</if>
5 years ago
5 years ago
</case>
<case value="6">
<span style="width:215px;float:left;">
<input type="file" id="upload_picture_{$config.name}">
<input type="hidden" name="config[{$config.name}]" id="cover_id_{$config.name}" value="{$config['value']}"/>
<div class="upload-file-box">
<notempty name="config['value']">
<div class="upload-pre-item">
<?php $file = get_file($config['value']);?>
<span class=""><a href="{$file.path}">{$file.name}</a></span>
</div>
</notempty>
</div>
</span>
<script type="text/javascript">
/* 初始化上传插件 */
$("#upload_picture_{$config.name}").uploadify({
"height" : 30,
"swf" : "__STATIC__/uploadify/uploadify.swf",
"fileObjName" : "download",
5 years ago
"buttonText" : "上传文档",
"uploader" : "{:U('File/uploadDoc',array('session_id'=>session_id()))}",
"width" : 120,
'removeTimeout' : 1,
'fileTypeExts' : '*',
5 years ago
"onUploadSuccess" : uploadPicture{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
}
});
function uploadPicture{$field.name}(file, data){
var data = $.parseJSON(data);
var src = '';
if(data.status){
$("#cover_id_{$config.name}").val(data.id);
src = data.url || '__ROOT__' + data.path;
$("#cover_id_{$config.name}").parent().find('.upload-file-box').html(
'<div class="upload-pre-item"><span class=""><a href="'+src+'">'+data.name+'</a></span></div>'
);
} else {
updateAlert(data.info);
setTimeout(function(){
$('#top-alert').find('button').click();
},1500);
}
}
</script>
</case>
</switch>
<span class="notice-text"><table border="0" cellspacing="0" cellpadding="0"><tr><td>{$config.remark}</td></tr></table></span>
</td>
</tr>
</volist>
</tbody>
</table>
<div class="form-item">
<label class="item-label"></label>
<div class="controls">
<empty name="list"><button type="submit" disabled class=" submit_btn disabled zwm_martl" target-form="form-horizontal">确 定</button><else/><button type="submit" class=" submit_btn ajax-post zwm_martl" target-form="form-horizontal">确 定</button></empty>
</div>
</div>
</form>
</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="Site/media">
</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 type="text/javascript">
//导航高亮
highlight_subnav('{:U('Site/media')}');
$(document).ready(function(){
var pc_cache = $("select[name='config[PC_CACHE]']").val();
authHiden(pc_cache);
$("select[name='config[PC_CACHE]']").change(function(){
var a = $(this).val();
authHiden(a);
})
})
function authHiden(pc_cache){
switch(pc_cache){
case "0":
$("input[name='config[PC_CACHE_TIME]']").closest('tr').hide();
$("input[name='config[PC_CACHE_TIME]']").val("");
break;
case "1":
$("input[name='config[PC_CACHE_TIME]']").closest('tr').show();
break;
default:
$("input[name='config[PC_CACHE_TIME]']").closest('tr').show();
break;
}
}
</script>
</block>