No Description
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.

seo.htm 59KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. {include file="public/layout" /}
  2. <body class="bodystyle">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10 atta">
  6. {include file="seo/bar" /}
  7. <form method="post" id="handlepost" action="{:url('Seo/handle')}" enctype="multipart/form-data" name="form1">
  8. <div class="ncap-form-default">
  9. <dl class="row">
  10. <dt class="tit">
  11. <label for="seo_pseudo">URL模式</label>
  12. </dt>
  13. <dd class="opt">
  14. {volist name="seo_pseudo_list" id="vo"}
  15. <label class="curpoin {if condition="!empty($global['web_citysite_open']) && $key == 2"}grey{/if}" {if condition="!empty($global['web_citysite_open']) && $key == 2"} title="你已开启城市分站,静态页面功能不可用" {/if}>
  16. <input type="radio" name="seo_pseudo" value="{$key}" {if condition='isset($config.seo_pseudo) && $config.seo_pseudo eq $key'}checked="checked"{/if} {if condition="((!empty($default_lang) && $default_lang != 'cn') || !empty($global['web_citysite_open'])) && $key == 2"}disabled class="grey"{/if} />{$vo}&nbsp;
  17. </label>
  18. {/volist}
  19. {if condition="!empty($default_lang) && $default_lang != 'cn'"}
  20. <p class="notic">前台默认语言不是中文时,不允许使用静态模式!</p>
  21. {/if}
  22. <!-- &nbsp;&nbsp;<a id="a_seo_build" {if condition="empty($config['seo_pseudo']) || 2 != $config['seo_pseudo']"}style="display: none;"{/if} href="javascript:void(0);" data-url="{:url('Seo/build')}" onclick="seo_build(this);">[前往生成静态]</a> -->
  23. <input type="hidden" id="seo_pseudo_old" value="{$config.seo_pseudo|default='1'}"/>
  24. <input type="hidden" name="seo_html_arcdir_limit" value="{$seo_html_arcdir_limit}"/>
  25. <input type="hidden" id="seo_inlet" value="{$config.seo_inlet}"/>
  26. <input type="hidden" id="init_html" value="{$init_html|default='1'}"/>
  27. </dd>
  28. </dl>
  29. <dl class="row {if condition='empty($config.seo_pseudo) || 1 != $config.seo_pseudo || (1 == $config.seo_pseudo && 1 == $config.seo_dynamic_format)'}none{/if}" id="dl_seo_dynamic_format">
  30. <dt class="tit">
  31. <label>动态格式</label>
  32. </dt>
  33. <dd class="opt">
  34. <label class="curpoin"><input type="radio" name="seo_dynamic_format" value="1" {if condition="!isset($config.seo_dynamic_format) OR $config.seo_dynamic_format eq 1"}checked="checked"{/if}>完全兼容(<a href="javascript:void(0);" onclick="view_exp('view_1_1');">查看例子</a><span id="view_1_1" class="none">:__SITE_URL____ROOT_DIR__/index.php?m=home&amp;c=Lists&amp;a=index&amp;tid=1</span>)</label>&nbsp;
  35. {if condition="isset($config.seo_dynamic_format) AND $config.seo_dynamic_format eq 2"}
  36. <br/>
  37. <label class="curpoin"><input type="radio" name="seo_dynamic_format" value="2" checked="checked">部分兼容&nbsp;<font color="red">[部分空间不支持]</font>(<a href="javascript:void(0);" onclick="view_exp('view_1_2');">查看例子</a><span id="view_1_2" class="none">:__SITE_URL____ROOT_DIR__/home/Lists/index.html?tid=1</span>)</label>&nbsp;
  38. {/if}
  39. <span class="err"></span>
  40. <p class="notic"></p>
  41. </dd>
  42. </dl>
  43. <div class="row {if condition='isset($config.seo_pseudo) && $config.seo_pseudo != 2'}none{/if}" id="dl_seo_html_format">
  44. {notempty name="$seo_pseudo_lang"}
  45. <dl class="row">
  46. <dt class="tit">
  47. <label for="seo_pseudo_lang">多语言URL</label>
  48. </dt>
  49. <dd class="opt">
  50. <label class="curpoin"><input type="radio" name="seo_pseudo_lang" value="1" {if condition='!isset($seo_pseudo_lang) OR $seo_pseudo_lang neq 3'}checked="checked"{/if}/>动态URL</label>&nbsp;
  51. <label class="curpoin"><input type="radio" name="seo_pseudo_lang" value="3" {if condition="isset($seo_pseudo_lang) AND $seo_pseudo_lang eq 3"}checked="checked"{/if}>伪静态化</label>&nbsp;
  52. <span class="err"></span>
  53. <p class="notic"></p>
  54. </dd>
  55. </dl>
  56. {/notempty}
  57. <dl class="row">
  58. <dt class="tit">
  59. <label for="seo_html_arcdir">页面保存目录</label>
  60. </dt>
  61. <dd class="opt">
  62. <input id="seo_html_arcdir" name="seo_html_arcdir" value="{$config.seo_html_arcdir|default=''}" placeholder="留空默认根目录" type="text" />
  63. (如:html)
  64. <p class="notic">填写需要生成静态页面的文件夹名称,不能包含特殊字符,不能和根目录系统文件夹重名</p>
  65. <p class="{empty name='$seo_html_arcdir_1'}none{/empty}" style="color: red;" id="tips_seo_html_arcdir_1">页面将保存在 __SITE_URL____ROOT_DIR__<span id="tips_seo_html_arcdir_2">{$seo_html_arcdir_1|default=''}</span>/</p>
  66. </dd>
  67. </dl>
  68. <dl class="row">
  69. <dt class="tit">
  70. <label>栏目页面名称</label>
  71. </dt>
  72. <dd class="opt">
  73. <label class="curpoin"><input type="radio" name="seo_html_listname" value="1" {if condition="isset($config.seo_html_listname) && $config.seo_html_listname eq 1"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}顶级目录名称/lists_ID.html(<a href="javascript:void(0);" onclick="view_exp('lists_2_1');">查看例子</a><span id="lists_2_1" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/news/lists_1.html</span>)</label>&nbsp;
  74. <br/>
  75. <label class="curpoin"><input type="radio" name="seo_html_listname" value="2" {if condition="!isset($config.seo_html_listname) || $config.seo_html_listname neq 1"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}父级目录名称/子目录名称/(<a href="javascript:void(0);" onclick="view_exp('lists_2_2');">查看例子</a><span id="lists_2_2" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/news/lol/</span>)</label>&nbsp;
  76. <br/>
  77. <label class="curpoin"><input type="radio" name="seo_html_listname" value="3" {if condition="isset($config.seo_html_listname) && $config.seo_html_listname eq 3"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}子目录名称/(<a href="javascript:void(0);" onclick="view_exp('lists_2_3');">查看例子</a><span id="lists_2_3" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/lol/</span>)</label>&nbsp;
  78. <br/>
  79. <label class="curpoin"><input type="radio" name="seo_html_listname" value="4" {if condition="isset($config.seo_html_listname) && $config.seo_html_listname eq 4"}checked="checked"{/if}>自定义(<a href="javascript:void(0);" onclick="view_exp('lists_2_4');">点击查看</a><span id="lists_2_4" class="none">:在【栏目管理】新增/编辑栏目可以自定义文件保存目录和列表命名规则</span>)</label>&nbsp;
  80. <span class="err"></span>
  81. <p class="notic"></p>
  82. </dd>
  83. </dl>
  84. <dl class="row">
  85. <dt class="tit">
  86. <label>文档页面名称</label>
  87. </dt>
  88. <dd class="opt">
  89. <label class="curpoin"><input type="radio" name="seo_html_pagename" value="1" {if condition="isset($config.seo_html_pagename) && $config.seo_html_pagename eq 1"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}顶级目录名称/ID.html(<a href="javascript:void(0);" onclick="view_exp('view_2_1');">查看例子</a><span id="view_2_1" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/news/10.html</span>)</label>&nbsp;
  90. <br/>
  91. <label class="curpoin"><input type="radio" name="seo_html_pagename" value="2" {if condition="!isset($config.seo_html_pagename) || $config.seo_html_pagename neq 1"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}父级目录名称/子目录名称/ID.html(<a href="javascript:void(0);" onclick="view_exp('view_2_2');">查看例子</a><span id="view_2_2" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/news/lol/20.html</span>)</label>&nbsp;
  92. <br/>
  93. <label class="curpoin"><input type="radio" name="seo_html_pagename" value="3" {if condition="isset($config.seo_html_pagename) && $config.seo_html_pagename eq 3"}checked="checked"{/if}>{notempty name='$root_dir'}子目录名称/{/notempty}子目录名称/ID.html(<a href="javascript:void(0);" onclick="view_exp('view_2_3');">查看例子</a><span id="view_2_3" class="none">:__SITE_URL____ROOT_DIR__<span id="exp_seo_html_arcdir">{$seo_html_arcdir_1}</span>/lol/20.html</span>)</label>&nbsp;
  94. <br/>
  95. <label class="curpoin"><input type="radio" name="seo_html_pagename" value="4" {if condition="isset($config.seo_html_pagename) && $config.seo_html_pagename eq 4"}checked="checked"{/if}>自定义(<a href="javascript:void(0);" onclick="view_exp('view_2_4');">点击查看</a><span id="view_2_4" class="none">:在【栏目管理】新增/编辑栏目可以自定义文件保存目录和文档命名规则</span>)</label>&nbsp;
  96. <span class="err"></span>
  97. <p class="notic"></p>
  98. </dd>
  99. </dl>
  100. </div>
  101. <dl class="row {if condition='isset($config.seo_pseudo) && $config.seo_pseudo != 3'}none{/if}" id="dl_seo_rewrite_format">
  102. <dt class="tit">
  103. <label>URL格式</label>
  104. </dt>
  105. <dd class="opt">
  106. <label class="curpoin">
  107. <input type="radio" name="seo_rewrite_format" {if condition="!isset($config.seo_rewrite_format) OR $config.seo_rewrite_format eq 1"} value="1" checked="checked" {else if condition="isset($config.seo_rewrite_format) AND $config.seo_rewrite_format eq 3" /} value="3" checked="checked" {/if}>目录名称(<a href="javascript:void(0);" onclick="view_exp('view_3_1');">示例</a><span id="view_3_1" class="none">:__SITE_URL____ROOT_DIR__/news/</span>)
  108. </label>&nbsp;
  109. <br/>
  110. <label class="curpoin"><input type="radio" name="seo_rewrite_format" value="2" {if condition="isset($config.seo_rewrite_format) AND $config.seo_rewrite_format eq 2"}checked="checked"{/if}>模型标识(<a href="javascript:void(0);" onclick="view_exp('view_3_2');">示例</a><span id="view_3_2" class="none">:__SITE_URL____ROOT_DIR__/article/news.html</span>)</label>&nbsp;
  111. <span class="err"></span>
  112. <p class="notic"></p>
  113. </dd>
  114. </dl>
  115. <dl class="row {if condition='!isset($config.seo_pseudo) OR $config.seo_pseudo != 3 OR $config.seo_rewrite_format == 2'}none{/if}" id="dl_seo_rewrite_view_format">
  116. <dt class="tit">
  117. <label>文档隶属URL</label>
  118. </dt>
  119. <dd class="opt">
  120. <label class="curpoin"><input type="radio" name="seo_rewrite_view_format" value="1" {if condition="(!isset($config.seo_rewrite_format) OR $config.seo_rewrite_format eq 1) OR (!isset($config.seo_rewrite_view_format) OR $config.seo_rewrite_view_format == 1)"}checked="checked"{/if}>父目录(<a href="javascript:void(0);" onclick="view_exp('view_3_3');">示例</a><span id="view_3_3" class="none">:__SITE_URL____ROOT_DIR__/news/20.html</span>)</label>&nbsp;
  121. <br/>
  122. <label class="curpoin"><input type="radio" name="seo_rewrite_view_format" value="3" {if condition="(isset($config.seo_rewrite_format) AND $config.seo_rewrite_format eq 3) OR $config.seo_rewrite_view_format == 3"}checked="checked"{/if}>当前目录(<a href="javascript:void(0);" onclick="view_exp('view_3_4');">示例</a><span id="view_3_4" class="none">:__SITE_URL____ROOT_DIR__/lol/20.html</span>)</label>&nbsp;
  123. <br/>
  124. <label class="curpoin"><input type="radio" name="seo_rewrite_view_format" value="4" {if condition="(isset($config.seo_rewrite_format) AND $config.seo_rewrite_format eq 4) OR $config.seo_rewrite_view_format == 4"}checked="checked"{/if}>父目录/当前目录/(<a href="javascript:void(0);" onclick="view_exp('view_3_5');">示例</a><span id="view_3_5" class="none">:__SITE_URL____ROOT_DIR__/news/lol/20.html</span>)</label>&nbsp;
  125. <span class="err"></span>
  126. <p class="notic"></p>
  127. </dd>
  128. </dl>
  129. <dl class="row">
  130. <dt class="tit">
  131. <label>栏目标题格式</label>
  132. </dt>
  133. <dd class="opt">
  134. <label class="curpoin"><input type="radio" name="seo_liststitle_format" value="3" {if condition="isset($config.seo_liststitle_format) AND $config.seo_liststitle_format eq 3"}checked="checked"{/if}>栏目名称</label>&nbsp;
  135. <br/>
  136. <label class="curpoin"><input type="radio" name="seo_liststitle_format" value="1" {if condition="isset($config.seo_liststitle_format) AND $config.seo_liststitle_format eq 1"}checked="checked"{/if}>栏目名称<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>网站名称</label>&nbsp;
  137. <br/>
  138. <label class="curpoin"><input type="radio" name="seo_liststitle_format" value="4" {if condition="isset($config.seo_liststitle_format) AND $config.seo_liststitle_format eq 4"}checked="checked"{/if}>栏目名称<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>第N页</label>&nbsp;
  139. <br/>
  140. <label class="curpoin"><input type="radio" name="seo_liststitle_format" value="2" {if condition="!isset($config.seo_liststitle_format) OR $config.seo_liststitle_format eq 2"}checked="checked"{/if}>栏目名称<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>第N页<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>网站名称</label>&nbsp;
  141. <span class="err"></span>
  142. <p class="notic"></p>
  143. </dd>
  144. </dl>
  145. <dl class="row">
  146. <dt class="tit">
  147. <label>文档标题格式</label>
  148. </dt>
  149. <dd class="opt">
  150. <label class="curpoin"><input type="radio" name="seo_viewtitle_format" value="1" {if condition="isset($config.seo_viewtitle_format) AND $config.seo_viewtitle_format eq 1"}checked="checked"{/if}>内容标题</label>&nbsp;
  151. <br/>
  152. <label class="curpoin"><input type="radio" name="seo_viewtitle_format" value="2" {if condition="!isset($config.seo_viewtitle_format) OR $config.seo_viewtitle_format eq 2"}checked="checked"{/if}>内容标题<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>网站名称</label>&nbsp;
  153. <br/>
  154. <label class="curpoin"><input type="radio" name="seo_viewtitle_format" value="3" {if condition="isset($config.seo_viewtitle_format) AND $config.seo_viewtitle_format eq 3"}checked="checked"{/if}>内容标题<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>栏目名称<span class="sp_seo_title_symbol">{if condition="!isset($config['seo_title_symbol'])"}_{else /}{$config.seo_title_symbol|default=''}{/if}</span>网站名称</label>&nbsp;
  155. <span class="err"></span>
  156. <p class="notic"></p>
  157. </dd>
  158. </dl>
  159. <dl class="row">
  160. <dt class="tit">
  161. <label for="seo_title_symbol">标题连接符号</label>
  162. </dt>
  163. <dd class="opt">
  164. <input id="seo_title_symbol" name="seo_title_symbol" {if condition="!isset($config['seo_title_symbol'])"}value="_"{else /}value="{$config.seo_title_symbol|default=''}"{/if} type="text" />
  165. <p class="notic"></p>
  166. </dd>
  167. </dl>
  168. <dl class="row {if condition='isset($config.seo_pseudo) && $config.seo_pseudo != 2'}none{/if}" id="dl_seo_uphtml_after">
  169. <dt class="tit">
  170. <label>发布文档后</label>
  171. </dt>
  172. <dd class="opt">
  173. <label class="curpoin"><input type="checkbox" name="seo_uphtml_after_home" value="1" {if condition="!isset($config.seo_uphtml_after_home) OR $config.seo_uphtml_after_home eq 1"}checked="checked"{/if}>更新首页</label>&nbsp;&nbsp;
  174. <label class="curpoin"><input type="checkbox" name="seo_uphtml_after_channel" value="1" {if condition="!isset($config.seo_uphtml_after_channel) OR $config.seo_uphtml_after_channel eq 1"}checked="checked"{/if}>更新相关栏目</label>&nbsp;&nbsp;
  175. <label class="curpoin"><input type="checkbox" name="seo_uphtml_after_pernext" value="1" {if condition="!isset($config.seo_uphtml_after_pernext) OR $config.seo_uphtml_after_pernext eq 1"}checked="checked"{/if}>更新上下篇</label>&nbsp;&nbsp;
  176. <span class="err"></span>
  177. <p class="notic"></p>
  178. </dd>
  179. </dl>
  180. <dl class="row {if condition='isset($config.seo_pseudo) && $config.seo_pseudo == 2'}none{/if}" id="dl_seo_uphtml_after13">
  181. <dt class="tit">
  182. <label>发布编辑文档后</label>
  183. </dt>
  184. <dd class="opt {if condition="$global['web_cmsmode'] != 1"}grey{/if}" {if condition="$global['web_cmsmode'] != 1"}title="开启运营模式生效" {/if}>
  185. <label class="curpoin {if condition="$global['web_cmsmode'] != 1"}grey{/if}"><input type="checkbox" name="seo_uphtml_after_home13" value="1" {if condition="!isset($config.seo_uphtml_after_home13) OR $config.seo_uphtml_after_home13 eq 1"}checked="checked"{/if} class="{if condition="$global['web_cmsmode'] != 1"}grey{/if}" {if condition="$global['web_cmsmode'] != 1"}disabled="disabled"{/if}>清除首页缓存</label>&nbsp;&nbsp;
  186. <label class="curpoin {if condition="$global['web_cmsmode'] != 1"}grey{/if}"><input type="checkbox" name="seo_uphtml_after_channel13" value="1" {if condition="!isset($config.seo_uphtml_after_channel13) OR $config.seo_uphtml_after_channel13 eq 1"}checked="checked"{/if} class="{if condition="$global['web_cmsmode'] != 1"}grey{/if}" {if condition="$global['web_cmsmode'] != 1"}disabled="disabled"{/if}>清除相关栏目缓存</label>&nbsp;&nbsp;
  187. <label class="curpoin {if condition="$global['web_cmsmode'] != 1"}grey{/if}"><input type="checkbox" name="seo_uphtml_after_pernext13" value="1" {if condition="!isset($config.seo_uphtml_after_pernext13) OR $config.seo_uphtml_after_pernext13 eq 1"}checked="checked"{/if} class="{if condition="$global['web_cmsmode'] != 1"}grey{/if}" {if condition="$global['web_cmsmode'] != 1"}disabled="disabled"{/if}>清除上下篇缓存</label>&nbsp;&nbsp;
  188. <span class="err"></span>
  189. <p class="notic"></p>
  190. <input type="hidden" id="seo_uphtml_after_home13_old" value="{$config.seo_uphtml_after_home13|default=''}"/>
  191. <input type="hidden" id="seo_uphtml_after_channel13_old" value="{$config.seo_uphtml_after_channel13|default=''}"/>
  192. <input type="hidden" id="seo_uphtml_after_pernext13_old" value="{$config.seo_uphtml_after_pernext13|default=''}"/>
  193. </dd>
  194. </dl>
  195. <!-- <dl class="row {if condition="empty($config['seo_inlet']) OR (1 == $config['seo_inlet'] AND 1 == $config['seo_force_inlet'])"}{else /}none{/if}" id="dl_seo_force_inlet"> -->
  196. <dl class="row none" id="dl_seo_force_inlet">
  197. <dt class="tit">
  198. <label for="site_url">强制去除index.php</label>
  199. </dt>
  200. <dd class="opt">
  201. <div class="onoff">
  202. <label for="seo_force_inlet1" class="cb-enable {if condition='isset($config.seo_force_inlet) && $config.seo_force_inlet eq 1'}selected{/if}">开启</label>
  203. <label for="seo_force_inlet0" class="cb-disable {if condition='empty($config.seo_force_inlet)'}selected{/if}">关闭</label>
  204. <input id="seo_force_inlet1" name="seo_force_inlet" value="1" type="radio" {if condition="isset($config.seo_force_inlet) && $config.seo_force_inlet eq 1"} checked="checked"{/if}>
  205. <input id="seo_force_inlet0" name="seo_force_inlet" value="0" type="radio" {if condition="empty($config.seo_force_inlet)"} checked="checked"{/if}>
  206. </div>
  207. <br/>
  208. <p class=""></p>
  209. </dd>
  210. </dl>
  211. <div class="bot">
  212. <input type="hidden" id="is_change_data" value="0">
  213. <input type="hidden" id="seo_html_arcdir_old" value="{$config.seo_html_arcdir|default=''}"/>
  214. <input type="hidden" id="seo_html_listname_old" value="{$config.seo_html_listname|default=''}"/>
  215. <input type="hidden" id="seo_html_pagename_old" value="{$config.seo_html_pagename|default=''}"/>
  216. <input type="hidden" id="seo_liststitle_format_old" value="{$config.seo_liststitle_format|default=''}"/>
  217. <input type="hidden" id="seo_viewtitle_format_old" value="{$config.seo_viewtitle_format|default=''}"/>
  218. <input type="hidden" id="seo_uphtml_after_home_old" value="{$config.seo_uphtml_after_home|default=''}"/>
  219. <input type="hidden" id="seo_uphtml_after_channel_old" value="{$config.seo_uphtml_after_channel|default=''}"/>
  220. <input type="hidden" id="seo_uphtml_after_pernext_old" value="{$config.seo_uphtml_after_pernext|default=''}"/>
  221. <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="adsubmit();">确认提交</a>
  222. </div>
  223. </div>
  224. </form>
  225. </div>
  226. <script type="text/javascript">
  227. // 静态模式下,是否改变任意配置
  228. function change_html_confdata()
  229. {
  230. // 是否改变任意一项配置
  231. var is_change_data = 0;
  232. var seo_pseudo = $('input[name=seo_pseudo]:checked').val();
  233. var seo_pseudo_old = $('#seo_pseudo_old').val();
  234. if (seo_pseudo == 2 && seo_pseudo_old != seo_pseudo) {
  235. is_change_data = 1;
  236. } else {
  237. is_change_data = 0;
  238. }
  239. if (0 == is_change_data) {
  240. var seo_html_arcdir_old = $('#seo_html_arcdir_old').val();
  241. var seo_html_arcdir = $('#seo_html_arcdir').val();
  242. if (seo_html_arcdir_old != seo_html_arcdir) {
  243. is_change_data = 1;
  244. } else {
  245. is_change_data = 0;
  246. }
  247. }
  248. if (0 == is_change_data) {
  249. var seo_html_listname_old = $('#seo_html_listname_old').val();
  250. var seo_html_listname = $('input[name=seo_html_listname]:checked').val();
  251. if (seo_html_listname_old != seo_html_listname) {
  252. is_change_data = 1;
  253. } else {
  254. is_change_data = 0;
  255. }
  256. }
  257. if (0 == is_change_data) {
  258. var seo_html_pagename_old = $('#seo_html_pagename_old').val();
  259. var seo_html_pagename = $('input[name=seo_html_pagename]:checked').val();
  260. if (seo_html_pagename_old != seo_html_pagename) {
  261. is_change_data = 1;
  262. } else {
  263. is_change_data = 0;
  264. }
  265. }
  266. if (0 == is_change_data) {
  267. var seo_liststitle_format_old = $('#seo_liststitle_format_old').val();
  268. var seo_liststitle_format = $('input[name=seo_liststitle_format]:checked').val();
  269. if (seo_liststitle_format_old != seo_liststitle_format) {
  270. is_change_data = 1;
  271. } else {
  272. is_change_data = 0;
  273. }
  274. }
  275. if (0 == is_change_data) {
  276. var seo_viewtitle_format_old = $('#seo_viewtitle_format_old').val();
  277. var seo_viewtitle_format = $('input[name=seo_viewtitle_format]:checked').val();
  278. if (seo_viewtitle_format_old != seo_viewtitle_format) {
  279. is_change_data = 1;
  280. } else {
  281. is_change_data = 0;
  282. }
  283. }
  284. if (seo_pseudo == 2) {
  285. if (0 == is_change_data) {
  286. var seo_uphtml_after_home_old = $('#seo_uphtml_after_home_old').val();
  287. if (0 == seo_uphtml_after_home_old) {
  288. seo_uphtml_after_home_old = undefined;
  289. }
  290. var seo_uphtml_after_home = $('input[name=seo_uphtml_after_home]:checked').val();
  291. if (seo_uphtml_after_home_old != seo_uphtml_after_home) {
  292. is_change_data = 1;
  293. } else {
  294. is_change_data = 0;
  295. }
  296. }
  297. if (0 == is_change_data) {
  298. var seo_uphtml_after_channel_old = $('#seo_uphtml_after_channel_old').val();
  299. if (0 == seo_uphtml_after_channel_old) {
  300. seo_uphtml_after_channel_old = undefined;
  301. }
  302. var seo_uphtml_after_channel = $('input[name=seo_uphtml_after_channel]:checked').val();
  303. if (seo_uphtml_after_channel_old != seo_uphtml_after_channel) {
  304. is_change_data = 1;
  305. } else {
  306. is_change_data = 0;
  307. }
  308. }
  309. if (0 == is_change_data) {
  310. var seo_uphtml_after_pernext_old = $('#seo_uphtml_after_pernext_old').val();
  311. if (0 == seo_uphtml_after_pernext_old) {
  312. seo_uphtml_after_pernext_old = undefined;
  313. }
  314. var seo_uphtml_after_pernext = $('input[name=seo_uphtml_after_pernext]:checked').val();
  315. if (seo_uphtml_after_pernext_old != seo_uphtml_after_pernext) {
  316. is_change_data = 1;
  317. } else {
  318. is_change_data = 0;
  319. }
  320. }
  321. } else {
  322. if (0 == is_change_data) {
  323. var seo_uphtml_after_home13_old = $('#seo_uphtml_after_home13_old').val();
  324. if (0 == seo_uphtml_after_home13_old) {
  325. seo_uphtml_after_home13_old = undefined;
  326. }
  327. var seo_uphtml_after_home13 = $('input[name=seo_uphtml_after_home13]:checked').val();
  328. if (seo_uphtml_after_home13_old != seo_uphtml_after_home13) {
  329. is_change_data = 1;
  330. } else {
  331. is_change_data = 0;
  332. }
  333. }
  334. if (0 == is_change_data) {
  335. var seo_uphtml_after_channel13_old = $('#seo_uphtml_after_channel13_old').val();
  336. if (0 == seo_uphtml_after_channel13_old) {
  337. seo_uphtml_after_channel13_old = undefined;
  338. }
  339. var seo_uphtml_after_channel13 = $('input[name=seo_uphtml_after_channel13]:checked').val();
  340. if (seo_uphtml_after_channel13_old != seo_uphtml_after_channel13) {
  341. is_change_data = 1;
  342. } else {
  343. is_change_data = 0;
  344. }
  345. }
  346. if (0 == is_change_data) {
  347. var seo_uphtml_after_pernext13_old = $('#seo_uphtml_after_pernext13_old').val();
  348. if (0 == seo_uphtml_after_pernext13_old) {
  349. seo_uphtml_after_pernext13_old = undefined;
  350. }
  351. var seo_uphtml_after_pernext13 = $('input[name=seo_uphtml_after_pernext13]:checked').val();
  352. if (seo_uphtml_after_pernext13_old != seo_uphtml_after_pernext13) {
  353. is_change_data = 1;
  354. } else {
  355. is_change_data = 0;
  356. }
  357. }
  358. }
  359. $('#is_change_data').val(is_change_data);
  360. }
  361. $(function(){
  362. // 栏目页面名称
  363. $('input[name=seo_html_listname]').click(function(){
  364. var seo_html_listname = $(this).val();
  365. var seo_html_pagename = $('input[name=seo_html_pagename]:checked').val();
  366. if (4 == seo_html_listname && 4 != seo_html_pagename) {
  367. layer.alert('文档页面名称也可以自定义哦!', {icon: 6, closeBtn:false, title: false});
  368. }
  369. // 静态模式下,是否改变任意一项配置
  370. change_html_confdata();
  371. });
  372. // 文档页面名称
  373. $('input[name=seo_html_pagename]').click(function(){
  374. var seo_html_pagename = $(this).val();
  375. var seo_html_listname = $('input[name=seo_html_listname]:checked').val();
  376. if (4 == seo_html_pagename && 4 != seo_html_listname) {
  377. layer.alert('栏目页面名称也可以自定义哦!', {icon: 6, closeBtn:false, title: false});
  378. }
  379. // 静态模式下,是否改变任意一项配置
  380. change_html_confdata();
  381. });
  382. // 栏目标题格式
  383. $('input[name=seo_liststitle_format]').click(function(){
  384. // 静态模式下,是否改变任意一项配置
  385. change_html_confdata();
  386. });
  387. // 文档标题格式
  388. $('input[name=seo_viewtitle_format]').click(function(){
  389. // 静态模式下,是否改变任意一项配置
  390. change_html_confdata();
  391. });
  392. // 标题连接符号
  393. $('#seo_title_symbol').keyup(function(){
  394. var seo_title_symbol = $(this).val();
  395. $('.sp_seo_title_symbol').html(seo_title_symbol);
  396. });
  397. // 发布文档后,更新哪些页面
  398. $('input[name=seo_uphtml_after_home],input[name=seo_uphtml_after_channel],input[name=seo_uphtml_after_pernext]').click(function(){
  399. // 静态模式下,是否改变任意一项配置
  400. change_html_confdata();
  401. });
  402. $('input[name=seo_pseudo]').click(function(){
  403. var _this = this;
  404. $('#dl_seo_dynamic_format').hide();
  405. $('#dl_seo_html_format').hide();
  406. $('#a_seo_build').hide();
  407. $('#dl_seo_uphtml_after').hide();
  408. $('#dl_seo_uphtml_after13').hide();
  409. // $('#tab_base_html').attr('style','display:none!important');
  410. $('#dl_seo_rewrite_format').hide();
  411. $('#seo_right_uphtml').hide();
  412. var seo_pseudo = $(_this).val();
  413. if (1 == seo_pseudo) {
  414. $('#dl_seo_uphtml_after13').show();
  415. $('#dl_seo_rewrite_view_format').hide();
  416. if (1 != $('input[name=seo_dynamic_format]:checked').val()) {
  417. $('#dl_seo_dynamic_format').show();
  418. }
  419. if (1 != $('#seo_inlet').val()) {
  420. $('#dl_seo_force_inlet').show();
  421. } else {
  422. $('#dl_seo_force_inlet').hide();
  423. }
  424. } else if (2 == seo_pseudo) {
  425. $('#dl_seo_force_inlet').hide();
  426. $('#dl_seo_rewrite_view_format').hide();
  427. msg = "静态模式下注意几点:<br/>1、修改模板记得生成<br/>2、更新后台数据记得生成<br/>3、安装的插件需要更新至最新版本";
  428. layer.alert(msg, {icon: 6, closeBtn:false, title: false});
  429. $('#dl_seo_html_format').show();
  430. $('#a_seo_build').show();
  431. $('#dl_seo_uphtml_after').show();
  432. // $('#tab_base_html').show();
  433. $('#seo_right_uphtml').show();
  434. } else {
  435. $('#dl_seo_uphtml_after13').show();
  436. $('#dl_seo_rewrite_format').show();
  437. var seo_rewrite_format = $('input[name=seo_rewrite_format]:checked').val();
  438. if (seo_rewrite_format == 1 || seo_rewrite_format == 3) {
  439. $('#dl_seo_rewrite_view_format').show();
  440. } else {
  441. $('#dl_seo_rewrite_view_format').hide();
  442. }
  443. if (1 != $('#seo_inlet').val()) {
  444. $('#dl_seo_force_inlet').show();
  445. } else {
  446. $('#dl_seo_force_inlet').hide();
  447. }
  448. }
  449. // 静态模式下,是否改变任意一项配置
  450. change_html_confdata();
  451. var seo_pseudo_old = $('#seo_pseudo_old').val();
  452. if (3 == seo_pseudo) {
  453. layer_loading('正在检测');
  454. $.ajax({
  455. url: "{:url('Seo/ajax_checkHtmlDirpath')}",
  456. type: "POST",
  457. dataType: "json",
  458. data: {seo_pseudo_new:seo_pseudo, _ajax:1},
  459. // async: true,
  460. success: function(res){
  461. layer.closeAll();
  462. if (res.code == 0) {
  463. layer.msg(res.msg, {icon: 5, time: 1500});
  464. } else {
  465. if (res.data.msg != '') {
  466. $('input[name=seo_pseudo]').each(function(i,o){
  467. if($(o).val() == seo_pseudo_old){
  468. $(o).attr('checked',true);
  469. } else {
  470. $(o).attr('checked',false);
  471. }
  472. })
  473. $('#dl_seo_html_format').show();
  474. $('#a_seo_build').show();
  475. $('#dl_seo_uphtml_after').show();
  476. $('#seo_right_uphtml').show();
  477. // $('#tab_base_html').show();
  478. var seo_pseudo = $(_this).val();
  479. //询问框
  480. var height = res.data.height + 116;
  481. if (350 <= height) height = 350;
  482. var intro = '<style type="text/css">.layui-layer-content{text-align:left!important;}</style>';
  483. intro += res.data.msg;
  484. var confirm1 = layer.confirm(intro, {
  485. title: false
  486. ,area: ['320px', height+'px']
  487. ,btn: ['手工删除','自动删除'] //按钮
  488. }, function(){
  489. layer.close(confirm1);
  490. }, function(){
  491. layer_loading('正在处理');
  492. $.ajax({
  493. url: "{:url('Seo/ajax_delHtmlDirpath')}",
  494. type: "POST",
  495. dataType: "json",
  496. data: {_ajax:1},
  497. success: function(res){
  498. layer.closeAll();
  499. if (1 == res.code) {
  500. $('input[name=seo_pseudo]').each(function(i,o){
  501. if($(o).val() == seo_pseudo){
  502. $(o).attr('checked',true);
  503. } else {
  504. $(o).attr('checked',false);
  505. }
  506. })
  507. $('#dl_seo_html_format').hide();
  508. $('#a_seo_build').hide();
  509. $('#dl_seo_uphtml_after').hide();
  510. $('#seo_right_uphtml').hide();
  511. // $('#tab_base_html').attr('style','display:none!important');
  512. layer.msg(res.msg, {icon: 1, time: 1500});
  513. } else {
  514. layer.alert(res.data.msg, {icon: 5, title: false});
  515. }
  516. },
  517. error: function(e){
  518. layer.closeAll();
  519. layer.alert(e.responseText, {icon: 5, title:false});
  520. }
  521. })
  522. }
  523. );
  524. }
  525. }
  526. },
  527. error: function(e){
  528. layer.closeAll();
  529. layer.alert(e.responseText, {icon: 5, title:false});
  530. }
  531. });
  532. }
  533. });
  534. $('input[name=seo_rewrite_format]').click(function(){
  535. var seo_rewrite_format = $(this).val();
  536. if (1 == seo_rewrite_format || 3 == seo_rewrite_format) {
  537. $('#dl_seo_rewrite_view_format').show();
  538. } else {
  539. $('#dl_seo_rewrite_view_format').hide();
  540. }
  541. });
  542. $('#seo_html_arcdir').keyup(function(){
  543. var seo_html_arcdir = $(this).val();
  544. if (seo_html_arcdir != '') {
  545. if (seo_html_arcdir.substr(0,1) == '/') seo_html_arcdir = seo_html_arcdir.substr(1);
  546. seo_html_arcdir = '/' + seo_html_arcdir;
  547. $('#tips_seo_html_arcdir_1').show();
  548. $('#tips_seo_html_arcdir_2').html(seo_html_arcdir);
  549. } else {
  550. $('#tips_seo_html_arcdir_1').hide();
  551. }
  552. $('#exp_seo_html_arcdir').html(seo_html_arcdir);
  553. // 静态模式下,是否改变任意一项配置
  554. change_html_confdata();
  555. });
  556. $('input[name="seo_force_inlet"]').click(function(){
  557. if (1 == $(this).val()) {
  558. layer.open({
  559. type: 2,
  560. title: false,
  561. area: ['0px', '0px'],
  562. shade: 0.0,
  563. closeBtn: 0,
  564. shadeClose: true,
  565. content: '//{$website_host}__ROOT_DIR__/api/Rewrite/testing.html',
  566. success: function(layero, index){
  567. layer.close(index);
  568. var body = layer.getChildFrame('body', index);
  569. var content = body.html();
  570. if (content.indexOf("Congratulations on passing") == -1)
  571. {
  572. $('label[for=seo_force_inlet1]').removeClass('selected');
  573. $('#seo_force_inlet1').attr('checked','');
  574. $('label[for=seo_force_inlet0]').addClass('selected');
  575. $('#seo_force_inlet0').attr('checked','checked');
  576. layer.alert('不支持去除index.php,请<a href="javascript:void(0);" onclick="layer.closeAll();click_to_eyou_1575506523(\'https://www.eyoucms.com/plus/view.php?aid=7874&origin_eycms=1\',\'去掉URL中的index.php教程\');">点击查看教程</a>', {icon: 2, title:false});
  577. }
  578. }
  579. });
  580. }
  581. });
  582. /**
  583. * 初始化数据缓存
  584. * @return {[type]} [description]
  585. */
  586. function init_data_cache() {
  587. $.ajax({
  588. url : "{:url('Seo/init_data_cache')}",
  589. type: 'post',
  590. data: {'_ajax': 1},
  591. dataType: 'JSON',
  592. success: function(res) {
  593. }
  594. });
  595. }
  596. init_data_cache();
  597. // 自动检测隐藏index.php
  598. function checkInlet() {
  599. if (2 == $('input[name=seo_pseudo]:checked').val()) {
  600. $('#dl_seo_force_inlet').hide();
  601. }
  602. layer.open({
  603. type: 2,
  604. title: false,
  605. area: ['0px', '0px'],
  606. shade: 0.0,
  607. closeBtn: 0,
  608. shadeClose: true,
  609. content: '//{$website_host}__ROOT_DIR__/api/Rewrite/setInlet.html',
  610. success: function(layero, index){
  611. layer.close(index);
  612. var body = layer.getChildFrame('body', index);
  613. var content = body.html();
  614. if (content.indexOf("Congratulations on passing") == -1)
  615. {
  616. $('#seo_inlet').val(0);
  617. $('label[for=seo_force_inlet1]').removeClass('selected');
  618. $('#seo_force_inlet1').attr('checked','');
  619. $('label[for=seo_force_inlet0]').addClass('selected');
  620. $('#seo_force_inlet0').attr('checked','checked');
  621. if (2 != $('input[name=seo_pseudo]:checked').val()) {
  622. $('#dl_seo_force_inlet').show();
  623. }
  624. $.ajax({
  625. type : "POST",
  626. url : "__ROOT_DIR__/index.php?m=api&c=Rewrite&a=setInlet",
  627. data : {seo_inlet:0,_ajax:1},
  628. dataType : "JSON",
  629. success: function(res) {
  630. }
  631. });
  632. } else {
  633. $('#seo_inlet').val(1);
  634. $('#dl_seo_force_inlet').hide();
  635. $('label[for=seo_force_inlet0]').removeClass('selected');
  636. $('#seo_force_inlet0').attr('checked','');
  637. $('label[for=seo_force_inlet1]').addClass('selected');
  638. $('#seo_force_inlet1').attr('checked','checked');
  639. }
  640. }
  641. });
  642. }
  643. checkInlet();
  644. });
  645. function adsubmit(){
  646. if($("input[name='seo_pseudo']:checked").val() == '2'){
  647. var seo_html_arcdir = $('input[name="seo_html_arcdir"]').val();
  648. if (seo_html_arcdir != '') {
  649. seo_html_arcdir = seo_html_arcdir_new = seo_html_arcdir.replace('\\', '/');
  650. var reg = /^([0-9a-zA-Z\_\-\/]+)$/;
  651. if (seo_html_arcdir != '/' && reg.test(seo_html_arcdir)) {
  652. // 去掉最前面的斜杆
  653. if (seo_html_arcdir_new.substr(0,1) == '/') seo_html_arcdir_new = seo_html_arcdir_new.substr(1);
  654. var html_arcdir_arr = seo_html_arcdir_new.split("/");
  655. var html_arcdir_one = html_arcdir_arr[0]; // 一级路径名
  656. var seo_html_arcdir_limit = $('input[name="seo_html_arcdir_limit"]').val();
  657. var seo_html_arcdir_limit_arr = seo_html_arcdir_limit.split(",");
  658. if (seo_html_arcdir_limit_arr.indexOf(html_arcdir_one) >= 0){
  659. layer.msg('页面保存路径的目录名 '+html_arcdir_one+' 与内置禁用的重复!', {icon: 2,time: 3000});
  660. $('input[name="seo_html_arcdir"]').focus();
  661. return false;
  662. }
  663. }else{
  664. showErrorMsg('页面保存路径的格式错误!');
  665. $('input[name="seo_html_arcdir"]').focus();
  666. return false;
  667. }
  668. }
  669. }
  670. layer_loading("正在处理");
  671. var init_html = $('#init_html').val();
  672. $.ajax({
  673. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  674. type: 'POST',
  675. dataType: 'json',
  676. data: $('#handlepost').serialize(),
  677. success: function(res){
  678. if (1 == res.code) {
  679. if (2 == init_html || 2 != $("input[name='seo_pseudo']:checked").val()) {
  680. // layer.closeAll();
  681. layer.msg(res.msg, {icon: 1, time: 1000}, function(){
  682. if(parent.$('.left_menu_2003004').length > 0){
  683. $('.left_menu_2003004',window.parent.document).show();
  684. }
  685. window.location.href = res.url;
  686. });
  687. } else {
  688. layer.closeAll();
  689. var confirm1 = layer.confirm('配置成功,是否要生成整站页面?', {
  690. shade: layer_shade,
  691. area: ['480px', '190px'],
  692. move: false,
  693. title: '提示',
  694. btnAlign:'r',
  695. closeBtn: 3,
  696. btn: ['是','否'] ,//按钮
  697. success: function () {
  698. $(".layui-layer-content").css('text-align', 'left');
  699. }
  700. }, function(){
  701. var url = eyou_basefile+"?m=admin&c=Seo&a=site&lang="+__lang__;
  702. var index = layer.open({
  703. type: 2,
  704. shade: layer_shade,
  705. title: '开始生成',
  706. area: ['500px', '300px'],
  707. fix: false,
  708. maxmin: false,
  709. content: url,
  710. end: function(layero, index){
  711. layer.msg(res.msg, {icon: 1, time: 1000}, function(){
  712. window.location.href = res.url;
  713. });
  714. }
  715. });
  716. }, function(){
  717. layer.msg(res.msg, {icon: 1, time: 1000}, function(){
  718. window.location.href = res.url;
  719. });
  720. }
  721. );
  722. }
  723. } else {
  724. layer.closeAll();
  725. layer.alert(res.msg, {icon: 5, title:false});
  726. }
  727. },
  728. error: function(e){
  729. layer.closeAll();
  730. layer.alert(e.responseText, {icon: 5, title:false});
  731. }
  732. });
  733. }
  734. function view_exp(id)
  735. {
  736. $('#'+id).toggle();
  737. }
  738. function seo_build(obj)
  739. {
  740. var is_change_data = $('#is_change_data').val();
  741. if (0 == is_change_data) {
  742. window.location.href = $(obj).data('url');
  743. } else {
  744. $.ajax({
  745. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  746. type: 'POST',
  747. dataType: 'json',
  748. data: $('#handlepost').serialize(),
  749. beforeSend:function(){
  750. layer_loading('保存跳转');
  751. },
  752. success: function(res){
  753. layer.closeAll();
  754. if (0 == res.code) {
  755. showErrorAlert(res.msg);
  756. } else {
  757. window.location.href = $(obj).data('url');
  758. }
  759. },
  760. error: function(e){
  761. layer.closeAll();
  762. layer.alert(e.responseText, {icon: 5, title:false});
  763. }
  764. });
  765. }
  766. }
  767. </script>
  768. <div class="seo-right {if condition='2 != $config.seo_pseudo'}none{/if}" id="seo_right_uphtml">
  769. <style>
  770. .seo-right{
  771. position: fixed;
  772. top: 70px;
  773. margin-top: 0px;
  774. /* top: 50%;
  775. margin-top: -185px;*/
  776. right: 30px;
  777. width: 350px;
  778. height: 280px;
  779. background-color:#fff;
  780. z-index:666666;
  781. border: 1px solid #ddd;
  782. box-shadow: 0 0 8px rgba(0,0,0,0.1);
  783. border-radius: 4px;
  784. overflow: hidden;
  785. }
  786. .seo-html dt.tit {
  787. width: 60px;
  788. padding-left:0px;
  789. }
  790. </style>
  791. <div class="page">
  792. <form method="get" id="html_handlepost" name="form2">
  793. <div class="ncap-form-default seo-html">
  794. <dl class="row">
  795. <dt class="tit">
  796. <label>整站页面</label>
  797. </dt>
  798. <dd class="opt w0">
  799. <a href="javascript:void(0);" id="up_site" class="ncap-btn ncap-btn-green">一键生成</a>
  800. <span class="err"></span>
  801. <p class="notic"></p>
  802. </dd>
  803. </dl>
  804. <dl class="row">
  805. <dt class="tit">
  806. <label>首页</label>
  807. </dt>
  808. <dd class="opt w0">
  809. <a href="javascript:void(0);" id="up_index" class="ncap-btn ncap-btn-green">一键生成</a>
  810. <span class="err"></span>
  811. <p class="notic"></p>
  812. </dd>
  813. </dl>
  814. <dl class="row">
  815. <dt class="tit">栏目页</dt>
  816. <dd class="opt w0">
  817. <select name="html_typeid" id="html_typeid" style="width: 150px;">
  818. <option value="0">所有栏目…</option>
  819. {$select_html}
  820. </select>
  821. &nbsp;<a href="javascript:void(0);" id="up_channel" class="ncap-btn ncap-btn-green">一键生成</a>
  822. <p class="notic"></p>
  823. </dd>
  824. </dl>
  825. <dl class="row">
  826. <dt class="tit">文档页</dt>
  827. <dd class="opt w0">
  828. <select name="html_arc_typeid" id="html_arc_typeid" style="width: 150px;">
  829. <option value="0">所有文档…</option>
  830. {$select_html}
  831. </select>
  832. &nbsp;<a href="javascript:void(0);" id="up_article" class="ncap-btn ncap-btn-green">一键生成</a>
  833. <p class="notic"></p>
  834. </dd>
  835. </dl>
  836. <dl class="row">
  837. <dt class="tit" style="width: 100%;">
  838. <a id="a_seo_build" href="javascript:void(0);" data-url="{:url('Seo/build')}" onclick="seo_build(this);">更多静态生成配置>></a>
  839. </dt>
  840. </dl>
  841. </div>
  842. </form>
  843. </div>
  844. <script type="text/javascript">
  845. function check_index_file()
  846. {
  847. var is_index_file = {$is_index_file|default=0};
  848. if (0 == is_index_file) {
  849. showErrorAlert('网站根目录缺少 index.php 文件,请拷贝该文件上传到空间里!');
  850. return false;
  851. }
  852. return true;
  853. }
  854. $(function(){
  855. //生成整站
  856. $("#up_site").click(function(){
  857. if (!check_index_file()) {return false;}
  858. $.ajax({
  859. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  860. type: 'POST',
  861. dataType: 'json',
  862. data: $('#handlepost').serialize(),
  863. beforeSend:function(){
  864. layer.load(3, {shade: layer_shade});
  865. },
  866. success: function(res){
  867. layer.closeAll();
  868. if (0 == res.code) {
  869. showErrorAlert(res.msg);
  870. } else {
  871. var url = eyou_basefile+"?m=admin&c=Seo&a=site&uphtmltype=0&lang="+__lang__;
  872. var index = layer.open({type: 2,shade: layer_shade,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  873. }
  874. },
  875. error: function(e){
  876. layer.closeAll();
  877. layer.alert(e.responseText, {icon: 5, title:false});
  878. }
  879. });
  880. })
  881. //生成首页
  882. $("#up_index").click(function(){
  883. if (!check_index_file()) {return false;}
  884. $.ajax({
  885. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  886. type: 'POST',
  887. dataType: 'json',
  888. data: $('#handlepost').serialize(),
  889. beforeSend:function(){
  890. layer.load(3, {shade: layer_shade});
  891. },
  892. success: function(res){
  893. if (0 == res.code) {
  894. layer.closeAll();
  895. showErrorAlert(res.msg);
  896. } else {
  897. var timestamp1 = Date.parse(new Date());
  898. $.ajax({
  899. url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=buildIndex&lang="+__lang__+"&_ajax=1",
  900. type:'GET',
  901. dataType:'json',
  902. data: {},
  903. beforeSend:function(){
  904. // layer.load(3, {shade: [0.1,'#000']});
  905. },
  906. success:function(res1){
  907. if(res1.msg !== "" && -1 == res1.msg.indexOf('浏览')){
  908. layer.alert(res1.msg, {icon: 5, title:false,closeBtn: 0 },function () {
  909. layer.closeAll();
  910. } );
  911. }else{
  912. layer.closeAll();
  913. var timestamp2 = Date.parse(new Date());
  914. var timestamp3 = (timestamp2 - timestamp1) / 1000;
  915. if (timestamp3 < 1) timestamp3 = 1;
  916. layer.msg("生成完毕,共耗时:<font color='red'>"+timestamp3+"</font> 秒",{icon:1,time:2000});
  917. }
  918. },
  919. complete:function(){
  920. // layer.alert(1, {icon: 5, title:false});
  921. },
  922. error: function(e){
  923. layer.closeAll();
  924. showErrorAlert(e.responseText);
  925. }
  926. });
  927. }
  928. },
  929. error: function(e){
  930. layer.closeAll();
  931. showErrorAlert(e.responseText);
  932. }
  933. });
  934. })
  935. //生成栏目页
  936. $("#up_channel").click(function(){
  937. if (!check_index_file()) {return false;}
  938. $.ajax({
  939. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  940. type: 'POST',
  941. dataType: 'json',
  942. data: $('#handlepost').serialize(),
  943. beforeSend:function(){
  944. layer.load(3, {shade: layer_shade});
  945. },
  946. success: function(res){
  947. layer.closeAll();
  948. if (0 == res.code) {
  949. showErrorAlert(res.msg);
  950. } else {
  951. var typeid = $("#html_typeid").val(); //栏目id
  952. var url = eyou_basefile+"?m=admin&c=Seo&a=channel&typeid="+typeid+"&lang="+__lang__;
  953. var index = layer.open({type: 2,shade: layer_shade,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  954. }
  955. },
  956. error: function(e){
  957. layer.closeAll();
  958. showErrorAlert(e.responseText);
  959. }
  960. });
  961. })
  962. //生成文章页
  963. $("#up_article").click(function(){
  964. if (!check_index_file()) {return false;}
  965. $.ajax({
  966. url: "{:url('Seo/handle', ['_ajax'=>1])}",
  967. type: 'POST',
  968. dataType: 'json',
  969. data: $('#handlepost').serialize(),
  970. beforeSend:function(){
  971. layer.load(3, {shade: layer_shade});
  972. },
  973. success: function(res){
  974. layer.closeAll();
  975. if (0 == res.code) {
  976. showErrorAlert(res.msg);
  977. } else {
  978. var typeid = $("#html_arc_typeid").val(); //栏目id
  979. var url = eyou_basefile+"?m=admin&c=Seo&a=article&typeid="+typeid+"&lang="+__lang__;
  980. var index = layer.open({type: 2,shade: layer_shade,title: '开始生成',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  981. }
  982. },
  983. error: function(e){
  984. layer.closeAll();
  985. showErrorAlert(e.responseText);
  986. }
  987. });
  988. })
  989. })
  990. </script>
  991. </div>
  992. {include file="public/footer" /}