Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. {include file="header.htm" /}
  2. <body class="bodystyle">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page style2021">
  6. <div class="site-location">
  7. {include file="bar.htm" /}
  8. </div>
  9. <form class="form-horizontal" name="handlepost" id="handlepost" method="post">
  10. <!-- 一键生成 -->
  11. <div class="title bor-b mb10">一键生成
  12. <!-- <div class="fr"><a class="ncap-btn-big ncap-btn-green" href="javascript:void(0);" id="up_site">全站一键生成</a></div> -->
  13. </div>
  14. <div class="ncap-form-default tab_div_1">
  15. <dl class="row">
  16. <dt class="tit">
  17. <label>更新模式</label>
  18. </dt>
  19. <dd class="opt">
  20. <label class="radio-label">
  21. <span> &nbsp; </span>
  22. <input type="radio" class="radio" name="seo_uphtmltype" value="0" checked='checked'>全部页面生成
  23. <span class="check-mark"></span>
  24. </label>&nbsp;
  25. <label class="radio-label">
  26. <span> &nbsp; </span>
  27. <input type="radio" class="radio" name="seo_uphtmltype" value="1">指定时间更新
  28. <span class="check-mark"></span>
  29. </label>&nbsp;
  30. <label class="radio-label">
  31. <span> &nbsp; </span>
  32. <input type="radio" class="radio" name="seo_uphtmltype" value="2">指定ID更新
  33. <span class="check-mark"></span>
  34. </label>&nbsp;
  35. </dd>
  36. </dl>
  37. <dl class="row none" id="dl_seo_start_time_1">
  38. <dt class="tit">
  39. <label for="">起始时间 <p class="notic">即是文档的发布时间</p></label>
  40. </dt>
  41. <dd class="opt">
  42. <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">
  43. <span class="add-on input-group-addon">
  44. <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
  45. </span>
  46. <span class="err"></span>
  47. </dd>
  48. </dl>
  49. <dl class="row none" id="dl_seo_start_time_2">
  50. <dt class="tit">
  51. <label for="">起始ID <p class="notic">即是起始的文档ID</p></label>
  52. </dt>
  53. <dd class="opt">
  54. <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,'')">
  55. <span class="err"></span>
  56. </dd>
  57. </dl>
  58. <dl class="row">
  59. <dt class="tit">
  60. <label></label>
  61. </dt>
  62. <dd class="opt">
  63. <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_site" >开始生成HTML</a>
  64. </dd>
  65. </dl>
  66. </div>
  67. <!-- 一键生成 -->
  68. <!-- 首页生成 -->
  69. <div class="title bor-t mt20">首页生成</div>
  70. <div class="ncap-form-default tab_div_1">
  71. <dl class="row">
  72. <dt class="tit">
  73. <label for="">主页模板</label>
  74. </dt>
  75. <dd class="opt">
  76. <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,'/')"> &nbsp;&nbsp;
  77. <a href="javascript:void(0);" onClick="SelectTemplets('handlepost.seo_html_templet');" class="a-link line">浏览...</a>
  78. <span class="err"></span>
  79. </dd>
  80. </dl>
  81. <dl class="row">
  82. <dt class="tit">
  83. <label for="">主页位置</label>
  84. </dt>
  85. <dd class="opt">
  86. <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,'/')">
  87. <span class="err"></span>
  88. </dd>
  89. </dl>
  90. <dl class="row">
  91. <dt class="tit">
  92. <label>首页模式</label>
  93. </dt>
  94. <dd class="opt">
  95. <label class="radio-label">
  96. <span> &nbsp; </span>
  97. <input type="radio" class="radio" name="seo_showmod" value="0" {if condition="empty($config.seo_showmod)"}checked='checked'{/if}>动态浏览
  98. <span class="check-mark"></span>
  99. </label>&nbsp;
  100. <label class="radio-label">
  101. <span> &nbsp; </span>
  102. <input type="radio" class="radio" name="seo_showmod" value="1" {if condition="!empty($config.seo_showmod)"}checked='checked'{/if}>生成静态
  103. <span class="check-mark"></span>
  104. </label>&nbsp;
  105. </dd>
  106. </dl>
  107. <dl class="row">
  108. <dt class="tit">
  109. <label></label>
  110. </dt>
  111. <dd class="opt">
  112. <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_index" >更新主页HTML</a>
  113. <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>
  114. </dd>
  115. </dl>
  116. </div>
  117. <!-- 首页生成 -->
  118. <!-- 栏目生成 -->
  119. <div class="title bor-t mt20">栏目生成</div>
  120. <div class="ncap-form-default tab_div_2" >
  121. <dl class="row">
  122. <dt class="tit">
  123. <label >选择栏目</label>
  124. </dt>
  125. <dd class="opt">
  126. <div class="select w200">
  127. <select name="html_typeid" id="html_typeid" class="w300">
  128. <option value="0">所有栏目…</option>
  129. {$select_html}
  130. </select>
  131. </div>
  132. </dd>
  133. </dl>
  134. <dl class="row">
  135. <dt class="tit">
  136. <label>每次生成</label>
  137. </dt>
  138. <dd class="opt">
  139. <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,'')"> &nbsp;&nbsp; 个页面
  140. </dd>
  141. </dl>
  142. <dl class="row">
  143. <dt class="tit">
  144. <label>更新子栏目</label>
  145. </dt>
  146. <dd class="opt">
  147. <label class="radio-label">
  148. <span> &nbsp; </span>
  149. <input type="radio" class="radio" checked="checked" name="seo_upnext" value="1" {if condition="!empty($config.seo_upnext)"}checked='checked'{/if}>是
  150. <span class="check-mark"></span>
  151. </label>&nbsp;
  152. <label class="radio-label">
  153. <span> &nbsp; </span>
  154. <input type="radio" class="radio" name="seo_upnext" value="0" {if condition="empty($config.seo_upnext)"}checked='checked'{/if}>否
  155. <span class="check-mark"></span>
  156. </label>&nbsp;
  157. </dd>
  158. </dl>
  159. <dl class="row">
  160. <dt class="tit">
  161. <label></label>
  162. </dt>
  163. <dd class="opt">
  164. <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_channel">开始生成HTML</a>
  165. </dd>
  166. </dl>
  167. </div>
  168. <!-- 栏目生成 -->
  169. <!-- 文档生成 -->
  170. <div class="title bor-t mt20">文档生成</div>
  171. <div class="ncap-form-default tab_div_3" >
  172. <dl class="row">
  173. <dt class="tit">
  174. <label >选择栏目</label>
  175. </dt>
  176. <dd class="opt">
  177. <div class="select w200">
  178. <select name="html_arc_typeid" id="html_arc_typeid" class="w300">
  179. <option value="0">所有文档…</option>
  180. {$select_html}
  181. </select>
  182. </div>
  183. </dd>
  184. </dl>
  185. <dl class="row">
  186. <dt class="tit">
  187. <label>生成ID段 <p class="notic">空或0表示从头开始或结束</p></label>
  188. </dt>
  189. <dd class="opt">
  190. <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表示从头开始"> &nbsp;&nbsp;<span style="color: #999;font-weight: bold;font-size:26px;">-</span> &nbsp;&nbsp;
  191. <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">
  192. <span class="err"></span>
  193. </dd>
  194. </dl>
  195. <dl class="row">
  196. <dt class="tit">
  197. <label>每次生成</label>
  198. </dt>
  199. <dd class="opt">
  200. <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,'')"> &nbsp;&nbsp; 个页面
  201. </dd>
  202. </dl>
  203. <dl class="row">
  204. <dt class="tit">
  205. <label></label>
  206. </dt>
  207. <dd class="opt">
  208. <a class="ncap-btn-big ncap-btn-green mr10" href="javascript:void(0);" id="up_article">开始生成HTML</a>
  209. </dd>
  210. </dl>
  211. </div>
  212. </form>
  213. </div>
  214. <script>
  215. layui.use('laydate', function() {
  216. var laydate = layui.laydate;
  217. laydate.render({
  218. elem: '#seo_start_time'
  219. ,type: 'date'
  220. });
  221. })
  222. $(function(){
  223. $('input[name=seo_uphtmltype]').click(function(){
  224. var seo_uphtmltype = $(this).val();
  225. $('#dl_seo_start_time_1').hide();
  226. $('#dl_seo_start_time_2').hide();
  227. if (1 == seo_uphtmltype) {
  228. $('#dl_seo_start_time_1').show();
  229. $('#dl_seo_start_time_2').hide();
  230. } else if (2 == seo_uphtmltype) {
  231. $('#dl_seo_start_time_1').hide();
  232. $('#dl_seo_start_time_2').show();
  233. }
  234. });
  235. });
  236. //选择首页静态文件
  237. function SelectTemplets(fname)
  238. {
  239. var url = "{:url('Seom/filemanager')}";
  240. //iframe窗
  241. layer.open({
  242. type: 2,
  243. title: '选择主页模板',
  244. fixed: true, //不固定
  245. shadeClose: false,
  246. shade: 0.3,
  247. maxmin: false, //开启最大化最小化按钮
  248. area: ['80%', '80%'],
  249. content: url
  250. });
  251. }
  252. //生成整站
  253. $("#up_site").click(function(){
  254. $.ajax({
  255. url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
  256. type: 'POST',
  257. dataType: 'json',
  258. data: $('#handlepost').serialize(),
  259. beforeSend:function(){
  260. layer_loading('正在处理');
  261. },
  262. success: function(res){
  263. layer.closeAll();
  264. if (0 == res.code) {
  265. showErrorAlert(res.msg);
  266. } else {
  267. var seo_uphtmltype = $('input[name=seo_uphtmltype]:checked').val();
  268. var url = eyou_basefile+"?m=admin&c=Seom&a=site&uphtmltype="+seo_uphtmltype+"&seo_html_arcdir={$row}&lang="+__lang__;
  269. var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  270. }
  271. },
  272. error: function(e){
  273. layer.closeAll();
  274. layer.alert(e.responseText, {icon: 5, title:false});
  275. }
  276. });
  277. })
  278. //生成首页
  279. $("#up_index").click(function(){
  280. if($('input[name=seo_html_templet]').val() == ''){
  281. showErrorMsg('主页模板不能为空!');
  282. $('input[name=seo_html_templet]').focus();
  283. return false;
  284. }
  285. $.ajax({
  286. url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
  287. type: 'POST',
  288. dataType: 'json',
  289. data: $('#handlepost').serialize(),
  290. beforeSend:function(){
  291. layer_loading('正在处理');
  292. },
  293. success: function(res){
  294. if (0 == res.code) {
  295. layer.closeAll();
  296. showErrorAlert(res.msg);
  297. } else {
  298. var timestamp1 = Date.parse(new Date());
  299. $.ajax({
  300. url:__root_dir__+"/index.php?m=home&c=Buildmhtml&a=buildIndex&seo_html_arcdir={$row}&lang="+__lang__,
  301. type:'POST',
  302. dataType:'json',
  303. data: {_ajax:1},
  304. beforeSend:function(){
  305. // layer_loading('正在处理');
  306. // var index = layer.load(0, {shade: false});
  307. },
  308. success:function(data){
  309. if(data.msg !== ""){
  310. layer.closeAll();
  311. if (0 == $('input[name=seo_showmod]').val() && -1 != data.msg.indexOf('浏览')) {
  312. showErrorAlert(data.msg, 6);
  313. } else {
  314. showErrorAlert(data.msg);
  315. }
  316. }else{
  317. layer.closeAll();
  318. var timestamp2 = Date.parse(new Date());
  319. var timestamp3 = (timestamp2 - timestamp1) / 1000;
  320. if (timestamp3 < 1) timestamp3 = 1;
  321. layer.msg("生成完毕,共耗时:<font color='red'>"+timestamp3+"</font> 秒",{icon:1,time:2000});
  322. }
  323. },
  324. complete:function(){
  325. // layer.alert(1, {icon: 5, title:false});
  326. },
  327. error: function(e){
  328. layer.closeAll();
  329. showErrorAlert(e.responseText);
  330. }
  331. });
  332. }
  333. },
  334. error: function(e){
  335. layer.closeAll();
  336. showErrorAlert(e.responseText);
  337. }
  338. });
  339. });
  340. //生成栏目页
  341. $("#up_channel").click(function(){
  342. $.ajax({
  343. url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
  344. type: 'POST',
  345. dataType: 'json',
  346. data: $('#handlepost').serialize(),
  347. beforeSend:function(){
  348. layer_loading('正在处理');
  349. },
  350. success: function(res){
  351. layer.closeAll();
  352. if (0 == res.code) {
  353. showErrorAlert(res.msg);
  354. } else {
  355. var typeid = $("#html_typeid").val(); //栏目id
  356. var url = eyou_basefile+"?m=admin&c=Seom&a=channel&typeid="+typeid+"&seo_html_arcdir={$row}&lang="+__lang__;
  357. var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  358. }
  359. },
  360. error: function(e){
  361. layer.closeAll();
  362. showErrorAlert(e.responseText);
  363. }
  364. });
  365. });
  366. //生成文章页
  367. $("#up_article").click(function(){
  368. $.ajax({
  369. url: "{:url('Seom/handle', ['seo_html_arcdir'=>''.$row.'','is_Buildmhtml'=>1,'_ajax'=>1])}",
  370. type: 'POST',
  371. dataType: 'json',
  372. data: $('#handlepost').serialize(),
  373. beforeSend:function(){
  374. layer_loading('正在处理');
  375. },
  376. success: function(res){
  377. layer.closeAll();
  378. if (0 == res.code) {
  379. showErrorAlert(res.msg);
  380. } else {
  381. var typeid = $("#html_arc_typeid").val(); //栏目id
  382. var url = eyou_basefile+"?m=admin&c=Seom&a=article&typeid="+typeid+"&seo_html_arcdir={$row}&lang="+__lang__;
  383. var index = layer.open({type: 2,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  384. }
  385. },
  386. error: function(e){
  387. layer.closeAll();
  388. showErrorAlert(e.responseText);
  389. }
  390. });
  391. });
  392. </script>
  393. {include file="footer.htm" /}