Nessuna descrizione
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.

sitemap.htm 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. {include file="public/layout" /}
  2. <body class="bodystyle">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page atta min-hg-c-10">
  6. {include file="seo/bar" /}
  7. <form method="post" id="handlepost" action="{:U('Sitemap/index')}" enctype="multipart/form-data" name="form1">
  8. <div class="ncap-form-default">
  9. <dl class="row">
  10. <dt class="tit">
  11. <label>地图类型</label>
  12. </dt>
  13. <dd class="opt">
  14. <label class="curpoin"><input type="checkbox" name="sitemap_xml" value="1" onclick="sitemap_type(this);" {if condition="isset($config.sitemap_xml) && $config.sitemap_xml eq 1"}checked="checked"{/if}>xml地图</label>&nbsp;&nbsp;
  15. <span class="notic2 {if condition="!isset($config.sitemap_xml) || $config.sitemap_xml != 1"}none{/if}" id="sg_sitemap_xml">
  16. {notempty name="$global.web_mobile_domain_open"}
  17. <a href="{$web_basehost}__ROOT_DIR__/sitemap.xml" target="_blank">PC端</a> &nbsp;&nbsp;
  18. <a href="{$mobile_domain}__ROOT_DIR__/sitemap_{$global.web_mobile_domain}.xml" target="_blank">移动端</a> &nbsp;&nbsp;
  19. {else /}
  20. <a href="{$web_basehost}__ROOT_DIR__/sitemap.xml" target="_blank">{$web_basehost}__ROOT_DIR__/sitemap.xml</a> &nbsp;&nbsp;
  21. {/notempty}
  22. <a href="javascript:void(0);" onclick="update_sitemap_xml();">手工更新</a>
  23. </span>
  24. <br/>
  25. <label class="curpoin"><input type="checkbox" name="sitemap_txt" value="1" onclick="sitemap_type(this);" {if condition="isset($config.sitemap_txt) && $config.sitemap_txt eq 1"}checked="checked"{/if}>txt地图</label>&nbsp;&nbsp;
  26. <span class="notic2 {if condition="!isset($config.sitemap_txt) || $config.sitemap_txt != 1"}none{/if}" id="sg_sitemap_txt">
  27. {notempty name="$global.web_mobile_domain_open"}
  28. <a href="{$web_basehost}__ROOT_DIR__/sitemap.txt" target="_blank">PC端</a> &nbsp;&nbsp;
  29. <a href="{$mobile_domain}__ROOT_DIR__/sitemap_{$global.web_mobile_domain}.txt" target="_blank">移动端</a> &nbsp;&nbsp;
  30. {else /}
  31. <a href="{$web_basehost}__ROOT_DIR__/sitemap.txt" target="_blank">{$web_basehost}__ROOT_DIR__/sitemap.txt</a> &nbsp;&nbsp;
  32. {/notempty}
  33. <a href="javascript:void(0);" onclick="update_sitemap_txt();">手工更新</a>
  34. </span>
  35. <br/>
  36. <label class="curpoin"><input type="checkbox" name="sitemap_html" value="1" onclick="sitemap_type(this);" {if condition="isset($config.sitemap_html) && $config.sitemap_html eq 1"}checked="checked"{/if}>html地图</label>&nbsp;&nbsp;
  37. <span class="notic2 {if condition="!isset($config.sitemap_html) || $config.sitemap_html != 1"}none{/if}" id="sg_sitemap_html">
  38. <a href="{$web_basehost}__ROOT_DIR__/sitemap.html" target="_blank">{$web_basehost}__ROOT_DIR__/sitemap.html</a> &nbsp;&nbsp;<a href="javascript:void(0);" onclick="update_sitemap_html();">手工更新</a>
  39. (<a href="javascript:void(0);" onclick="sitemap_exp('sitemap_1_1');">查看模板</a><span id="sitemap_1_1" class="none">:__ROOT_DIR__/public/html/sitemap.htm</span>)
  40. </span>
  41. <span class="err"></span>
  42. <p class="notic"></p>
  43. </dd>
  44. </dl>
  45. <dl class="row">
  46. <dt class="tit">自动更新</dt>
  47. <dd class="opt">
  48. <label class="curpoin"><input id="sitemap_auto1" name="sitemap_auto" value="1" {if condition="isset($config.sitemap_auto) && $config.sitemap_auto eq 1"}checked{/if} type="radio">开启</label>
  49. &nbsp;
  50. <label class="curpoin"><input id="sitemap_auto0" name="sitemap_auto" value="0" {if condition="!isset($config.sitemap_auto) || $config.sitemap_auto eq 0"}checked{/if} type="radio">关闭</label>
  51. <p class="notic">地图跟随文档一起更新</p>
  52. </dd>
  53. </dl>
  54. <dl class="row">
  55. <dt class="tit">
  56. <label>过滤规则</label>
  57. </dt>
  58. <dd class="opt">
  59. <label class="curpoin"><input type="checkbox" name="sitemap_not1" value="1" {if condition="isset($config.sitemap_not1) && $config.sitemap_not1 eq 1"}checked="checked"{/if}>过滤隐藏栏目</label>&nbsp;&nbsp;
  60. <label class="curpoin"><input type="checkbox" name="sitemap_not2" value="1" {if condition="isset($config.sitemap_not2) && $config.sitemap_not2 eq 1"}checked="checked"{/if}>过滤外部链接</label>&nbsp;&nbsp;
  61. <span class="err"></span>
  62. <p class="notic"></p>
  63. </dd>
  64. </dl>
  65. <div id="div_sitemap_xml" class="{if condition="empty($config.sitemap_xml)"}none{/if}">
  66. <dl class="row">
  67. <dt class="tit">
  68. <label>更新频率</label>
  69. </dt>
  70. <dd class="opt">
  71. 首页
  72. <select name="sitemap_changefreq_index">
  73. <option value="always" {if condition="empty($config.sitemap_changefreq_index) || $config.sitemap_changefreq_index eq 'always'"}selected="true"{/if}>经常</option>
  74. <option value="hourly" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'hourly'"}selected="true"{/if}>每小时</option>
  75. <option value="daily" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'daily'"}selected="true"{/if}>每天</option>
  76. <option value="weekly" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'weekly'"}selected="true"{/if}>每周</option>
  77. <option value="monthly" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'monthly'"}selected="true"{/if}>每月</option>
  78. <option value="yearly" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'yearly'"}selected="true"{/if}>每年</option>
  79. <option value="never" {if condition="!empty($config.sitemap_changefreq_index) && $config.sitemap_changefreq_index eq 'never'"}selected="true"{/if}>从不</option>
  80. </select>
  81. &nbsp;&nbsp;
  82. 列表页
  83. <select name="sitemap_changefreq_list">
  84. <option value="always" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'always'"}selected="true"{/if}>经常</option>
  85. <option value="hourly" {if condition="empty($config.sitemap_changefreq_list) || $config.sitemap_changefreq_list eq 'hourly'"}selected="true"{/if}>每小时</option>
  86. <option value="daily" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'daily'"}selected="true"{/if}>每天</option>
  87. <option value="weekly" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'weekly'"}selected="true"{/if}>每周</option>
  88. <option value="monthly" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'monthly'"}selected="true"{/if}>每月</option>
  89. <option value="yearly" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'yearly'"}selected="true"{/if}>每年</option>
  90. <option value="never" {if condition="!empty($config.sitemap_changefreq_list) && $config.sitemap_changefreq_list eq 'never'"}selected="true"{/if}>从不</option>
  91. </select>
  92. &nbsp;&nbsp;
  93. 内容页
  94. <select name="sitemap_changefreq_view">
  95. <option value="always" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'always'"}selected="true"{/if}>经常</option>
  96. <option value="hourly" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'hourly'"}selected="true"{/if}>每小时</option>
  97. <option value="daily" {if condition="empty($config.sitemap_changefreq_view) || $config.sitemap_changefreq_view eq 'daily'"}selected="true"{/if}>每天</option>
  98. <option value="weekly" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'weekly'"}selected="true"{/if}>每周</option>
  99. <option value="monthly" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'monthly'"}selected="true"{/if}>每月</option>
  100. <option value="yearly" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'yearly'"}selected="true"{/if}>每年</option>
  101. <option value="never" {if condition="!empty($config.sitemap_changefreq_view) && $config.sitemap_changefreq_view eq 'never'"}selected="true"{/if}>从不</option>
  102. </select>
  103. <span class="err"></span>
  104. <p class="notic">xml地图文件使用,你输入的网站的网页内容更新的频率。</p>
  105. </dd>
  106. </dl>
  107. <dl class="row">
  108. <dt class="tit">
  109. <label>优先级别</label>
  110. </dt>
  111. <dd class="opt">
  112. 首页
  113. <select name="sitemap_priority_index">
  114. <option value="0.1" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.1'"}selected="true"{/if}>0.1</option>
  115. <option value="0.2" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.2'"}selected="true"{/if}>0.2</option>
  116. <option value="0.3" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.3'"}selected="true"{/if}>0.3</option>
  117. <option value="0.4" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.4'"}selected="true"{/if}>0.4</option>
  118. <option value="0.5" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.5'"}selected="true"{/if}>0.5</option>
  119. <option value="0.6" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.6'"}selected="true"{/if}>0.6</option>
  120. <option value="0.7" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.7'"}selected="true"{/if}>0.7</option>
  121. <option value="0.8" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.8'"}selected="true"{/if}>0.8</option>
  122. <option value="0.9" {if condition="!empty($config.sitemap_priority_index) && $config.sitemap_priority_index eq '0.9'"}selected="true"{/if}>0.9</option>
  123. <option value="1.0" {if condition="empty($config.sitemap_priority_index) || $config.sitemap_priority_index eq '1.0'"}selected="true"{/if}>1.0</option>
  124. </select>
  125. &nbsp;&nbsp;
  126. 列表页
  127. <select name="sitemap_priority_list">
  128. <option value="0.1" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.1'"}selected="true"{/if}>0.1</option>
  129. <option value="0.2" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.2'"}selected="true"{/if}>0.2</option>
  130. <option value="0.3" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.3'"}selected="true"{/if}>0.3</option>
  131. <option value="0.4" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.4'"}selected="true"{/if}>0.4</option>
  132. <option value="0.5" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.5'"}selected="true"{/if}>0.5</option>
  133. <option value="0.6" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.6'"}selected="true"{/if}>0.6</option>
  134. <option value="0.7" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.7'"}selected="true"{/if}>0.7</option>
  135. <option value="0.8" {if condition="empty($config.sitemap_priority_list) || $config.sitemap_priority_list eq '0.8'"}selected="true"{/if}>0.8</option>
  136. <option value="0.9" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '0.9'"}selected="true"{/if}>0.9</option>
  137. <option value="1.0" {if condition="!empty($config.sitemap_priority_list) && $config.sitemap_priority_list eq '1.0'"}selected="true"{/if}>1.0</option>
  138. </select>
  139. &nbsp;&nbsp;
  140. 内容页
  141. <select name="sitemap_priority_view">
  142. <option value="0.1" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.1'"}selected="true"{/if}>0.1</option>
  143. <option value="0.2" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.2'"}selected="true"{/if}>0.2</option>
  144. <option value="0.3" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.3'"}selected="true"{/if}>0.3</option>
  145. <option value="0.4" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.4'"}selected="true"{/if}>0.4</option>
  146. <option value="0.5" {if condition="empty($config.sitemap_priority_view) || $config.sitemap_priority_view eq '0.5'"}selected="true"{/if}>0.5</option>
  147. <option value="0.6" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.6'"}selected="true"{/if}>0.6</option>
  148. <option value="0.7" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.7'"}selected="true"{/if}>0.7</option>
  149. <option value="0.8" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.8'"}selected="true"{/if}>0.8</option>
  150. <option value="0.9" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '0.9'"}selected="true"{/if}>0.9</option>
  151. <option value="1.0" {if condition="!empty($config.sitemap_priority_view) && $config.sitemap_priority_view eq '1.0'"}selected="true"{/if}>1.0</option>
  152. </select>
  153. <span class="err"></span>
  154. <p class="notic">xml地图文件使用,所抓取页面在您网站的重要性,告诉搜索引擎抓取的优先级。数值越大,优先级越高。</p>
  155. </dd>
  156. </dl>
  157. </div>
  158. <dl class="row">
  159. <dt class="tit">
  160. <label for="sitemap_archives_num">生成数量</label>
  161. </dt>
  162. <dd class="opt">
  163. 文档&nbsp;<input class="tc" id="sitemap_archives_num" name="sitemap_archives_num" value="{$config.sitemap_archives_num|default='100'}" type="text" style="width: 50px;" />&nbsp;篇
  164. &nbsp;&nbsp;&nbsp;
  165. TAG&nbsp;<input class="tc" id="sitemap_tags_num" name="sitemap_tags_num" value="{$config.sitemap_tags_num|default='100'}" type="text" style="width: 50px;" />&nbsp;篇
  166. <!-- <p class="notic">发布/编辑文档时,会同步更新sitemap.xml,包含首页、栏目页、指定数量的最新发布文档。</p> -->
  167. <p class="notic2">文档加TAG数量不能超过5000条;数值大对更新文档速度有影响</p>
  168. </dd>
  169. </dl>
  170. <dl class="row zzbaidu">
  171. <dt class="tit">
  172. <label for="sitemap_zzbaidutoken">百度推送</label>
  173. </dt>
  174. <dd class="opt">
  175. <input id="sitemap_zzbaidutoken" name="sitemap_zzbaidutoken" value="{$config.sitemap_zzbaidutoken|default=''}" class="input-txt" type="text" />
  176. <span class="err"></span>
  177. <p class="notic-pic"><img src="__SKIN__/images/baidu-token.jpg" width="535"></p>
  178. <p class="notic2">在<a href="https://ziyuan.baidu.com" target="_blank" >百度搜索资源平台</a>获取token并填入,更新文档时主动推送给百度</p>
  179. </dd>
  180. </dl>
  181. <div class="bot">
  182. <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="adsubmit();">确认提交</a>
  183. </div>
  184. </div>
  185. </form>
  186. </div>
  187. <script type="text/javascript">
  188. $(document).ready(function(){
  189. // 生成文档数量
  190. // $('#sitemap_archives_num').keyup(function(){
  191. // var sitemap_archives_num = parseInt($(this).val());
  192. // if (sitemap_archives_num > 100) {
  193. // $('#p_sitemap_archives_num').show();
  194. // } else {
  195. // $('#p_sitemap_archives_num').hide();
  196. // }
  197. // });
  198. // 生成Tag数量
  199. // $('#sitemap_tags_num').keyup(function(){
  200. // var sitemap_tags_num = parseInt($(this).val());
  201. // if (sitemap_tags_num > 100) {
  202. // $('#p_sitemap_tags_num').show();
  203. // } else {
  204. // $('#p_sitemap_tags_num').hide();
  205. // }
  206. // });
  207. });
  208. function sitemap_exp(id)
  209. {
  210. $('#'+id).toggle();
  211. }
  212. function sitemap_type(obj)
  213. {
  214. var name = $(obj).attr('name');
  215. var isChecked = $(obj).is(":checked");
  216. if (isChecked) {
  217. if (name == 'sitemap_xml') {
  218. $('#div_sitemap_xml').show();
  219. }
  220. $('#sg_'+name).show();
  221. } else {
  222. if (name == 'sitemap_xml') {
  223. $('#div_sitemap_xml').hide();
  224. }
  225. $('#sg_'+name).hide();
  226. }
  227. }
  228. function update_sitemap() {
  229. layer_loading('正在处理');
  230. $.ajax({
  231. url: "__ROOT_DIR__/index.php?m=api&c=Sitemap&a=ajax_update_sitemap&lang="+__lang__,
  232. type: "POST",
  233. dataType: "json",
  234. data: {_ajax:1},
  235. success: function(res){
  236. layer.closeAll();
  237. if (1 == res.code) {
  238. layer.msg(res.msg, {icon: 1, time: 1000});
  239. } else {
  240. layer.alert(res.data.msg, {icon: 5, title: false});
  241. }
  242. },
  243. error: function(e){
  244. layer.closeAll();
  245. layer.alert(e.responseText, {icon: 5, title:false});
  246. }
  247. });
  248. }
  249. function update_sitemap_xml(){
  250. layer_loading('正在处理');
  251. $.ajax({
  252. url: "__ROOT_DIR__/index.php?m=api&c=Sitemap&a=ajax_update_sitemap_xml&lang="+__lang__,
  253. type: "POST",
  254. dataType: "json",
  255. data: {is_auto:'off', _ajax:1},
  256. success: function(res){
  257. layer.closeAll();
  258. if (1 == res.code) {
  259. layer.msg(res.msg, {icon: 1, time: 1000});
  260. } else {
  261. layer.alert(res.data.msg, {icon: 5, title: false});
  262. }
  263. },
  264. error: function(e){
  265. layer.closeAll();
  266. layer.alert(e.responseText, {icon: 5, title:false});
  267. }
  268. });
  269. }
  270. function update_sitemap_txt(){
  271. layer_loading('正在处理');
  272. $.ajax({
  273. url: "__ROOT_DIR__/index.php?m=api&c=Sitemap&a=ajax_update_sitemap_txt&lang="+__lang__,
  274. type: "POST",
  275. dataType: "json",
  276. data: {is_auto:'off', _ajax:1},
  277. success: function(res){
  278. layer.closeAll();
  279. if (1 == res.code) {
  280. layer.msg(res.msg, {icon: 1, time: 1000});
  281. } else {
  282. layer.alert(res.data.msg, {icon: 5, title: false});
  283. }
  284. },
  285. error: function(e){
  286. layer.closeAll();
  287. layer.alert(e.responseText, {icon: 5, title:false});
  288. }
  289. });
  290. }
  291. function update_sitemap_html(){
  292. layer_loading('正在处理');
  293. $.ajax({
  294. url: "__ROOT_DIR__/index.php?m=api&c=Sitemap&a=ajax_update_sitemap_html&lang="+__lang__,
  295. type: "POST",
  296. dataType: "json",
  297. data: {is_auto:'off', _ajax:1},
  298. success: function(res){
  299. layer.closeAll();
  300. if (1 == res.code) {
  301. layer.msg(res.msg, {icon: 1, time: 1000});
  302. } else {
  303. layer.alert(res.data.msg, {icon: 5, title: false});
  304. }
  305. },
  306. error: function(e){
  307. layer.closeAll();
  308. layer.alert(e.responseText, {icon: 5, title:false});
  309. }
  310. });
  311. }
  312. function adsubmit(){
  313. layer_loading("正在处理");
  314. $('#handlepost').submit();
  315. }
  316. </script>
  317. {include file="public/footer" /}