123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- {include file="header.htm" /}
-
-
- <body class="bodystyle">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- <div class="page style2021">
- <div class="site-location">
- {include file="bar.htm" /}
- </div>
- <form class="form-horizontal" name="handlepost" id="handlepost" method="post">
- <!-- 一键生成 -->
- <div class="title bor-b mb10">一键生成
- <!-- <div class="fr"><a class="ncap-btn-big ncap-btn-green" href="javascript:void(0);" id="up_site">全站一键生成</a></div> -->
- </div>
- <div class="ncap-form-default tab_div_1">
- <dl class="row">
- <dt class="tit">
- <label>更新模式</label>
- </dt>
- <dd class="opt">
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_uphtmltype" value="0" checked='checked'>全部页面生成
- <span class="check-mark"></span>
- </label>
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_uphtmltype" value="1">指定时间更新
- <span class="check-mark"></span>
- </label>
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_uphtmltype" value="2">指定ID更新
- <span class="check-mark"></span>
- </label>
- </dd>
- </dl>
- <dl class="row none" id="dl_seo_start_time_1">
- <dt class="tit">
- <label for="">起始时间 <p class="notic">即是文档的发布时间</p></label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_start_time" name="seo_start_time" value="{php}echo date('Y-m-d'){/php}" class="input-txt w300" autocomplete="off">
- <span class="add-on input-group-addon">
- <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
- </span>
- <span class="err"></span>
- </dd>
- </dl>
- <dl class="row none" id="dl_seo_start_time_2">
- <dt class="tit">
- <label for="">起始ID <p class="notic">即是起始的文档ID</p></label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_startid2" name="seo_startid2" value="0" placeholder="起始的文档ID" title="空或0表示从头开始" class="input-txt w300" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')">
- <span class="err"></span>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label></label>
- </dt>
- <dd class="opt">
- <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_site" >开始生成HTML</a>
- </dd>
- </dl>
-
- </div>
- <!-- 一键生成 -->
- <!-- 首页生成 -->
- <div class="title bor-t mt20">首页生成</div>
- <div class="ncap-form-default tab_div_1">
- <dl class="row">
- <dt class="tit">
- <label for="">主页模板</label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_html_templet" name="seo_html_templet" value="{$config.seo_html_templet|default='index.htm'}" placeholder="index.htm" class="input-txt w300" maxlength="200" autocomplete="off" readonly="readonly" onkeyup="this.value=this.value.replace(/\\/g,'/');" onpaste="this.value=this.value.replace(/\\/g,'/')">
- <a href="javascript:void(0);" onClick="SelectTemplets('handlepost.seo_html_templet');" class="a-link line">浏览...</a>
- <span class="err"></span>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label for="">主页位置</label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_html_position" name="seo_html_position" value="{$config.seo_html_position|default='../m/index.html'}" placeholder="留空默认根目录" class="input-txt w300" maxlength="200" autocomplete="off" onkeyup="this.value=this.value.replace(/\\/g,'/');" onpaste="this.value=this.value.replace(/\\/g,'/')">
- <span class="err"></span>
- </dd>
- </dl>
-
- <dl class="row">
- <dt class="tit">
- <label>首页模式</label>
- </dt>
- <dd class="opt">
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_showmod" value="0" {if condition="empty($config.seo_showmod)"}checked='checked'{/if}>动态浏览
- <span class="check-mark"></span>
- </label>
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_showmod" value="1" {if condition="!empty($config.seo_showmod)"}checked='checked'{/if}>生成静态
- <span class="check-mark"></span>
- </label>
- </dd>
- </dl>
-
- <dl class="row">
- <dt class="tit">
- <label></label>
- </dt>
- <dd class="opt">
- <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_index" >更新主页HTML</a>
- <a class="a-txt" id="preview_home" target="_blank" href="__ROOT_DIR__/index.php?clear=1&templet=index.html"><i class="fa fa-home"></i>预览主页</a>
- </dd>
- </dl>
-
- </div>
- <!-- 首页生成 -->
- <!-- 栏目生成 -->
- <div class="title bor-t mt20">栏目生成</div>
- <div class="ncap-form-default tab_div_2" >
- <dl class="row">
- <dt class="tit">
- <label >选择栏目</label>
- </dt>
- <dd class="opt">
- <div class="select w200">
- <select name="html_typeid" id="html_typeid" class="w300">
- <option value="0">所有栏目…</option>
- {$select_html}
- </select>
- </div>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label>每次生成</label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_maxpagesize" name="seo_maxpagesize" value="{$config.seo_maxpagesize|default='50'}" class="input-txt w100" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')"> 个页面
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label>更新子栏目</label>
- </dt>
- <dd class="opt">
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" checked="checked" name="seo_upnext" value="1" {if condition="!empty($config.seo_upnext)"}checked='checked'{/if}>是
- <span class="check-mark"></span>
- </label>
- <label class="radio-label">
- <span> </span>
- <input type="radio" class="radio" name="seo_upnext" value="0" {if condition="empty($config.seo_upnext)"}checked='checked'{/if}>否
- <span class="check-mark"></span>
- </label>
-
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label></label>
- </dt>
- <dd class="opt">
- <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_channel">开始生成HTML</a>
- </dd>
- </dl>
- </div>
- <!-- 栏目生成 -->
- <!-- 文档生成 -->
- <div class="title bor-t mt20">文档生成</div>
- <div class="ncap-form-default tab_div_3" >
- <dl class="row">
- <dt class="tit">
- <label >选择栏目</label>
- </dt>
- <dd class="opt">
- <div class="select w200">
- <select name="html_arc_typeid" id="html_arc_typeid" class="w300">
- <option value="0">所有文档…</option>
- {$select_html}
- </select>
- </div>
- </dd>
- </dl>
-
- <dl class="row">
- <dt class="tit">
- <label>生成ID段 <p class="notic">空或0表示从头开始或结束</p></label>
- </dt>
- <dd class="opt">
- <input type="text" id="seo_startid" value="" name="seo_startid" class="input-txt w100" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')" placeholder="起始ID" title="空或0表示从头开始"> <span style="color: #999;font-weight: bold;font-size:26px;">-</span>
- <input type="text" id="seo_endid" value="" name="seo_endid" class="input-txt w100" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')" placeholder="结束ID" title="空或0表示直到结束ID">
- <span class="err"></span>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label>每次生成</label>
- </dt>
- <dd class="opt">
- <input type="text" name="seo_pagesize" id="seo_pagesize" value="{$config.seo_pagesize|default='20'}" class="input-txt w100" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')"> 个页面
- </dd>
- </dl>
-
- <dl class="row">
- <dt class="tit">
- <label></label>
- </dt>
- <dd class="opt">
- <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_article">开始生成HTML</a>
- </dd>
- </dl>
- </div>
-
- </form>
- </div>
- <script>
- layui.use('laydate', function() {
- var laydate = layui.laydate;
-
- laydate.render({
- elem: '#seo_start_time'
- ,type: 'date'
- });
- })
-
- $(function(){
- $('input[name=seo_uphtmltype]').click(function(){
- var seo_uphtmltype = $(this).val();
- $('#dl_seo_start_time_1').hide();
- $('#dl_seo_start_time_2').hide();
- if (1 == seo_uphtmltype) {
- $('#dl_seo_start_time_1').show();
- $('#dl_seo_start_time_2').hide();
- } else if (2 == seo_uphtmltype) {
- $('#dl_seo_start_time_1').hide();
- $('#dl_seo_start_time_2').show();
- }
- });
- });
-
- //选择首页静态文件
- function SelectTemplets(fname)
- {
- var url = "{:url('Seom/filemanager')}";
- //iframe窗
- layer.open({
- type: 2,
- title: '选择主页模板',
- fixed: true, //不固定
- shadeClose: false,
- shade: 0.3,
- maxmin: false, //开启最大化最小化按钮
- area: ['80%', '80%'],
- content: url
- });
- }
- //生成整站
- $("#up_site").click(function(){
- $.ajax({
- url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
- type: 'POST',
- dataType: 'json',
- data: $('#handlepost').serialize(),
- beforeSend:function(){
- layer_loading('正在处理');
- },
- success: function(res){
- layer.closeAll();
- if (0 == res.code) {
- showErrorAlert(res.msg);
- } else {
- var seo_uphtmltype = $('input[name=seo_uphtmltype]:checked').val();
- var url = eyou_basefile+"?m=admin&c=Seom&a=site&uphtmltype="+seo_uphtmltype+"&seo_html_arcdir={$row}&lang="+__lang__;
- var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
- }
- },
- error: function(e){
- layer.closeAll();
- layer.alert(e.responseText, {icon: 5, title:false});
- }
- });
- })
- //生成首页
- $("#up_index").click(function(){
- if($('input[name=seo_html_templet]').val() == ''){
- showErrorMsg('主页模板不能为空!');
- $('input[name=seo_html_templet]').focus();
- return false;
- }
- $.ajax({
- url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
- type: 'POST',
- dataType: 'json',
- data: $('#handlepost').serialize(),
- beforeSend:function(){
- layer_loading('正在处理');
- },
- success: function(res){
- if (0 == res.code) {
- layer.closeAll();
- showErrorAlert(res.msg);
- } else {
- var timestamp1 = Date.parse(new Date());
- $.ajax({
- url:__root_dir__+"/index.php?m=home&c=Buildmhtml&a=buildIndex&seo_html_arcdir={$row}&lang="+__lang__,
- type:'POST',
- dataType:'json',
- data: {_ajax:1},
- beforeSend:function(){
- // layer_loading('正在处理');
- // var index = layer.load(0, {shade: false});
- },
- success:function(data){
- if(data.msg !== ""){
- layer.closeAll();
- if (0 == $('input[name=seo_showmod]').val() && -1 != data.msg.indexOf('浏览')) {
- showErrorAlert(data.msg, 6);
- } else {
- showErrorAlert(data.msg);
- }
- }else{
- layer.closeAll();
- var timestamp2 = Date.parse(new Date());
- var timestamp3 = (timestamp2 - timestamp1) / 1000;
- if (timestamp3 < 1) timestamp3 = 1;
- layer.msg("生成完毕,共耗时:<font color='red'>"+timestamp3+"</font> 秒",{icon:1,time:2000});
- }
- },
- complete:function(){
- // layer.alert(1, {icon: 5, title:false});
- },
- error: function(e){
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- }
- },
- error: function(e){
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- });
-
- //生成栏目页
- $("#up_channel").click(function(){
- $.ajax({
- url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
- type: 'POST',
- dataType: 'json',
- data: $('#handlepost').serialize(),
- beforeSend:function(){
- layer_loading('正在处理');
- },
- success: function(res){
- layer.closeAll();
- if (0 == res.code) {
- showErrorAlert(res.msg);
- } else {
- var typeid = $("#html_typeid").val(); //栏目id
- var url = eyou_basefile+"?m=admin&c=Seom&a=channel&typeid="+typeid+"&seo_html_arcdir={$row}&lang="+__lang__;
- var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
- }
- },
- error: function(e){
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- });
- //生成文章页
- $("#up_article").click(function(){
- $.ajax({
- url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
- type: 'POST',
- dataType: 'json',
- data: $('#handlepost').serialize(),
- beforeSend:function(){
- layer_loading('正在处理');
- },
- success: function(res){
- layer.closeAll();
- if (0 == res.code) {
- showErrorAlert(res.msg);
- } else {
- var typeid = $("#html_arc_typeid").val(); //栏目id
- var url = eyou_basefile+"?m=admin&c=Seom&a=article&typeid="+typeid+"&seo_html_arcdir={$row}&lang="+__lang__;
- var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
- }
- },
- error: function(e){
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- });
- </script>
-
- {include file="footer.htm" /}
|